/**
 * Frontend Styles
 * 
 * Complete styling for SunTransfers Booking plugin frontend
 * 
 * @package SunTransfers_Booking
 * @since 1.0.0
 */

/* ==========================================================================
   Variables & Root Styles
   ========================================================================== */

:root {
    --stb-primary: #C9A23F;
    --stb-primary-dark: #A68533;
    --stb-primary-light: #E4D09B;
    --stb-success: #2E7D32;
    --stb-success-light: #81C784;
    --stb-warning: #E6A700;
    --stb-warning-light: #FFD54F;
    --stb-danger: #C62828;
    --stb-danger-light: #EF5350;
    --stb-gray-50: #FAFAFA;
    --stb-gray-100: #F5F5F5;
    --stb-gray-200: #EEEEEE;
    --stb-gray-300: #E0E0E0;
    --stb-gray-400: #BDBDBD;
    --stb-gray-500: #9E9E9E;
    --stb-gray-600: #757575;
    --stb-gray-700: #616161;
    --stb-gray-800: #424242;
    --stb-gray-900: #212121;
    --stb-white: #FFFFFF;
    --stb-black: #000000;
    --stb-border-radius: 8px;
    --stb-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --stb-box-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --stb-transition: all 0.3s ease;
}

/* ==========================================================================
   Main Containers
   ========================================================================== */

.stb-container,
.stb-search-form-container,
.stb-checkout-container,
.stb-confirmation-container,
.stb-manage-booking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================================================
   Form Styling
   ========================================================================== */

.stb-form {
    background: var(--stb-white);
    padding: 30px;
    border-radius: var(--stb-border-radius);
    box-shadow: var(--stb-box-shadow);
}

.stb-form-group {
    margin-bottom: 20px;
}

.stb-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* Location Row with Swap Button */
.stb-location-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.stb-location-row .stb-form-col-2 {
    flex: 1;
    min-width: 0;
}

/* Swap Button Container */
.stb-swap-button-container {
    display: none;
    align-items: flex-end;
    padding-bottom: 0;
    margin-top: 32px;
}

.stb-swap-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    background-color: var(--stb-white);
    border: 2px solid var(--stb-primary);
    border-radius: 50%;
    color: var(--stb-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.stb-swap-button:hover {
    background-color: var(--stb-primary);
    color: var(--stb-white);
    transform: scale(1.05);
}

.stb-swap-button:active,
.stb-swap-button.stb-swap-active {
    transform: rotate(180deg) scale(0.95);
}

.stb-swap-button svg {
    width: 24px;
    height: 24px;
    display: block;
}

.stb-swap-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--stb-gray-200);
    border-color: var(--stb-gray-300);
    color: var(--stb-gray-500);
}

.stb-swap-button:disabled:hover {
    background-color: var(--stb-gray-200);
    color: var(--stb-gray-500);
    transform: none;
}


.stb-form-col-2 {
    flex: 1;
    min-width: 0;
}

.stb-form-col-3 {
    flex: 1;
    min-width: 0;
}

.stb-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--stb-gray-800);
    font-size: 14px;
}

.stb-required {
    color: var(--stb-danger);
    margin-left: 2px;
}

.stb-input,
.stb-select,
.stb-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--stb-gray-900);
    background-color: var(--stb-white);
    border: 2px solid var(--stb-gray-300);
    border-radius: var(--stb-border-radius);
    transition: var(--stb-transition);
    font-family: inherit;
}

.stb-input:focus,
.stb-select:focus,
.stb-textarea:focus {
    outline: none;
    border-color: var(--stb-primary);
    box-shadow: 0 0 0 3px rgba(201, 162, 63, 0.1);
}

.stb-input:disabled,
.stb-select:disabled,
.stb-textarea:disabled {
    background-color: var(--stb-gray-100);
    color: var(--stb-gray-500);
    cursor: not-allowed;
}

.stb-textarea {
    resize: vertical;
    min-height: 100px;
}

.stb-form-error {
    display: none;
    margin-top: 8px;
    font-size: 14px;
    color: var(--stb-danger);
}

.stb-form-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--stb-gray-600);
}

