/* Page Search Card */
.page-search-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 8px;
    overflow: visible;
}

.page-search-form {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto;
    align-items: center;
    overflow: visible;
}

.page-search-form .search-field {
    position: relative;
    padding: 16px 20px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    overflow: visible;
}

.page-search-form .search-field:hover {
    background: #f7f7f7;
}

.page-search-form .search-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.page-search-form .search-input {
    border: none;
    outline: none;
    font-size: 14px;
    color: #717171;
    background: transparent;
    width: 100%;
    cursor: pointer;
}

.page-search-form .search-divider {
    width: 1px;
    height: 40px;
    background: #ebebeb;
}

.page-search-form .search-button {
    background: var(--primary-color, #FF5A5F);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.page-search-form .search-button:hover {
    background: var(--primary-hover, #e04e52);
    transform: scale(1.05);
}

.page-search-form .search-button.pulse {
    animation: search-pulse 0.6s ease-out;
}

@keyframes search-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.7); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 15px rgba(255, 90, 95, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 90, 95, 0); }
}

/* Search Dropdowns */
.page-search-form .search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 9999;
}

.page-search-form .search-dropdown.show {
    display: block;
}

.page-search-form .location-dropdown {
    min-width: 320px;
    padding: 8px 0;
    max-height: 400px;
    overflow-y: auto;
}

.page-search-form .dropdown-title {
    padding: 12px 20px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #717171;
    text-transform: uppercase;
}

.page-search-form .location-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.15s;
}

.page-search-form .location-option:hover {
    background: #f7f7f7;
}

.page-search-form .location-option i {
    color: #717171;
    width: 20px;
    text-align: center;
}

.page-search-form .dropdown-divider {
    height: 1px;
    background: #ebebeb;
    margin: 8px 0;
}

/* DateTime Dropdown */
.page-search-form .datetime-dropdown {
    padding: 20px;
    min-width: 480px;
}

.page-search-form .datetime-container {
    display: flex;
    gap: 20px;
}

.page-search-form .date-picker {
    flex: 1;
}

.page-search-form .time-picker {
    width: 120px;
}

.page-search-form .time-header {
    font-size: 11px;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.page-search-form .time-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Calendar */
.page-search-form .calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.page-search-form .calendar-title {
    font-size: 14px;
    font-weight: 600;
}

.page-search-form .calendar-nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ebebeb;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.page-search-form .calendar-nav-btn:hover:not(.disabled) {
    border-color: #222;
}

.page-search-form .calendar-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-search-form .calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 8px;
}

.page-search-form .calendar-weekdays div {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #717171;
    padding: 4px;
}

.page-search-form .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.page-search-form .calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
}

.page-search-form .calendar-day:hover:not(.disabled):not(.empty) {
    background: #f7f7f7;
}

.page-search-form .calendar-day.selected {
    background: #222;
    color: white;
}

