/* ==========================================================================
   AirportBee Booking – Frontend Styles
   Translated from BookNow.module.scss (React source)
   ========================================================================== */

/* ---- CSS Custom Properties (overridable per-site) ---- */
:root {
    --abb-primary:        #FFCC00;
    --abb-primary-hover:  #e6b800;
    --abb-text:           #111111;
    --abb-text-muted:     #555555;
    --abb-border:         #cccccc;
    --abb-radius:         4px;
    --abb-shadow-sm:      rgba(0,0,0,0.02) 0 1px 3px 0, rgba(27,31,35,0.15) 0 0 0 1px;
    --abb-shadow-md:      rgba(0,0,0,0.24) 0 3px 8px;
    --abb-success:        #28a745;
    --abb-error:          #dc3545;
    --abb-font:           'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Reset within scope ---- */
.abb-booking-app *,
.abb-booking-app *::before,
.abb-booking-app *::after {
    box-sizing: border-box;
}

.abb-booking-app {
    font-family: var(--abb-font);
    color: var(--abb-text);
    line-height: 1.5;
    position: relative;
}

/* ---- Screen management ---- */
.abb-screen { display: block; }
.abb-screen[hidden] { display: none !important; }

/* ==========================================================================
   MODAL
   ========================================================================== */
.abb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.abb-modal-overlay[hidden] { display: none !important; }

.abb-modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.abb-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--abb-text-muted);
    line-height: 1;
    padding: 0;
}
.abb-modal-close:hover { color: var(--abb-text); }

.abb-modal-logo {
    display: flex;
    justify-content: center;
}
.abb-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Empty / "call us" modal */
.abb-empty-modal-box { padding: 0; gap: 0; }
.abb-modal-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--abb-border);
    padding: 0.75rem 1rem;
}
.abb-modal-header p {
    flex: 1;
    text-align: center;
    font-weight: 600;
    margin: 0;
    text-transform: capitalize;
}
.abb-modal-body {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.abb-modal-body p { margin: 0; }
.abb-modal-body a { color: #0057b8; font-weight: 600; }

/* ==========================================================================
   RADIO GROUP (shared by modal + payment)
   ========================================================================== */
.abb-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.abb-radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}
.abb-radio-option input[type="radio"] { cursor: pointer; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
/* Primary button (yellow) */
.abb-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--abb-primary);
    color: var(--abb-text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--abb-radius);
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}
.abb-btn-primary:hover:not(:disabled) { background: var(--abb-primary-hover); }
.abb-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Proceed button (in modal) */
.abb-btn-proceed { align-self: flex-end; }

/* Outline button */
.abb-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--abb-text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--abb-text);
    border-radius: var(--abb-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}
.abb-btn-outline:hover { background: var(--abb-text); color: #fff; }

/* Vehicle "Book Now" button – classic offset-shadow style */
.abb-btn-book-now {
    font-size: 16px;
    letter-spacing: 1px;
    padding: 13px 20px;
    outline: 0;
    border: 1px solid #111;
    cursor: pointer;
    position: relative;
    background: transparent;
    user-select: none;
    font-weight: 500;
    transition: none;
}
.abb-btn-book-now::after {
    content: '';
    background: var(--abb-primary);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: -1;
    transition: top 0.2s, left 0.2s;
}
.abb-btn-book-now:hover::after { top: 0; left: 0; }
@media (min-width: 768px) { .abb-btn-book-now { padding: 13px 50px; } }

/* ==========================================================================
   SPINNER
   ========================================================================== */
.abb-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.15);
    border-top-color: var(--abb-text);
    border-radius: 50%;
    animation: abb-spin 0.7s linear infinite;
}
.abb-spinner[hidden] { display: none !important; }

@keyframes abb-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   SEARCH SECTION
   ========================================================================== */
.abb-search-section {
    margin-top: 2rem;
    padding: 0 1rem;
}

.abb-tagline {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 0.25rem;
}
.abb-sub-tagline {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 2rem;
}
.abb-search-section h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

