/*
 * Shared horizontal search bar + Spot nudge banner.
 * Used by /search.html and /search-results.html.
 * PETADOPTION-GUEST-ENTRY-POINT Session 3.
 */

/* Coral band wrapping the search form. The top 96px sits behind the
   fixed #navbar (97px tall — see css/main.css and home.css) and shows
   warm cream so the header area matches the rest of the marketing
   pages; the lower portion stays coral for the form. */
.pa-search-band {
    background: linear-gradient(
        to bottom,
        var(--warm-cream) 0,
        var(--warm-cream) 96px,
        var(--accent-coral) 96px
    );
    padding: 120px 0 24px;
    color: #FFFFFF;
}

.pa-search-band .container {
    padding: 0 24px;
}

.pa-search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.pa-search-bar__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1 1 180px;
}

.pa-search-bar__field--type    { flex: 0 1 180px; }
.pa-search-bar__field--location { flex: 1 1 260px; }
.pa-search-bar__field--distance { flex: 0 1 200px; }

.pa-search-bar__label {
    font: 500 0.85rem/1.2 'Inter', sans-serif;
    color: #FFFFFF;
    opacity: 0.95;
}

.pa-search-bar__control {
    height: 48px;
    padding: 0 16px;
    border: none;
    border-radius: 10px;
    background: #FFFFFF;
    color: var(--soft-black);
    font: 400 0.95rem/1.2 'Inter', sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.pa-search-bar__control:focus {
    outline: 2px solid var(--accent-sage);
    outline-offset: 1px;
}

select.pa-search-bar__control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231A1814' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.pa-search-bar__actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: auto;
    flex-wrap: wrap;
}

.pa-search-bar__btn {
    height: 48px;
    padding: 0 22px;
    border-radius: 9999px;
    font: 600 0.95rem/1 'Inter', sans-serif;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
    white-space: nowrap;
}

.pa-search-bar__btn--ghost {
    background: transparent;
    color: #FFFFFF;
    border: 1.5px solid rgba(255,255,255,0.85);
}

.pa-search-bar__btn--ghost:hover {
    background: rgba(255,255,255,0.12);
}

.pa-search-bar__btn--primary {
    background: #FFFFFF;
    color: var(--accent-coral);
    border: 1.5px solid #FFFFFF;
}

.pa-search-bar__btn--primary:hover {
    transform: translateY(-1px);
    background: var(--warm-cream);
}

/* Sage Spot nudge banner, sits directly below the search band. */
.pa-spot-nudge {
    background: var(--accent-sage);
    color: #FFFFFF;
    padding: 14px 0;
}

.pa-spot-nudge .container {
    padding: 0 24px;
}

.pa-spot-nudge__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pa-spot-nudge__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.pa-spot-nudge__avatar img {
    width: 28px;
    height: 28px;
    display: block;
}

.pa-spot-nudge__text {
    font: 400 0.95rem/1.4 'Inter', sans-serif;
    color: #FFFFFF;
    margin: 0;
}

.pa-spot-nudge__link {
    color: #FFFFFF;
    text-decoration: underline;
    font-weight: 600;
}

.pa-spot-nudge__link:hover {
    color: var(--warm-cream);
}

/* Mobile — stack the search bar vertically. */
@media (max-width: 768px) {
    .pa-search-band {
        /* Match desktop top padding so the form clears the fixed navbar
           (logo + "Powered by PetSpot" subtitle stack to ~90px tall on
           mobile). Gradient split stays at 96px from the base rule. */
        padding: 110px 0 20px;
    }

    .pa-search-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .pa-search-bar__field,
    .pa-search-bar__field--type,
    .pa-search-bar__field--location,
    .pa-search-bar__field--distance {
        flex: 1 1 auto;
        width: 100%;
    }

    .pa-search-bar__actions {
        margin-left: 0;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .pa-search-bar__btn {
        width: 100%;
    }

    .pa-spot-nudge {
        padding: 12px 0;
    }

    .pa-spot-nudge__inner {
        gap: 10px;
    }

    .pa-spot-nudge__text {
        font-size: 0.9rem;
        text-align: left;
    }
}