.page-search-form .calendar-day.disabled {
    color: #ddd;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 992px) {
    .page-search-form {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .page-search-form .search-divider {
        display: none;
    }

    .page-search-form .search-button {
        width: 100%;
        margin: 8px 0 0 0;
        border-radius: 12px;
    }
}

@media (max-width: 768px) {
    /* Make dropdowns appear as bottom sheets on mobile */
    .page-search-form .search-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
        overflow-y: auto;
        z-index: 10000;
    }

    .page-search-form .search-dropdown.show {
        display: block !important;
    }

    /* Add drag handle for mobile sheets */
    .page-search-form .search-dropdown::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 12px auto;
    }

    /* Location dropdown mobile */
    .page-search-form .location-dropdown {
        min-width: 100%;
        padding: 0 0 20px 0;
        max-height: 70vh;
    }

    .page-search-form .dropdown-title {
        padding: 16px 20px 12px;
        font-size: 12px;
        position: sticky;
        top: 0;
        background: white;
        z-index: 1;
    }

    .page-search-form .location-option {
        padding: 16px 20px;
        min-height: 52px;
    }

    /* DateTime dropdown mobile */
    .page-search-form .datetime-dropdown {
        min-width: 100%;
        padding: 0 16px 24px;
    }

    .page-search-form .datetime-container {
        flex-direction: column;
        gap: 16px;
    }

    .page-search-form .date-picker {
        width: 100%;
    }

    .page-search-form .time-picker {
        width: 100%;
        padding-top: 16px;
        border-top: 1px solid #ebebeb;
    }

    .page-search-form .time-header {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .page-search-form .time-select {
        padding: 14px 12px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    /* Calendar mobile adjustments */
    .page-search-form .calendar-header {
        padding: 8px 0 16px;
    }

    .page-search-form .calendar-title {
        font-size: 16px;
    }

    .page-search-form .calendar-nav-btn {
        width: 40px;
        height: 40px;
    }

    .page-search-form .calendar-weekdays div {
        font-size: 12px;
        padding: 8px 4px;
    }

    .page-search-form .calendar-day {
        font-size: 15px;
        min-height: 44px;
        min-width: 44px;
    }

    /* Search field mobile */
    .page-search-form .search-field {
        padding: 14px 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    .page-search-form .search-field:last-of-type {
        border-bottom: none;
    }

    .page-search-form .search-label {
        font-size: 10px;
    }

    .page-search-form .search-input {
        font-size: 15px;
    }

    /* Search card mobile */
    .page-search-card {
        border-radius: 12px;
        padding: 4px;
    }
}

/* Mobile overlay for dropdowns */
@media (max-width: 768px) {
    /* Add overlay behind dropdown */
    .page-search-form .search-field .search-dropdown.show ~ .mobile-overlay,
    body.search-dropdown-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
    }
}

/* =====================================================
   SHARED MOBILE STYLES FOR ALL SEARCH FORMS
   Applies to: .hero-section, .search-section, .page-search-form
   ===================================================== */
@media (max-width: 768px) {
    /* Make ALL search dropdowns appear as bottom sheets on mobile */
    .hero-section .search-dropdown,
    .search-section .search-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
        overflow-y: auto;
        z-index: 10000;
    }

    .hero-section .search-dropdown.show,
    .search-section .search-dropdown.show {
        display: block !important;
    }

    /* Add drag handle for mobile sheets */
    .hero-section .search-dropdown::before,
    .search-section .search-dropdown::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 12px auto;
    }

    /* Location dropdown mobile */
    .hero-section .location-dropdown,
    .search-section .location-dropdown {
        min-width: 100% !important;
        padding: 0 0 20px 0;
        max-height: 70vh;
    }

    .hero-section .dropdown-title,
    .search-section .dropdown-title {
        padding: 16px 20px 12px;
        font-size: 12px;
        position: sticky;
        top: 0;
        background: white;
        z-index: 1;
    }

    .hero-section .location-option,
    .search-section .location-option {
        padding: 16px 20px;
        min-height: 52px;
    }

    /* DateTime dropdown mobile */
    .hero-section .datetime-dropdown,
    .search-section .datetime-dropdown {
        min-width: 100% !important;
        left: 0 !important;
        padding: 0 16px 24px;
    }

    .hero-section .datetime-container,
    .search-section .datetime-container {
        flex-direction: column;
        gap: 16px;
    }

    .hero-section .date-picker,
    .search-section .date-picker {
        width: 100%;
    }

    .hero-section .time-picker,
    .search-section .time-picker {
        width: 100%;
        padding-top: 16px;
        border-top: 1px solid #ebebeb;
    }

    .hero-section .time-header,
    .search-section .time-header {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .hero-section .time-select,
    .search-section .time-select {
        padding: 14px 12px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    /* Calendar mobile adjustments */
    .hero-section .calendar-header,
    .search-section .calendar-header {
        padding: 8px 0 16px;
    }

    .hero-section .calendar-title,
    .search-section .calendar-title {
        font-size: 16px;
    }

    .hero-section .calendar-nav-btn,
    .search-section .calendar-nav-btn {
        width: 40px;
        height: 40px;
    }

    .hero-section .calendar-weekdays div,
    .search-section .calendar-weekdays div {
        font-size: 12px;
        padding: 8px 4px;
    }

    .hero-section .calendar-day,
    .search-section .calendar-day {
        font-size: 15px;
        min-height: 44px;
        min-width: 44px;
    }

    /* Search field mobile */
    .hero-section .search-field,
    .search-section .search-field {
        padding: 14px 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    .hero-section .search-field:last-of-type,
    .search-section .search-field:last-of-type {
        border-bottom: none;
    }

    .hero-section .search-label,
    .search-section .search-label {
        font-size: 10px;
    }

    .hero-section .search-input,
    .search-section .search-input {
        font-size: 15px;
    }

    /* Search card mobile */
    .hero-section .search-card,
    .search-section .search-card {
        border-radius: 12px;
        padding: 4px;
    }
}
