/* ============================================================
   Omnilution Quick Search - CSS v2.0
   Compatible: Astra + Elementor + WP Rocket + Perfmatters
   ============================================================ */

/* --- Trigger Bar Styles --- */
.omni-qs-trigger-container {
    position: relative;
    max-width: 620px;
    cursor: pointer;
}

.omni-qs-bar {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    background: #FAF9F9;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    padding: 3px 5px;
    height: 48px;
    box-sizing: border-box;
}

.omni-qs-bar input {
    width: 100%;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 16px;
    line-height: 24px;
    box-shadow: none !important;
    padding: 0 15px !important;
    pointer-events: none;
}

.omni-qs-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
}

/* --- Scroll Lock --- */
body.omni-qs-lock {
    overflow: hidden !important;
}

/* ============================================================
   POPUP OVERLAY
   ============================================================ */

#omni-qs-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 40%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#omni-qs-popup-overlay.omni-qs-popup-visible {
    display: flex;
}

#omni-qs-popup-overlay.omni-qs-popup-open {
    opacity: 1;
}

#omni-qs-popup-overlay.omni-qs-popup-closing {
    opacity: 0 !important;
    pointer-events: none;
}

#omni-qs-popup-overlay.omni-qs-popup-closing #omni-qs-popup-box {
    opacity: 0 !important;
    transform: translateY(-12px) scale(0.97) !important;
}

/* Popup box */
#omni-qs-popup-box {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    width: calc(100% - 48px);
    max-width: 860px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

#omni-qs-popup-overlay.omni-qs-popup-open #omni-qs-popup-box {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Top row */
#omni-qs-popup-top {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 68px;
    gap: 14px;
}

#omni-qs-popup-top svg.omni-qs-search-icon {
    flex-shrink: 0;
    color: #9ca3af;
    width: 22px;
    height: 22px;
}

#omni-qs-popup-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    font-size: 17px;
    color: #111827;
    background: transparent !important;
    caret-color: #374151;
    box-shadow: none !important;
    padding: 0 !important;
    height: auto !important;
    line-height: normal !important;
    border-radius: 0 !important;
    -webkit-appearance: none;
}

#omni-qs-popup-input::placeholder {
    color: #9ca3af;
}

/* ESC button */
#omni-qs-popup-esc {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    padding: 3px 8px;
    background: #f9fafb;
    cursor: pointer;
    letter-spacing: 0.03em;
    line-height: 1.6;
    transition: background 0.15s ease, border-color 0.15s ease;
}

#omni-qs-popup-esc:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Divider */
#omni-qs-popup-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0;
}

/* Results */
#omni-qs-popup-results {
    display: none;
    border-top: 1px solid #e5e7eb;
    max-height: 360px;
    overflow-y: auto;
}

#omni-qs-popup-results.omni-qs-has-results {
    display: block;
}

/* Desktop: two-column layout */
@media (min-width: 769px) {
    #omni-qs-popup-results.omni-qs-has-results {
        display: flex;
        align-items: flex-start;
    }

    .omni-qs-results-col {
        flex: 1;
        min-width: 0;
        margin: 5px;
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid #f5f5f5;
    }
}

/* Mobile: single column — col wrapper is invisible */
@media (max-width: 768px) {
    .omni-qs-results-col {
        display: contents; /* unwrap the col div, items render normally */
    }
}

.omni-qs-section-header svg {
    width: 25px;
}

.omni-qs-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke: #a9a9a9;
}

/* Section headers */
.omni-qs-section-header {
    padding: 10px 20px;
    font-weight: 700;
    background: #f5f5f5;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Result items */
.omni-qs-popup-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 12px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid #f3f3f3;
}

.omni-qs-popup-item:last-child {
    border-bottom: none;
}

.omni-qs-popup-item:hover,
.omni-qs-popup-item.omni-qs-focused {
    background: #f3f4f6;
}

.omni-qs-popup-item svg {
  display: none;
}

.omni-qs-popup-item-text {
    font-size: 15px;
    color: #111827;
}

.omni-qs-popup-item-text mark {
    background: none;
    color: #ff0000;
    font-weight: 600;
}

/* Bottom row */
#omni-qs-popup-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    height: 52px;
}

#omni-qs-popup-hint {
    font-size: 14px;
    color: #9ca3af;
}

#omni-qs-popup-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 14px;
}

@media (max-width: 768px) {
    /* CSS in here for mobile only */

#omni-qs-popup-nav {
    font-size: 11px;
}

#omni-qs-popup-hint {
    font-size: 11px;
    color: #9ca3af;
}
}




.omni-qs-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    width: 0px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.12s ease;
}

.omni-qs-nav-btn:hover {
    background: #f3f4f6;
}


.omni-qs-nav-btn:hover {
    background: transparent;
    color: #9ca3af;
    border: 1px solid;
}

/* State messages */
.omni-qs-popup-state {
    padding: 16px 20px;
    font-size: 14px;
    color: #9ca3af;
    text-align: center;
}

/* Mobile */
@media (max-width: 600px) {
    #omni-qs-popup-overlay {
        padding-top: 40px;
    }

    #omni-qs-popup-box {
        width: calc(100% - 24px);
        border-radius: 14px;
    }

    #omni-qs-popup-top {
        height: 58px;
        padding: 0 14px;
    }

    #omni-qs-popup-input {
        font-size: 16px;
    }

    #omni-qs-popup-results {
        max-height: 55vh;
    }

    #omni-qs-popup-bottom {
        padding: 10px 14px;
    }
}



@media (max-width: 768px) {
    /* CSS in here for mobile only */
 #omni-qs-popup-nav {
    display: none;
}

#omni-qs-popup-esc {
    display: none;
}
}