/* ==========================================================================
   Journey Type Toggle
   ========================================================================== */

.stb-journey-type-group {
    margin-bottom: 30px;
}

.stb-journey-type {
    display: flex;
    gap: 0;
    background: var(--stb-gray-100);
    border-radius: var(--stb-border-radius);
    padding: 4px;
}

.stb-journey-type-option {
    flex: 1;
    position: relative;
    margin: 0;
    cursor: pointer;
}

.stb-journey-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.stb-journey-type-option span {
    display: block;
    padding: 12px 24px;
    text-align: center;
    font-weight: 600;
    color: var(--stb-gray-700);
    border-radius: calc(var(--stb-border-radius) - 2px);
    transition: var(--stb-transition);
}

.stb-journey-type-option input[type="radio"]:checked + span {
    background: var(--stb-white);
    color: var(--stb-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stb-journey-type-option:hover span {
    color: var(--stb-primary);
}

/* ==========================================================================
   Passengers Selector
   ========================================================================== */

.stb-passengers-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--stb-gray-50);
    border-radius: var(--stb-border-radius);
}

.stb-passenger-field {
    flex: 1;
}

.stb-passenger-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--stb-gray-800);
    font-size: 14px;
}

.stb-passenger-field small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--stb-gray-600);
}

/* ==========================================================================
   Phone Input
   ========================================================================== */

.stb-phone-input {
    display: flex;
    gap: 10px;
}

.stb-phone-input .stb-country-code {
    flex: 0 0 120px;
}

.stb-phone-input .stb-input {
    flex: 1;
}

/* ==========================================================================
   Autocomplete
   ========================================================================== */

.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: var(--stb-border-radius);
    box-shadow: var(--stb-box-shadow-lg);
}

.stb-autocomplete-item {
    padding: 10px;
}

.stb-location-name {
    font-weight: 600;
    color: var(--stb-gray-900);
}

.stb-location-code {
    color: var(--stb-primary);
    font-weight: 600;
    margin-left: 8px;
}

.stb-location-type {
    color: var(--stb-gray-600);
    font-size: 13px;
    margin-left: 8px;
}

/* ==========================================================================
   Vehicle Cards
   ========================================================================== */

.stb-vehicles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* ==========================================================================
   Vehicle Cards - 3-Column Layout (Image | Details | Price)
   ========================================================================== */

.stb-vehicle-card {
    border: 2px solid var(--stb-gray-300);
    border-radius: var(--stb-border-radius);
    margin-bottom: 20px;
    transition: var(--stb-transition);
    background: var(--stb-white);
    overflow: hidden;
}

.stb-vehicle-card:hover {
    border-color: var(--stb-primary);
    box-shadow: 0 4px 12px rgba(201, 162, 63, 0.15);
    transform: translateY(-2px);
}

.stb-vehicle-card.selected {
    border-color: var(--stb-primary);
    background: rgba(201, 162, 63, 0.05);
    box-shadow: var(--stb-box-shadow-lg);
}

.stb-vehicle-label {
    display: block;
    cursor: pointer;
    margin: 0;
}

.stb-vehicle-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.stb-vehicle-content {
    padding: 0;
}

/* 3-Column Grid: Image | Details | Price */
.stb-vehicle-row {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 25px;
    padding: 25px;
    align-items: center;
}

/* Column 1: Vehicle Image (larger, transparent background) */
.stb-vehicle-image-col {
    width: 200px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
}

.stb-vehicle-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

/* Column 2: Vehicle Details */
.stb-vehicle-info-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.stb-vehicle-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--stb-gray-900);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.stb-vehicle-specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stb-spec-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--stb-gray-700);
}

.stb-spec-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.stb-spec-text {
    font-weight: 500;
}

/* Column 3: Price */
.stb-vehicle-price-col {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 20px;
    background: var(--stb-gray-50);
    border-radius: 8px;
    border: 2px solid var(--stb-gray-200);
}

.stb-vehicle-card.selected .stb-vehicle-price-col {
    background: rgba(201, 162, 63, 0.1);
    border-color: var(--stb-primary);
}

