/* ==========================================================================
   TRANG TÌM CHUYẾN & DANH SÁCH CHUYẾN XE (BOOKING SEARCH & TRIP LIST)
   ========================================================================== */

.booking-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 11rem auto;
    gap: 0.75rem;
    align-items: end;
    border-color: var(--border-color);
    background: var(--bg-card);
    border-radius: 1rem;
    box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.06);
}

.booking-search-form label {
    position: static !important;
    display: block !important;
    height: auto !important;
    padding: 0 !important;
    margin-bottom: 0.25rem !important;
    border: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.875rem;
}

.booking-search-form select,
.booking-search-form input[type="date"],
.booking-search-form input[type="text"] {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 2.85rem !important;
    -webkit-appearance: auto !important;
    appearance: auto !important;
    border-color: var(--border-color);
    background: #FFFFFF;
    color: var(--text-main);
    border-radius: 0.625rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.booking-search-form input[type="date"],
.booking-search-form input[type="text"] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: normal !important;
}

.booking-search-form input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
}

.booking-search-form .flatpickr-input {
    cursor: pointer;
}

.flatpickr-calendar {
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 28px var(--brand-primary-shadow);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.flatpickr-day.today {
    border-color: var(--brand-primary-hover);
}

.booking-search-control {
    border-color: var(--border-color);
}

.booking-search-control-error {
    border-color: var(--status-danger, #EF4444);
}

.booking-search-form select:focus,
.booking-search-form input[type="date"]:focus,
.booking-search-form input[type="text"]:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-primary-light);
    outline: none;
}

.booking-submit button {
    height: 2.85rem;
}

.booking-search-submit {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%);
    border-color: var(--brand-primary-hover);
    color: #FFFFFF;
    border-radius: 0.625rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.booking-search-submit:hover {
    background: linear-gradient(135deg, var(--brand-primary-hover) 0%, var(--brand-primary-dark) 100%);
    border-color: var(--brand-primary-dark);
    box-shadow: 0 8px 18px var(--brand-primary-shadow);
    transform: translateY(-1px);
}

.booking-results-shell {
    background: var(--bg-page);
}

.trip-list-card {
    border-color: var(--border-color);
    background: var(--bg-card);
    border-radius: 1rem;
    transition: all 0.25s ease;
}

.trip-list-card:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 10px 24px -4px var(--brand-primary-shadow);
    transform: translateY(-2px);
}

.trip-list-head i {
    color: var(--brand-primary);
}

.trip-list-head span {
    color: var(--text-main);
}

.trip-route-row .text-2xl {
    color: var(--text-main);
}

.trip-route-row .text-xs,
.trip-seat-meta {
    color: var(--text-muted);
}

.trip-price-panel {
    background: var(--brand-primary-light);
    border-color: var(--brand-primary-border, #A7F3D0);
    border-radius: 0.875rem;
}

.trip-price-value {
    color: var(--brand-primary);
}

.trip-book-btn {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%);
    border-color: var(--brand-primary-hover);
    color: #FFFFFF;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.trip-book-btn:hover {
    background: linear-gradient(135deg, var(--brand-primary-hover) 0%, var(--brand-primary-dark) 100%);
    border-color: var(--brand-primary-dark);
    box-shadow: 0 8px 18px var(--brand-primary-shadow);
    transform: translateY(-1px);
}

.booking-alert-card {
    width: min(400px, calc(100vw - 34px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
    padding: 26px 22px 24px;
}

.booking-alert-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: var(--brand-accent-light);
    color: var(--brand-accent);
}

.booking-alert-icon-mark {
    font-size: 28px;
    line-height: 1;
}

.booking-alert-title {
    font-size: 1.65rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-main);
}

.booking-alert-message {
    font-size: 1.05rem;
    line-height: 1.45;
    color: var(--text-muted);
    max-width: 32ch;
    margin-left: auto;
    margin-right: auto;
}

.booking-alert-btn {
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%) !important;
    color: #ffffff !important;
    font-size: 1.25rem;
    line-height: 1.2;
    padding-top: 0.78rem !important;
    padding-bottom: 0.78rem !important;
    border: 0;
    box-shadow: 0 6px 14px var(--brand-primary-shadow);
    min-height: 44px;
}

.booking-alert-btn:hover {
    background: linear-gradient(135deg, var(--brand-primary-hover) 0%, var(--brand-primary-dark) 100%) !important;
}

@media (max-width: 1023px) {
    .booking-search-form {
        grid-template-columns: 1fr;
    }

    .booking-date-field,
    .booking-submit {
        width: 100%;
    }

    .booking-submit button {
        width: 100%;
        justify-content: center;
    }

    .booking-search-form input[type="date"] {
        font-size: 16px !important;
    }

    .booking-search-form input[type="text"] {
        font-size: 16px !important;
    }

    .flatpickr-calendar {
        width: calc(100vw - 24px);
        max-width: 340px;
    }

    .booking-alert-title {
        font-size: 1.55rem;
    }

    .booking-alert-message {
        font-size: 1rem;
    }

    .booking-alert-btn {
        font-size: 1.25rem;
    }
}

@media (max-width: 640px) {
    .booking-alert-card {
        width: calc(100vw - 20px);
        border-radius: 16px;
        padding: 20px 16px 18px;
    }

    .booking-alert-icon {
        width: 52px;
        height: 52px;
    }
}

.trip-card-glow:hover {
    box-shadow: 0 12px 30px -6px var(--brand-primary-shadow), 0 8px 12px -6px rgba(0, 0, 0, 0.04);
    border-color: var(--brand-primary-border);
}
