/* CSS for Bexon Search Popup - Uses variables defined in PHP */

.bexon-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--bsp-btn-bg);
    color: #111827;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001; /* Above almost everything but popups */
    position: relative;
    padding: 0;
}
.bexon-search-toggle:hover {
    background-color: var(--bsp-btn-hover);
}
.bexon-search-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: transform 0.3s ease;
}

.bexon-search-toggle .icon-close { display: none; }
.bexon-search-toggle.active .icon-search { display: none; }
.bexon-search-toggle.active .icon-close { display: block; }
.bexon-search-toggle.active { background-color: var(--bsp-btn-hover); }

/* POPUP OVERLAY */
.bexon-search-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Mobile support */
    background-color: var(--bsp-overlay);
    z-index: 99999; /* Max Z-index */
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.4s ease, opacity 0.4s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.bexon-search-popup.active {
    visibility: visible;
    opacity: 1;
}

/* SEARCH FORM WRAPPER */
.bexon-search-form-wrapper {
    width: 100%;
    max-width: 750px;
    padding: 0 20px;
    transform: var(--bsp-transform-start);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}
.bexon-search-popup.active .bexon-search-form-wrapper {
    transform: var(--bsp-transform-end);
    opacity: 1;
}

.bexon-search-input-group {
    position: relative;
    width: 100%;
}
.bexon-search-input {
    width: 100%;
    padding: 22px 65px 22px 30px;
    font-size: var(--bsp-font-size);
    font-family: var(--bsp-font-family);
    color: #111827;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 50px;
    outline: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin: 0; /* Reset WP padding */
}
.bexon-search-input:focus {
    border-color: var(--bsp-submit-color);
    box-shadow: 0 10px 40px rgba(23, 178, 135, 0.1);
}
.bexon-search-input::placeholder {
    color: #9CA3AF;
}

/* SUBMIT BUTTON */
.bexon-search-submit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--bsp-submit-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.bexon-search-submit:hover {
    background-color: var(--bsp-submit-hover);
    color: #FFFFFF;
}
.bexon-search-submit svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}