.stb-price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stb-price-label {
    font-size: 13px;
    color: var(--stb-gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stb-price-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--stb-primary-dark);
    line-height: 1;
}

.stb-price-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
}

.stb-badge-green {
    color: #28a745;
}

.stb-price-note {
    font-size: 12px;
    color: var(--stb-gray-600);
    margin-top: 2px;
}

.stb-spec-link {
    color: var(--stb-primary);
}

/* Service Highlights Toggle */
.stb-highlights-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 14px;
    border: 1px solid var(--stb-gray-300);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--stb-primary-dark);
    background: #fff;
    transition: all 0.2s;
}

.stb-highlights-toggle:hover {
    border-color: var(--stb-primary);
    background: var(--stb-gray-50);
}

.stb-highlights-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

/* Service Highlights Panel */
.stb-service-highlights {
    border-top: 1px solid var(--stb-gray-200);
    margin: 0 -20px;
    padding: 24px 30px;
    background: var(--stb-gray-50);
}

.stb-highlights-section {
    margin-bottom: 20px;
}

.stb-highlights-section:last-child {
    margin-bottom: 0;
}

.stb-highlights-heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--stb-gray-800);
    margin: 0 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--stb-gray-200);
}

.stb-highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stb-highlight-item {
    display: flex;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--stb-gray-700);
}

.stb-highlight-item strong {
    color: var(--stb-gray-800);
    display: block;
    margin-bottom: 2px;
}

.stb-highlight-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    margin-top: 2px;
}

.stb-travel-info {
    list-style: disc;
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--stb-gray-700);
}

.stb-travel-info li {
    margin-bottom: 8px;
}

.stb-travel-info li:last-child {
    margin-bottom: 0;
}

/* Mobile responsive - Stack vertically */
@media (max-width: 968px) {
    .stb-vehicle-row {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .stb-vehicle-image-col {
        width: 100%;
        max-width: 220px;
        margin: 0 auto;
        height: 150px;
    }
    
    .stb-vehicle-info-col {
        text-align: center;
    }
    
    .stb-vehicle-specs {
        align-items: center;
    }
    
    .stb-vehicle-name {
        font-size: 20px;
        text-align: center;
    }
    
    .stb-vehicle-price-col {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .stb-price-amount {
        font-size: 28px;
    }
    
    .stb-highlights-grid {
        grid-template-columns: 1fr;
    }
    
    .stb-service-highlights {
        padding: 16px 20px;
    }
}

/* ==========================================================================
   Extras Grid
   ========================================================================== */



/* ==========================================================================
   Add-ons Section
   ========================================================================== */

.stb-addons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stb-addon-option {
    display: block;
    padding: 20px;
    background: var(--stb-gray-50);
    border: 2px solid var(--stb-gray-300);
    border-radius: var(--stb-border-radius);
    cursor: pointer;
    transition: var(--stb-transition);
}

.stb-addon-option:hover {
    border-color: var(--stb-primary-light);
}

.stb-addon-option input[type="checkbox"] {
    margin-right: 12px;
}

.stb-addon-option input[type="checkbox"]:checked ~ .stb-addon-content {
    color: var(--stb-primary);
}

.stb-addon-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stb-addon-name {
    font-weight: 600;
    font-size: 16px;
}

.stb-addon-price {
    font-weight: 700;
    color: var(--stb-primary);
}

.stb-addon-description {
    margin: 0;
    font-size: 14px;
    color: var(--stb-gray-600);
}

/* ==========================================================================
   Price Summary
   ========================================================================== */

.stb-price-summary-sidebar {
    position: sticky;
    top: 20px;
}

.stb-price-summary {
    background: var(--stb-white);
    border: 2px solid var(--stb-gray-300);
    border-radius: var(--stb-border-radius);
    padding: 25px;
    box-shadow: var(--stb-box-shadow);
}

.stb-price-summary.sticky {
    position: sticky;
    top: 20px;
}

.stb-price-summary-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--stb-gray-900);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--stb-gray-200);
}

.stb-price-breakdown {
    margin-bottom: 20px;
}

.stb-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 15px;
    color: var(--stb-gray-700);
}

.stb-price-row + .stb-price-row {
    border-top: 1px solid var(--stb-gray-200);
}

