/* ==========================================================================
   Growa full-screen live search
   ========================================================================== */

.growa-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    background: rgba(0, 0, 0, 0.82);
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.growa-search-overlay.is-open {
    display: flex;
    opacity: 1;
}

body.growa-search-open {
    overflow: hidden;
}

/* Close button (circular, top-right) */
.growa-search-overlay .growa-search-close {
    position: fixed;
    top: 66px;
    right: 64px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(142, 142, 142, 0.9) !important;
    color: #141414 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24) !important;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 3;
}

.growa-search-overlay .growa-search-close:hover {
    background: #ffffff !important;
    transform: rotate(90deg);
}

body.admin-bar .growa-search-overlay .growa-search-close {
    top: 98px;
}

/* Centered content */
.growa-search-inner {
    width: calc(100% - 54px);
    max-width: none;
    margin: clamp(210px, 48vh, 258px) auto 0;
    padding: 0 0 58px;
    box-sizing: border-box;
}

.growa-search-form {
    text-align: center;
}

.growa-search-field {
    position: relative;
    margin: 0 auto 36px;
    max-width: none;
}

.growa-search-overlay .growa-search-input {
    width: 100%;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    padding: 8px 0 13px;
}

.growa-search-overlay .growa-search-input::placeholder {
    color: rgba(255, 255, 255, 0.48);
    text-transform: uppercase;
    opacity: 1;
}

.growa-search-line {
    display: block;
    height: 1px;
    width: 100%;
    background: rgba(148, 27, 10, 0.98);
}

.growa-search-overlay .growa-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 30px;
    margin-top: 2px;
    padding: 14px 34px;
    background: #2148bd !important;
    background-color: #2148bd !important;
    color: #ffffff !important;
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
    border: 0 !important;
    border-radius: 5px !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.growa-search-overlay .growa-search-submit:hover {
    background: #183a9d !important;
    background-color: #183a9d !important;
    color: #ffffff !important;
}

/* Results + recommendations share the list styling */
.growa-search-results,
.growa-search-recommend {
    max-width: 920px;
    margin: 34px auto 0;
}

.growa-search-results:empty {
    display: none;
}

.growa-search-rec-block + .growa-search-rec-block {
    margin-top: 32px;
}

.growa-search-rec-title {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    margin: 0 0 16px;
}

.growa-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.growa-search-chip {
    display: inline-block;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 40px;
    color: #ffffff;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.growa-search-chip:hover {
    background: #1e50d2;
    border-color: #1e50d2;
    color: #ffffff;
}

.growa-search-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.growa-search-item {
    margin: 0 0 10px;
}

.growa-search-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.growa-search-item a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.growa-search-thumb {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.growa-search-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.growa-search-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.growa-search-type {
    display: block;
    color: rgba(255, 255, 255, 0.56);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.growa-search-title {
    display: block;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.growa-search-excerpt {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 3px;
}

.growa-search-initial {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.growa-search-empty,
.growa-search-status {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 16px;
    padding: 18px 0;
}

.growa-search-viewall {
    display: inline-block;
    margin-top: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
}

/* When live results are showing, hide recommendations. */
.growa-search-overlay.is-searching .growa-search-recommend {
    display: none;
}

/* ----- Responsive ----- */
@media (max-width: 767px) {
    .growa-search-inner {
        width: calc(100% - 36px);
        margin-top: 25vh;
        padding: 0 0 42px;
    }

    .growa-search-overlay .growa-search-input {
        font-size: 22px;
    }

    .growa-search-overlay .growa-search-close {
        top: 22px;
        right: 18px;
        width: 40px;
        height: 40px;
    }

    .growa-search-overlay .growa-search-submit {
        min-width: 154px;
        min-height: 54px;
        padding: 12px 28px;
        font-size: 20px;
    }
}