/* Search bar: 3-column grid */
.abb-search-bar {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    column-gap: 1rem;
    margin: 2rem 0;
    align-items: start;
}

@media (max-width: 767px) {
    .abb-search-bar {
        grid-template-columns: 1fr;
        row-gap: 1rem;
    }
    .abb-tagline,
    .abb-sub-tagline { font-size: 0.85rem; }
    .abb-search-section h3 { font-size: 1.2rem; }
}

/* Journey toggle link */
.abb-journey-toggle {
    color: #0057b8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.abb-journey-toggle:hover { text-decoration: underline; }

/* Back link */
.abb-back-link {
    color: #0057b8;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}
.abb-back-link:hover { text-decoration: underline; }

/* ==========================================================================
   ADDRESS AUTOCOMPLETE
   ========================================================================== */
.abb-address-field { position: relative; }
.abb-autocomplete-wrap { position: relative; }

.abb-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--abb-border);
    border-radius: var(--abb-radius);
    font-size: 0.95rem;
    font-family: var(--abb-font);
    color: var(--abb-text);
    background: #fff;
    transition: border-color 0.2s;
}
.abb-input:focus {
    outline: none;
    border-color: var(--abb-primary);
    box-shadow: 0 0 0 3px rgba(255,204,0,0.25);
}

.abb-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--abb-border);
    border-radius: var(--abb-radius);
    box-shadow: var(--abb-shadow-md);
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
    z-index: 10000;
}
.abb-dropdown[hidden] { display: none !important; }

.abb-dropdown li {
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}
.abb-dropdown li:last-child { border-bottom: none; }
.abb-dropdown li:hover { background: #fafafa; }

/* ==========================================================================
   VEHICLE LIST
   ========================================================================== */
.abb-vehicle-list[hidden] { display: none !important; }

.abb-vehicle-list ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 1.5rem;
}

.abb-vehicle-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-items: center;
    box-shadow: var(--abb-shadow-sm);
    padding: 1rem;
    border-radius: var(--abb-radius);
    transition: box-shadow 0.25s ease;
}
.abb-vehicle-item:hover { box-shadow: var(--abb-shadow-md); }

@media (max-width: 767px) {
    .abb-vehicle-item {
        grid-template-columns: 1fr;
        row-gap: 1rem;
        text-align: center;
    }
}

.abb-vehicle-desc {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.95rem;
}
.abb-vehicle-desc img {
    max-width: 320px;
    height: auto;
}
@media (max-width: 767px) {
    .abb-vehicle-desc img { max-width: 200px; }
}

.abb-vehicle-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.abb-vehicle-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}
.abb-vehicle-price {
    font-size: 1.4rem;
    text-transform: capitalize;
    margin: 0;
}
@media (max-width: 767px) {
    .abb-vehicle-name { font-size: 1.3rem; }
    .abb-vehicle-price { font-size: 1rem; }
}

/* ==========================================================================
   BOOKING FORM LAYOUT
   ========================================================================== */
.abb-booking-layout {
    display: grid;
    grid-template-columns: 1fr 30%;
    column-gap: 2rem;
    row-gap: 1.5rem;
    padding-bottom: 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (max-width: 900px) {
    .abb-booking-layout { grid-template-columns: 1fr; }
}

/* Booking form sections */
.abb-form-section {
    display: grid;
    row-gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}
.abb-form-section:last-child { border-bottom: none; }

.abb-section-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Passenger details grid */
.abb-detail-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
    row-gap: 1rem;
}
@media (max-width: 600px) {
    .abb-detail-fields { grid-template-columns: 1fr; }
}

.abb-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.abb-field-wrap label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--abb-text-muted);
}
.abb-field-phone { grid-column: span 2; }
@media (max-width: 600px) { .abb-field-phone { grid-column: span 1; } }

/* Phone input wrapper (intl-tel-input overrides) */
.abb-phone-wrap { width: 100%; }
.abb-phone-wrap .iti { width: 100%; }
.abb-phone-wrap .iti input { width: 100%; }

/* Error states */
.abb-input.abb-error,
.abb-phone-wrap.abb-error input { border-color: var(--abb-error) !important; }