.stb-price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 20px 0;
    margin-bottom: 20px;
    border-top: 2px solid var(--stb-gray-300);
    border-bottom: 2px solid var(--stb-gray-300);
    font-size: 20px;
    font-weight: 700;
    color: var(--stb-gray-900);
}


.stb-payment-secure {
    text-align: center;
    font-size: 13px;
    color: var(--stb-gray-600);
    margin: 15px 0 0 0;
}

.stb-secure-icon {
    margin-right: 6px;
}

/* ==========================================================================
   Section Styling
   ========================================================================== */

.stb-section {
    background: var(--stb-white);
    padding: 30px;
    margin-bottom: 20px;
    border-radius: var(--stb-border-radius);
    box-shadow: var(--stb-box-shadow);
}

.stb-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--stb-gray-900);
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--stb-gray-200);
}

/* Transfer Leg */
.stb-transfer-leg {
    padding: 20px;
    background: var(--stb-gray-50);
    border-radius: var(--stb-border-radius);
    margin-bottom: 20px;
}

.stb-transfer-leg h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--stb-gray-900);
    margin: 0 0 20px 0;
}

.stb-transfer-fields {
    margin-top: 15px;
}

/* ==========================================================================
   Summary Cards
   ========================================================================== */

.stb-summary-card,
.stb-journey-summary {
    background: var(--stb-gray-50);
    padding: 20px;
    border-radius: var(--stb-border-radius);
    margin-bottom: 20px;
}

.stb-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.stb-summary-row + .stb-summary-row {
    border-top: 1px solid var(--stb-gray-300);
}

.stb-summary-label {
    font-weight: 600;
    color: var(--stb-gray-700);
}

.stb-summary-value {
    color: var(--stb-gray-900);
}

/* ==========================================================================
   Confirmation Page
   ========================================================================== */

.stb-confirmation-header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.stb-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--stb-success);
    color: var(--stb-white);
    font-size: 48px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.stb-confirmation-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--stb-gray-900);
    margin: 0 0 10px 0;
}

.stb-confirmation-subtitle {
    font-size: 18px;
    color: var(--stb-gray-600);
    margin: 0;
}

/* Reference Display */
.stb-confirmation-reference {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.stb-reference-box {
    background: var(--stb-white);
    padding: 25px;
    border-radius: var(--stb-border-radius);
    box-shadow: var(--stb-box-shadow);
    text-align: center;
}

.stb-reference-box.stb-reference-primary {
    border: 2px solid var(--stb-primary);
}

.stb-reference-box.stb-reference-secondary {
    background: var(--stb-gray-50);
    border: 1px solid var(--stb-gray-300);
}

.stb-reference-box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--stb-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.stb-reference-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--stb-primary);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.stb-reference-secondary {
    font-size: 20px;
    color: var(--stb-gray-700);
}

.stb-copy-reference {
    background: var(--stb-primary);
    color: var(--stb-white);
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--stb-border-radius);
    cursor: pointer;
    transition: var(--stb-transition);
}

.stb-copy-reference:hover {
    background: var(--stb-primary-dark);
}

.stb-copy-reference.copied {
    background: var(--stb-success);
}

/* Confirmation Cards */
.stb-confirmation-cards {
    display: grid;
    grid-template-columns: 1fr; /* One card per row */
    gap: 20px;
    margin-bottom: 30px;
}

.stb-card {
    background: var(--stb-white);
    border-radius: var(--stb-border-radius);
    box-shadow: var(--stb-box-shadow);
    overflow: hidden;
}

.stb-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--stb-white);
    background: var(--stb-primary);
    padding: 15px 20px;
    margin: 0;
}

.stb-card-content {
    padding: 20px;
}

/* Transfer Detail Sub-headings */
.stb-transfer-sub-heading {
    font-size: 14px;
    font-weight: 600;
    color: var(--stb-primary);
    margin: 16px 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--stb-gray-300);
}

.stb-transfer-sub-heading:first-child {
    margin-top: 0;
}

.stb-transfer-divider {
    border: none;
    border-top: 2px solid var(--stb-primary);
    margin: 20px 0;
    opacity: 0.3;
}

