/**
 * OUTPOST HUB CUSTOM SEARCH STYLES
 * Version 5.0 - Tag Filter + CSS Spinner + Cleanup
 */

/* --- 1. GLOBAL ALIGNMENT --- */
.outpost-search-container-global {
    width: 100%;
    margin: 0 auto;
    background: transparent !important;
    box-sizing: border-box;
}

.outpost-search-box-design {
    background: #ffffff !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06) !important;
    border: 3px solid #000 !important;
    padding: 40px !important;
    position: relative;
    z-index: 10;
    transition: box-shadow 0.4s ease, padding-bottom 0.4s ease !important;
}

.outpost-search-box-design.outpost-search--expanded {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1) !important;
}

/* --- 2. SEARCH BAR & BUTTON --- */
.outpost-input-wrapper {
    position: relative !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0 !important;
    height: 70px !important;
    overflow: visible !important;
    box-shadow: none !important;
}

.outpost-search-icon-inside {
    width: 42px !important;
    height: 42px !important;
    background-image: url("https://stg-userevidence-staging.kinsta.cloud/wp-content/uploads/2026/01/Search.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
    margin-left: 20px !important;
    margin-right: 15px !important;
}

.outpost-search-icon-inside::before {
    display: none !important;
}

.outpost-input-wrapper input.outpost-search-field {
    flex-grow: 1 !important;
    background: transparent !important;
    height: 100% !important;
    border: none !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    outline: none !important;
    font-family: "Inter", sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #1b2064 !important;
}

.outpost-search-field::placeholder {
    color: #1b2064 !important;
    opacity: 0.3 !important;
}

.outpost-search-button {
    background: #7b42ff !important;
    color: #ffffff !important;
    border: none !important;
    padding: 8px 14px !important;
    height: 33px !important;
    min-width: 104px !important;
    font-family: "Inter", sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0;
    margin: 0 8px 0 10px !important;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
    border-radius: 12px;
}

.outpost-search-button:hover {
    background: #6a35e6 !important;
    box-shadow: 0 4px 12px rgba(123, 66, 255, 0.35) !important;
}

.outpost-search-button:active {
    transform: scale(0.97) !important;
    box-shadow: 0 2px 6px rgba(123, 66, 255, 0.25) !important;
}

/* --- 3. TAGS LIST --- */
.outpost-tags-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px;
    padding: 15px 0;
    margin-top: 10px;
}

.outpost-tag-pill {
    background: #f3efff !important;
    color: #7b42ff !important;
    padding: 14px 28px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: 2px solid transparent !important;
    border-radius: 12px;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease !important;
    user-select: none !important;
    cursor: pointer !important;
    font-family: "Inter", sans-serif;
    line-height: 1.4;
    opacity: 0;
    animation: outpost-pill-fade-in 0.4s ease forwards;
    animation-play-state: paused;
}

.outpost-search--expanded .outpost-tag-pill {
    animation-play-state: running;
}

/* Always visible tag pills */
.outpost-looking-for-region--visible .outpost-tag-pill {
    opacity: 1 !important;
    animation: none !important;
}

.outpost-tag-pill:hover {
    transform: translateY(-2px) scale(1.03) !important;
    box-shadow: 0 4px 14px rgba(123, 66, 255, 0.2) !important;
    background: #ebe4ff !important;
}

.outpost-tag-pill:active {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: none !important;
}

.outpost-tag-pill--active {
    background: #7b42ff !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(123, 66, 255, 0.3) !important;
}

.outpost-tag-pill--active:hover {
    background: #6a35e6 !important;
    box-shadow: 0 6px 18px rgba(123, 66, 255, 0.35) !important;
}

.outpost-tag-pill--active:active {
    background: #5c2ed4 !important;
}

@keyframes outpost-pill-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger the pill entrance animation */
.outpost-tag-pill:nth-child(1) { animation-delay: 0.05s; }
.outpost-tag-pill:nth-child(2) { animation-delay: 0.1s; }
.outpost-tag-pill:nth-child(3) { animation-delay: 0.15s; }
.outpost-tag-pill:nth-child(4) { animation-delay: 0.2s; }
.outpost-tag-pill:nth-child(5) { animation-delay: 0.25s; }
.outpost-tag-pill:nth-child(6) { animation-delay: 0.3s; }
.outpost-tag-pill:nth-child(7) { animation-delay: 0.35s; }
.outpost-tag-pill:nth-child(8) { animation-delay: 0.4s; }
.outpost-tag-pill:nth-child(9) { animation-delay: 0.45s; }
.outpost-tag-pill:nth-child(10) { animation-delay: 0.5s; }



/* --- 4. LIVE RESULTS POPUP --- */
#outpost-live-results-popup {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1) !important;
    z-index: 99999 !important;
    border-radius: 8px !important;
    animation: outpost-popup-enter 0.2s ease-out !important;
    overflow: hidden !important;
}

@keyframes outpost-popup-enter {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.outpost-res-img {
    width: 45px !important;
    height: 45px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    margin-right: 15px !important;
}

.outpost-live-result-item {
    padding: 15px 25px !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid #f7fafc !important;
    text-decoration: none !important;
    color: #2d3748 !important;
    transition: background 0.15s ease, padding-left 0.15s ease !important;
}

.outpost-live-result-item:hover {
    background-color: #f8fafc !important;
    padding-left: 30px !important;
}

/* --- 5. SECTIONS & BADGES --- */
.outpost-section-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #a0aec0 !important;
    text-transform: uppercase !important;
    margin: 0 !important;
    letter-spacing: 1.5px !important;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.outpost-search--expanded .outpost-section-title {
    opacity: 1;
    transform: translateY(0);
    margin: 40px 0 20px 0 !important;
}

/* Always visible section title */
.outpost-looking-for-region--visible .outpost-section-title {
    opacity: 1 !important;
    transform: translateY(0) !important;
    margin: 0 0 20px 0 !important;
}

/* Collapsible tags region */
.outpost-looking-for-region {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease 0.05s;
}

.outpost-search--expanded .outpost-looking-for-region {
    max-height: 200px;
    opacity: 1;
}

/* Always visible tags */
.outpost-looking-for-region--visible {
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
}

.outpost-badge {
    background-color: #7B42FF;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

/* --- 6. CSS SPINNER --- */
.outpost-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #7B42FF;
    border-radius: 50%;
    animation: outpost-spin 0.6s linear infinite;
    margin: 0 auto;
}

@keyframes outpost-spin {
    to { transform: rotate(360deg); }
}

/* --- 7. MOBILE RESPONSIVE FIXES --- */
@media (max-width: 768px) {
    .outpost-search-box-design {
        padding: 20px !important;
    }

    .outpost-search-icon-inside {
        display: none !important;
    }

    .outpost-input-wrapper {
        height: 60px !important;
        padding: 0 10px !important;
    }

    input.outpost-search-field#outpost-search-input {
        padding-left: 10px !important;
        font-size: 16px !important;
    }

    .outpost-search-button {
        min-width: 80px !important;
        height: 40px !important;
        font-size: 12px !important;
    }

    .outpost-tag-pill {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}