.abb-field-error {
    font-size: 0.8rem;
    color: var(--abb-error);
}
.abb-field-error[hidden] { display: none !important; }

/* Extras grid */
.abb-extras-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
@media (max-width: 600px) { .abb-extras-grid { grid-template-columns: 1fr 1fr; } }

.abb-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
}
.abb-checkbox-label input[type="checkbox"] { cursor: pointer; }

/* Textarea */
.abb-textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-family: var(--abb-font);
    border: 1px solid var(--abb-border);
    border-radius: var(--abb-radius);
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}
.abb-textarea:focus {
    outline: none;
    border-color: var(--abb-primary);
}

/* PayPal label in form */
.abb-paypal-label {
    font-weight: 700;
    color: #003087;
}

/* ==========================================================================
   PICKUP SECTION (rendered by JS)
   ========================================================================== */
.abb-pickup-section { display: flex; flex-direction: column; gap: 1rem; }
.abb-pickup-title { font-weight: 600; margin: 0; }

/* ASAP / LATER toggle */
.abb-toggle-group {
    display: flex;
    border: 1px solid var(--abb-primary);
    border-radius: var(--abb-radius);
    overflow: hidden;
    width: fit-content;
}
.abb-toggle-btn {
    padding: 0.55rem 1.2rem;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s;
}
.abb-toggle-btn.active { background: var(--abb-primary); }
.abb-toggle-btn:hover:not(.active) { background: #fff9e6; }

/* Date/time grid */
.abb-datetime-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 600px) { .abb-datetime-grid { grid-template-columns: 1fr; } }

/* Select (flight buffer dropdown) */
.abb-select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--abb-border);
    border-radius: var(--abb-radius);
    font-size: 0.95rem;
    font-family: var(--abb-font);
    background: #fff;
    color: var(--abb-text);
    cursor: pointer;
}
.abb-select:focus { outline: none; border-color: var(--abb-primary); }

/* ==========================================================================
   BOOKING SUMMARY SIDEBAR
   ========================================================================== */
.abb-booking-summary {
    border: 1px solid var(--abb-border);
    border-radius: var(--abb-radius);
    align-self: start;
    overflow: hidden;
}

.abb-summary-header {
    background: #111;
    color: #fff;
    margin: 0;
    padding: 0.85rem 1rem;
    font-size: 1rem;
}

.abb-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.abb-summary-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.abb-summary-label { font-weight: 600; }
.abb-summary-value { color: var(--abb-text-muted); word-break: break-word; }

.abb-summary-price-row {
    padding: 0;
    border-top: 1px solid var(--abb-border);
}
.abb-summary-price-row h3 {
    background: #111;
    color: #fff;
    margin: 0;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.abb-price-spinner[hidden] { display: none !important; }
.abb-price-spinner { display: flex; align-items: center; }
.abb-spinner-ring {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: abb-spin 0.7s linear infinite;
}
@keyframes abb-spin {
    to { transform: rotate(360deg); }
}

.abb-summary-note {
    font-size: 0.85rem;
    color: var(--abb-text-muted);
    padding: 0.75rem 1rem;
    margin: 0;
}

#abb-confirm-wrap { padding: 0 1rem 1rem; }
#abb-confirm-wrap[hidden] { display: none !important; }
.abb-btn-confirm { width: 100%; }

#abb-paypal-container[hidden] { display: none !important; }
#abb-paypal-container { margin-top: 0.75rem; }

/* ==========================================================================
   SUCCESS SCREEN
   ========================================================================== */
.abb-screen-success-active { display: flex; justify-content: center; padding: 4rem 0; }

.abb-success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 360px;
    padding: 0 1rem;
    text-align: center;
}

.abb-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--abb-success);
    color: #fff;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: abb-pop 0.4s ease;
}

@keyframes abb-pop {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.abb-success-container h2 { margin: 0; font-size: 1.4rem; }
.abb-success-container p  { margin: 0; font-size: 0.9rem; color: var(--abb-text-muted); }