.stb-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.stb-detail-row + .stb-detail-row {
    border-top: 1px solid var(--stb-gray-200);
}

.stb-detail-label {
    font-weight: 600;
    color: var(--stb-gray-700);
}

.stb-detail-value {
    color: var(--stb-gray-900);
    text-align: right;
}

.stb-price-highlight {
    font-size: 24px;
    font-weight: 700;
    color: var(--stb-primary);
}

/* Voucher Section */
.stb-voucher-section {
    text-align: center;
    margin-bottom: 30px;
}

/* Confirmation Message */
.stb-confirmation-message {
    background: var(--stb-gray-50);
    padding: 20px;
    border-radius: var(--stb-border-radius);
    border-left: 4px solid var(--stb-success);
    text-align: center;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */

.stb-status-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
}

.status-pending,
.stb-status-badge.status-pending {
    background: var(--stb-warning-light);
    color: var(--stb-gray-900);
}

.status-completed,
.stb-status-badge.status-completed {
    background: var(--stb-success-light);
    color: var(--stb-white);
}

.status-confirmed,
.stb-status-badge.status-confirmed {
    background: var(--stb-success);
    color: var(--stb-white);
}

.status-failed,
.stb-status-badge.status-failed {
    background: var(--stb-danger-light);
    color: var(--stb-white);
}

.status-cancelled,
.stb-status-badge.status-cancelled {
    background: var(--stb-gray-500);
    color: var(--stb-white);
}

.status-authorised,
.stb-status-badge.status-authorised {
    background: #42A5F5;
    color: var(--stb-white);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.stb-button {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--stb-border-radius);
    cursor: pointer;
    transition: var(--stb-transition);
    font-family: inherit;
    line-height: 1.5;
}

.stb-button-primary {
    background: var(--stb-primary);
    color: var(--stb-white);
}

.stb-button-primary:hover {
    background: var(--stb-primary-dark);
}

.stb-button-primary:disabled {
    background: var(--stb-gray-400);
    cursor: not-allowed;
}

.stb-button-secondary {
    background: var(--stb-gray-600);
    color: var(--stb-white);
}

.stb-button-secondary:hover {
    background: var(--stb-gray-700);
}

.stb-button-large {
    padding: 16px 40px;
    font-size: 18px;
    width: 100%;
}

.stb-button-loader {
    display: none;
}

.stb-button .stb-button-loader {
    margin-left: 10px;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.stb-alert {
    padding: 15px 20px;
    border-radius: var(--stb-border-radius);
    margin-bottom: 20px;
}

.stb-alert-error {
    background: #FFEBEE;
    color: var(--stb-danger);
    border-left: 4px solid var(--stb-danger);
}

.stb-alert-success {
    background: #E8F5E9;
    color: var(--stb-success);
    border-left: 4px solid var(--stb-success);
}

.stb-alert-warning {
    background: #FFF8E1;
    color: #F57F17;
    border-left: 4px solid var(--stb-warning);
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.stb-loading-container {
    text-align: center;
    padding: 60px 20px;
}

.stb-loading-container p {
    margin-top: 20px;
    font-size: 16px;
    color: var(--stb-gray-600);
}

.stb-spinner,
.stb-spinner-large {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--stb-gray-300);
    border-top-color: var(--stb-primary);
    border-radius: 50%;
    animation: stb-spin 0.8s linear infinite;
}

.stb-spinner-large {
    width: 50px;
    height: 50px;
    border-width: 5px;
}

@keyframes stb-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading state for autocomplete inputs */
.stb-input.stb-loading {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="none" stroke="%23C9A23F" stroke-width="2"><animate attributeName="stroke-dasharray" from="0,50" to="50,0" dur="1s" repeatCount="indefinite"/></circle></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px 20px;
    padding-right: 40px;
}

.stb-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ==========================================================================
   Manage Booking
   ========================================================================== */

.stb-lookup-form {
    background: var(--stb-white);
    padding: 40px;
    border-radius: var(--stb-border-radius);
    box-shadow: var(--stb-box-shadow);
    max-width: 600px;
    margin: 0 auto;
}

.stb-lookup-form h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--stb-gray-900);
    margin: 0 0 15px 0;
}

.stb-lookup-form > p {
    color: var(--stb-gray-600);
    margin-bottom: 30px;
}

.stb-booking-details {
    background: var(--stb-white);
    padding: 30px;
    border-radius: var(--stb-border-radius);
    box-shadow: var(--stb-box-shadow);
}

.stb-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--stb-gray-200);
}

.stb-reference-large {
    font-size: 32px;
    font-weight: 700;
    color: var(--stb-primary);
    text-align: center;
    padding: 20px;
    background: var(--stb-gray-50);
    border-radius: var(--stb-border-radius);
}

.stb-manage-note {
    text-align: center;
    padding: 20px;
    background: var(--stb-gray-50);
    border-radius: var(--stb-border-radius);
    color: var(--stb-gray-600);
    font-size: 14px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .stb-container,
    .stb-search-form-container,
    .stb-checkout-container,
    .stb-confirmation-container,
    .stb-manage-booking-container {
        padding: 15px;
    }
    
    .stb-form {
        padding: 20px;
    }
    
    .stb-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    /* Location row stays horizontal on mobile */
    .stb-location-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .stb-swap-button-container {
        align-items: center;
        margin: -10px 0;
        padding: 0;
    }
    
    .stb-swap-button {
        width: 44px;
        height: 44px;
    }
    
    .stb-swap-button svg {
        width: 20px;
        height: 20px;
    }
    
    .stb-passengers-container {
        flex-direction: column;
    }
    
    .stb-vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    .stb-confirmation-reference {
        flex-direction: column;
    }
    
    .stb-confirmation-cards {
        grid-template-columns: 1fr;
    }
    
    .stb-phone-input {
        flex-direction: column;
    }
    
    .stb-phone-input .stb-country-code {
        flex: 1;
    }
    
    .stb-price-summary-sidebar {
        position: static;
    }
    
    .stb-details-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .stb-section-title {
        font-size: 20px;
    }
    
    .stb-confirmation-title {
        font-size: 24px;
    }
    
    .stb-reference-number {
        font-size: 20px;
    }
    
    .stb-button-large {
        padding: 14px 30px;
        font-size: 16px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .stb-copy-reference,
    .stb-button,
    .stb-voucher-section {
        display: none;
    }
    
    .stb-card,
    .stb-section {
        box-shadow: none;
        border: 1px solid var(--stb-gray-300);
    }
    
    .stb-confirmation-header {
        page-break-after: avoid;
    }
}

/* ========================================
   BUTTON ROW (Back to Search + Pay Now)
   ======================================== */
.stb-buttons-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
    width: 100%;
}

.stb-buttons-row .stb-button {
    margin: 0 !important;
    min-width: 0;
}

.stb-buttons-row .stb-button-secondary {
    flex: 1 1 0 !important; /* Equal flex with primary */
    width: auto !important;
    max-width: none !important;
    min-width: 0;
}

.stb-buttons-row .stb-button-primary {
    flex: 1 1 0 !important; /* Equal flex with secondary */
    width: auto !important;
    max-width: none !important;
}

/* Mobile: Stack buttons vertically with Pay Now on top */
@media (max-width: 600px) {
    .stb-buttons-row {
        flex-direction: column !important; /* Changed from column-reverse */
        gap: 10px;
    }
    
    .stb-buttons-row .stb-button {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important; /* Remove flex on mobile */
    }
    
    .stb-buttons-row .stb-button-secondary {
        min-width: 100% !important;
        max-width: 100% !important;
    }
}


/* ========================================
   AUTOCOMPLETE LOADING SPINNER
   ======================================== */
.stb-autocomplete-loading {
    background-image: none !important;
    position: relative !important;
}

.stb-autocomplete-loading::after {
    content: '' !important;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: stb-autocomplete-spin 0.8s linear infinite;
}

@keyframes stb-autocomplete-spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}
/* Button Danger Style (for Cancel Booking) */
.stb-button-danger {
    background: #d63638;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.stb-button-danger:hover {
    background: #b32d2e;
}

.stb-button-danger:disabled {
    background: #dcdcde;
    cursor: not-allowed;
}

/* Manage Booking Actions */
.stb-manage-actions {
    padding: 20px;
    background: #f6f7f7;
    border-radius: 4px;
}

/* Details Header */
.stb-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.stb-details-header h2 {
    margin: 0;
    flex: 1 1 auto;
}

.stb-details-header .stb-button {
    flex: 0 0 auto;
}

/* Responsive header */
@media (max-width: 600px) {
    .stb-details-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stb-details-header .stb-button {
        width: 100%;
    }
}

/* Edit Mode Styling */
.stb-edit-mode {
    display: none;
}

.stb-edit-mode.active {
    display: block;
}

/* Amendment Notice */
.stb-amendment-notice {
    border-left: 4px solid #72aee6;
}

/* Success/Error Messages in Manage Booking */
#stb-manage-message.stb-alert-success {
    border-left: 4px solid #00a32a;
    background: #d7f0d7;
}

#stb-manage-message.stb-alert-error {
    border-left: 4px solid #d63638;
    background: #f9e0e0;
}
/* ===================================
   ADDITIONAL ITEMS / EXTRAS LAYOUT
   =================================== */

.stb-extras-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stb-extras-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.stb-extras-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stb-extra-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.2s ease;
}

.stb-extra-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.stb-extra-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.stb-extra-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.stb-extra-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.stb-extra-icon {
    font-size: 20px;
}

.stb-extra-name {
    font-weight: 500;
    color: #212529;
    font-size: 14px;
}

.stb-extra-unit-price {
    font-weight: 600;
    color: #007bff;
    font-size: 14px;
    white-space: nowrap;
}

.stb-extra-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.stb-extra-quantity-wrapper label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
    margin: 0;
}

.stb-extra-quantity {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.stb-extra-quantity:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.stb-extra-quantity:enabled {
    border-color: #007bff;
}

/* Quantity control with +/- buttons */
.stb-quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
}

.stb-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background-color: #f8f9fa;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stb-qty-btn:hover:not(:disabled) {
    background-color: #007bff;
    color: white;
}

.stb-qty-btn:active:not(:disabled) {
    background-color: #0056b3;
}

.stb-qty-btn:disabled {
    background-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

.stb-quantity-control .stb-extra-quantity {
    width: 50px;
    border: none;
    border-left: 1px solid #ced4da;
    border-right: 1px solid #ced4da;
    border-radius: 0;
    padding: 6px 8px;
    text-align: center;
    font-weight: 600;
    background-color: white;
}

.stb-quantity-control .stb-extra-quantity:disabled {
    background-color: #f8f9fa;
}


/* Mobile responsive */


/* ===================================
   PRICE SUMMARY UPDATES
   =================================== */

.stb-price-summary {
    position: sticky;
    top: 20px;
}

.stb-exchange-rate-row {
    padding: 12px 0;
    border-top: 1px solid #e9ecef;
    font-size: 13px;
    color: #6c757d;
}

.stb-price-grand-total {
    padding: 15px 0;
    border-top: 2px solid #007bff;
    font-size: 20px;
    font-weight: 700;
    color: #007bff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.stb-button-fullwidth {
    width: 100% !important;
}

.stb-buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Remove gap when only one button */
.stb-buttons-row:has(.stb-button-fullwidth) {
    gap: 0;
}
/* ===================================
   AUTOCOMPLETE DROPDOWN ICONS
   =================================== */

.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999 !important;
}

.stb-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.stb-location-icon {
    font-size: 20px;
    flex-shrink: 0;
    min-width: 24px;
    text-align: center;
}

.stb-location-name {
    font-weight: 500;
    color: #212529;
    flex: 1;
}

.stb-location-code {
    color: #6c757d;
    font-size: 13px;
    margin-left: 4px;
}

.ui-autocomplete .ui-menu-item {
    cursor: pointer;
}

.ui-autocomplete .ui-menu-item:hover {
    background-color: #f8f9fa;
}

.ui-autocomplete .ui-state-active {
    background-color: var(--stb-primary-light);
    border: none;
    color: var(--stb-gray-900);
}