/**
 * BookingCheckout Component Styles
 * 
 * Theme-independent styling for the booking checkout component.
 * Follows the same design patterns as BookingRooms and BookingExtras.
 * 
 * @package HotelMaster
 * @subpackage Components
 * @since 1.0.0
 */

/* CSS Variables - Consistent with other booking components */
:root {
    /* Primary Color Palette */
    --checkout-bg-primary: #141416;
    --checkout-bg-secondary: #1a1a1c;
    --checkout-bg-tertiary: #242428;
    
    /* Text Colors */
    --checkout-text-primary: #ffffff;
    --checkout-text-secondary: #a3a3a3;
    --checkout-text-muted: #777E90;
    
    /* Accent Colors - theme from Visual Styling when set */
    --checkout-accent-purple: var(--event-primary-color, #8b5cf6);
    --checkout-accent-purple-hover: #7c3aed;
    --checkout-accent-green: var(--event-secondary-color, var(--event-secondary-color, #4FF6B1));
    --checkout-accent-green-dark: #3de89a;
    
    /* Status Colors */
    --checkout-success: #10b981;
    --checkout-warning: #f59e0b;
    --checkout-error: #ef4444;
    --checkout-error-bg: rgba(239, 68, 68, 0.1);
    
    /* Border and Divider Colors */
    --checkout-border: #777E90;
    --checkout-border-light: rgba(119, 126, 144, 0.2);
    --checkout-divider: rgba(119, 126, 144, 0.1);
    
    /* Component Sizing */
    --checkout-border-radius: 12px;
    --checkout-border-radius-small: 8px;
    --checkout-spacing-xs: 8px;
    --checkout-spacing-sm: 12px;
    --checkout-spacing-md: 16px;
    --checkout-spacing-lg: 24px;
    --checkout-spacing-xl: 32px;
    
    /* Typography */
    --checkout-font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --checkout-font-size-xs: 11px;
    --checkout-font-size-sm: 12px;
    --checkout-font-size-base: 14px;
    --checkout-font-size-lg: 16px;
    --checkout-font-size-xl: 18px;
    --checkout-font-size-2xl: 24px;
    
    /* Transitions */
    --checkout-transition: all 0.3s ease;
    --checkout-transition-fast: all 0.2s ease;
    
    /* Shadows */
    --checkout-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --checkout-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --checkout-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Layout */
    --checkout-max-width: 1200px;
    --checkout-content-width: 800px;
    --checkout-sidebar-width: 380px;
}

/* Component Container */
.booking-checkout-wrapper {
    font-family: var(--checkout-font-family);
    color: var(--checkout-text-primary);
    background: transparent;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.booking-checkout {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

/* Progress Bar Container */
.booking-checkout__progress {
    margin-bottom: var(--checkout-spacing-xl);
}

/* Main Content Layout */
.booking-checkout__content {
    display: grid;
    grid-template-columns: 1fr var(--checkout-sidebar-width);
    gap: var(--checkout-spacing-xl);
    align-items: start;
    margin-bottom: 10%;
}

.booking-checkout__content-payment-finished {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.booking-checkout__main {
    display: flex;
    flex-direction: column;
    gap: var(--checkout-spacing-lg);
}

.booking-checkout__sidebar {
    position: sticky;
    top: var(--checkout-spacing-lg);
}

/* Section Styling */
.checkout-section {
    background: #242428;
    border: 1px solid #777E90;
    border-radius: 12px;
    padding: 20px;
    transition: var(--checkout-transition);
    margin-bottom: 24px;
}

.checkout-section:last-child {
    margin-bottom: 0;
}

.checkout-section:hover {
    border-color: var(--checkout-accent-purple);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.checkout-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(119, 126, 144, 0.2);
}

.checkout-section__title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.checkout-section__subtitle {
    font-size: 12px;
    color: #a3a3a3;
    margin: 4px 0 0 0;
    line-height: 1.4;
}

.checkout-section__meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--checkout-text-secondary);
    line-height: 1.4;
}

.meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.meta-item span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-separator {
    color: var(--checkout-border);
    font-weight: 300;
}

.meta-hotel span {
    color: var(--checkout-text-primary);
    font-weight: 500;
}

.checkout-section__content {
    display: flex;
    flex-direction: column;
    gap: var(--checkout-spacing-md);
}

/* Form Elements */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: var(--checkout-spacing-md);
}

.booking-checkout-wrapper .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--checkout-spacing-xs);
}

.booking-checkout-wrapper .form-group--inline {
    flex-direction: row;
    align-items: center;
    gap: var(--checkout-spacing-sm);
}

.booking-checkout-wrapper .form-label {
    font-size: var(--checkout-font-size-sm);
    font-weight: 600;
    color: var(--checkout-text-primary);
    margin: 0;
}

.booking-checkout-wrapper .form-label--required::after {
    content: " *";
    color: var(--checkout-error);
}

html .booking-checkout-wrapper .form-input,
html .booking-checkout-wrapper input[type="text"],
html .booking-checkout-wrapper input[type="email"],
html .booking-checkout-wrapper input[type="tel"],
html .booking-checkout-wrapper input[type="password"],
html .booking-checkout-wrapper textarea,
html .booking-checkout-wrapper select {
    font-family: var(--checkout-font-family);
    font-size: var(--checkout-font-size-base);
    padding: var(--checkout-spacing-sm) var(--checkout-spacing-md);
    border: 1px solid var(--checkout-border);
    border-radius: var(--checkout-border-radius-small);
    background: var(--checkout-bg-primary);
    color: var(--checkout-text-primary);
    transition: var(--checkout-transition-fast);
}

html .booking-checkout-wrapper .form-input:focus,
html .booking-checkout-wrapper input[type="text"]:focus,
html .booking-checkout-wrapper input[type="email"]:focus,
html .booking-checkout-wrapper input[type="tel"]:focus,
html .booking-checkout-wrapper input[type="password"]:focus,
html .booking-checkout-wrapper textarea:focus,
html .booking-checkout-wrapper select:focus {
    outline: none;
    border-color: var(--checkout-accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

html .booking-checkout-wrapper .form-input::placeholder,
html .booking-checkout-wrapper input::placeholder,
html .booking-checkout-wrapper textarea::placeholder {
    color: var(--checkout-text-muted);
}

.booking-checkout-wrapper .form-input--error {
    border-color: var(--checkout-error);
    background: var(--checkout-error-bg);
}

.booking-checkout-wrapper .form-error {
    font-size: var(--checkout-font-size-xs);
    color: var(--checkout-error);
    margin: 0;
}

.booking-checkout-wrapper .form-help {
    font-size: var(--checkout-font-size-xs);
    color: var(--checkout-text-secondary);
    margin: 0;
}

/* Checkbox and Radio Styling */
.booking-checkout-wrapper .form-checkbox,
.booking-checkout-wrapper .form-radio {
    display: flex;
    align-items: flex-start;
    gap: var(--checkout-spacing-sm);
    cursor: pointer;
}

.booking-checkout-wrapper .form-checkbox input,
.booking-checkout-wrapper .form-radio input {
    margin: 0;
    margin-top: 2px;
}

.booking-checkout-wrapper .form-checkbox label,
.booking-checkout-wrapper .form-radio label {
    font-size: var(--checkout-font-size-sm);
    color: var(--checkout-text-secondary);
    cursor: pointer;
    line-height: 1.4;
}

/* Button Styling */
.checkout-btn {
    font-family: var(--checkout-font-family);
    font-size: var(--checkout-font-size-base);
    font-weight: 600;
    padding: var(--checkout-spacing-md) var(--checkout-spacing-lg);
    border: none;
    border-radius: var(--checkout-border-radius-small);
    cursor: pointer;
    transition: var(--checkout-transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--checkout-spacing-xs);
    line-height: 1;
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkout-btn--primary {
    background: linear-gradient(135deg, var(--event-secondary-color, #4FF6B1) 0%, #3de89a 100%);
    color: #000000;
    font-weight: 700;
}

.checkout-btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 246, 177, 0.3);
}

.checkout-btn--secondary {
    background: #242428;
    color: #a3a3a3;
    border: 1px solid #777E90;
}

.checkout-btn--secondary:hover:not(:disabled) {
    background: #1a1a1c;
    color: #ffffff;
    border-color: #8b5cf6;
}

.checkout-btn--danger {
    background: var(--checkout-error);
    color: white;
}

.checkout-btn--danger:hover:not(:disabled) {
    background: #dc2626;
}

/* Loading States */
.checkout-loading {
    display: inline-flex;
    align-items: center;
    gap: var(--checkout-spacing-xs);
}

.checkout-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: checkout-spin 1s linear infinite;
}

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

/* Error States */
.checkout-error-fallback {
    background: var(--checkout-error-bg);
    border: 1px solid var(--checkout-error);
    border-radius: var(--checkout-border-radius);
    padding: var(--checkout-spacing-lg);
    text-align: center;
}

.checkout-error-fallback h3 {
    color: var(--checkout-error);
    margin: 0 0 var(--checkout-spacing-md) 0;
}

.checkout-error-fallback .primary-error {
    color: var(--checkout-text-primary);
    margin: 0 0 var(--checkout-spacing-md) 0;
}

.checkout-error-fallback .error-list {
    text-align: left;
    margin: var(--checkout-spacing-md) 0;
    padding-left: var(--checkout-spacing-lg);
}

.checkout-error-fallback .error-list li {
    color: var(--checkout-text-secondary);
    margin-bottom: var(--checkout-spacing-xs);
}

/* Fallback Component Styling */
.checkout-summary-fallback,
.checkout-contact-fallback,
.checkout-payment-fallback,
.checkout-terms-fallback,
.checkout-actions-fallback {
    background: var(--checkout-bg-secondary);
    border: 1px solid var(--checkout-border);
    border-radius: var(--checkout-border-radius);
    padding: var(--checkout-spacing-lg);
}

.checkout-summary-fallback h3,
.checkout-contact-fallback h3,
.checkout-payment-fallback h3 {
    color: var(--checkout-text-primary);
    margin: 0 0 var(--checkout-spacing-md) 0;
    font-size: var(--checkout-font-size-xl);
    font-weight: 700;
}

/* Summary Fallback */
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--checkout-spacing-sm) 0;
    border-bottom: 1px solid var(--checkout-border-light);
}

.summary-item:last-child {
    border-bottom: none;
}

.item-name {
    color: var(--checkout-text-secondary);
}

.item-price {
    color: var(--checkout-text-primary);
    font-weight: 600;
}

.summary-total {
    margin-top: var(--checkout-spacing-md);
    padding-top: var(--checkout-spacing-md);
    border-top: 2px solid var(--checkout-border);
    text-align: right;
    color: var(--checkout-accent-green);
    font-size: var(--checkout-font-size-lg);
}

/* Contact Form Fallback */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--checkout-spacing-md);
}

/* Actions Fallback */
.actions-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--checkout-spacing-md);
}

.btn-back {
    background: var(--checkout-bg-tertiary);
    color: var(--checkout-text-secondary);
    padding: var(--checkout-spacing-md) var(--checkout-spacing-lg);
    border-radius: var(--checkout-border-radius-small);
    text-decoration: none;
    font-weight: 600;
    transition: var(--checkout-transition-fast);
}

.btn-back:hover {
    background: var(--checkout-bg-primary);
    color: var(--checkout-text-primary);
}

.btn-complete-booking {
    background: linear-gradient(135deg, var(--checkout-accent-green) 0%, var(--checkout-accent-green-dark) 100%);
    color: #000000;
    padding: var(--checkout-spacing-md) var(--checkout-spacing-xl);
    border: none;
    border-radius: var(--checkout-border-radius-small);
    font-weight: 700;
    font-size: var(--checkout-font-size-lg);
    cursor: pointer;
    transition: var(--checkout-transition-fast);
}

.btn-complete-booking:hover {
    transform: translateY(-1px);
    box-shadow: var(--checkout-shadow-md);
}

.btn-return {
    background: var(--checkout-accent-purple);
    color: white;
    padding: var(--checkout-spacing-md) var(--checkout-spacing-lg);
    border-radius: var(--checkout-border-radius-small);
    text-decoration: none;
    font-weight: 600;
    transition: var(--checkout-transition-fast);
}

.btn-return:hover {
    background: var(--checkout-accent-purple-hover);
    transform: translateY(-1px);
}

/* Terms Fallback */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--checkout-spacing-sm);
    margin-top: var(--checkout-spacing-md);
}

.terms-checkbox input {
    margin-top: 2px;
}

.terms-checkbox label {
    font-size: var(--checkout-font-size-sm);
    color: var(--checkout-text-secondary);
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .booking-checkout__content {
        grid-template-columns: 1fr;
        gap: var(--checkout-spacing-lg);
    }
    
    .booking-checkout__sidebar {
        position: static;
        order: -1; /* Show summary first on mobile */
    }

    .booking-checkout__content-payment-finished {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .booking-checkout {
        padding: var(--checkout-spacing-md);
    }
    
    .checkout-section {
        padding: var(--checkout-spacing-md);
    }
    
    .checkout-section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--checkout-spacing-xs);
    }
    
    .actions-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-complete-booking,
    .btn-back {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .booking-checkout {
        padding: var(--checkout-spacing-sm);
    }
    
    .checkout-section {
        padding: var(--checkout-spacing-sm);
    }
    
    .checkout-section__title {
        font-size: var(--checkout-font-size-lg);
    }
    
    .form-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Print Styles */
@media print {
    .booking-checkout-wrapper {
        background: white !important;
        color: black !important;
    }
    
    .checkout-btn,
    .checkout-section__header button {
        display: none !important;
    }
    
    .checkout-section {
        border: 1px solid #ccc !important;
        background: white !important;
        break-inside: avoid;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --checkout-border: #ffffff;
        --checkout-text-secondary: #cccccc;
        --checkout-bg-secondary: #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .checkout-btn:hover {
        transform: none !important;
    }
}

/* Charges Breakdown Dropdown Sections */
.order-wrap-title {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 0;
    font-weight: 600;
    font-size: 14px;
    color: var(--checkout-text-primary);
    -webkit-user-select: none;
    user-select: none;
    transition: color 0.2s ease;
}

.order-wrap-title:hover {
    color: var(--checkout-accent);
}

.order-wrap-title i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.order-wrap-container {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.order-wrap.order-subtotal {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}

.fee-subtotal-title,
.fee-subtotal-text {
    font-weight: 600;
    font-size: 16px;
    color: var(--checkout-text-primary);
}

/* High-level Summary Styling */
.summary-high-level {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 14px;
    color: #a3a3a3;
    padding: 10px 0;
    gap: 12px;
}

.summary-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 500;
    color: var(--checkout-text-primary);
}

.summary-detail {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--checkout-text-secondary);
    opacity: 0.8;
    margin-top: 2px;
}

.summary-value {
    font-weight: 600;
    color: #ffffff;
    font-size: 15px;
    white-space: nowrap;
}

.summary-subtotal {
    border-top: 1px solid rgba(119, 126, 144, 0.2);
    margin-top: 4px;
    padding-top: 12px;
}

.summary-subtotal .summary-label {
    font-weight: 600;
}

.summary-total {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    border-top: 2px solid rgba(119, 126, 144, 0.3);
    padding-top: 16px;
    margin-top: 12px;
}

.summary-total .summary-label {
    font-size: 15px;
    font-weight: 700;
}

.summary-total .summary-value {
    color: var(--event-secondary-color, #4FF6B1);
    font-size: 20px;
    font-weight: 700;
}

.view-breakdown-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: transparent;
    border: 1px solid #777E90;
    border-radius: 8px;
    color: #a3a3a3;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-breakdown-btn:hover {
    background: rgba(119, 126, 144, 0.1);
    border-color: #a3a3a3;
    color: #ffffff;
}

.view-breakdown-btn .btn-icon {
    transition: transform 0.3s ease;
}

.summary-detailed {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(119, 126, 144, 0.2);
}

/* Terms Agreement Checkbox Styling */
.terms-agreement-container {
    padding: var(--checkout-spacing-lg);
}

.terms-agreement-label {
    display: flex;
    align-items: flex-start;
    gap: var(--checkout-spacing-sm);
    cursor: pointer;
    color: var(--checkout-text-secondary) !important;
    font-size: var(--checkout-font-size-sm) !important;
    line-height: 1.6;
}

.terms-agreement-checkbox {
    appearance: auto !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    border-radius: 3px !important;
    accent-color: var(--event-secondary-color, #4FF6B1) !important;
    transform: none !important;
    display: inline-block !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    cursor: pointer;
    flex-shrink: 0;
}

.terms-agreement-checkbox:hover {
    border-color: rgba(255, 255, 255, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.terms-agreement-checkbox:checked {
    background-color: var(--event-secondary-color, #4FF6B1) !important;
    border-color: var(--event-secondary-color, #4FF6B1) !important;
}

.terms-agreement-text {
    color: var(--checkout-text-secondary) !important;
    flex: 1;
}

.terms-agreement-text a {
    color: var(--event-secondary-color, #4FF6B1) !important;
    text-decoration: underline;
    transition: var(--checkout-transition-fast);
}

.terms-agreement-text a:hover {
    color: #3de89a !important;
    text-decoration: none;
}

.server-validation-error {
    color: var(--checkout-error);
    font-size: var(--checkout-font-size-xs);
    margin-top: var(--checkout-spacing-xs);
    padding: var(--checkout-spacing-xs) var(--checkout-spacing-sm);
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--checkout-error);
    border-radius: 4px;
}

.terms-version {
    color: var(--checkout-text-muted);
    font-size: var(--checkout-font-size-xs);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Charges Breakdown Styling */
.charges-breakdown-section {
    /* Inherits from .checkout-section */
}

.checkout-sidebar-breakdown {
    position: sticky;
    top: 24px;
}

.charges-wrapper {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(119, 126, 144, 0.2);
    border-radius: 0;
    padding: 16px 0;
    margin-bottom: 0;
}

.charges-wrapper:last-child {
    border-bottom: none;
}

.charges-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
}

/* Room Group Breakdown */
.room-group-breakdown {
    padding: 20px 0 !important;
}

.room-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(119, 126, 144, 0.15);
}

.room-group-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.room-group-title h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--checkout-text-primary);
    margin: 0;
    line-height: 1.3;
}

.room-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--checkout-accent-purple);
}

.room-group-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--checkout-text-primary);
}

.room-group-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-item-label {
    font-size: 12px;
    color: var(--checkout-text-secondary);
    font-weight: 400;
}

.summary-item-value {
    font-size: 15px;
    color: var(--checkout-text-primary);
    font-weight: 600;
}

.toggle-nightly-rates {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: rgba(119, 126, 144, 0.08);
    border: 1px solid rgba(119, 126, 144, 0.15);
    border-radius: 8px;
    color: var(--checkout-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-nightly-rates:hover {
    background: rgba(119, 126, 144, 0.12);
    border-color: rgba(119, 126, 144, 0.25);
    color: var(--checkout-text-primary);
}

.toggle-nightly-rates .toggle-icon {
    transition: transform 0.2s ease;
}

.toggle-nightly-rates.active .toggle-icon {
    transform: rotate(180deg);
}

.toggle-nightly-rates.active .toggle-text::before {
    content: 'Hide ';
}

.nightly-rates-detail {
    margin-top: 16px;
    padding: 16px;
    background: rgba(26, 26, 28, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(119, 126, 144, 0.1);
}

.nightly-rate-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    font-size: 14px;
}

.nightly-rate-line:not(:last-child) {
    border-bottom: 1px solid rgba(119, 126, 144, 0.08);
}

.rate-date {
    color: var(--checkout-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rate-note {
    font-size: 11px;
    color: var(--checkout-text-muted);
    font-style: italic;
}

.rate-price {
    color: var(--checkout-text-primary);
    font-weight: 600;
}

/* Mobile responsiveness for room groups */
@media (max-width: 768px) {
    .room-group-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .room-group-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

.charges-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.charge-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #a3a3a3;
}

.charge-line span:last-child {
    font-weight: 500;
    color: #ffffff;
}

.charge-line.charge-subtotal {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(119, 126, 144, 0.2);
}

.charge-label-bold {
    font-weight: 600;
    color: #ffffff !important;
}

.charge-value-bold {
    font-weight: 600;
    color: var(--event-secondary-color, #4FF6B1) !important;
}

.charge-line.charge-grand-total {
    padding-top: 16px;
    margin-top: 12px;
    border-top: 2px solid rgba(119, 126, 144, 0.3);
}

.charge-label-grand {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff !important;
}

.charge-value-grand {
    font-size: 18px;
    font-weight: 700;
    color: var(--event-secondary-color, #4FF6B1) !important;
}

/* Sidebar Summary Styling */
.checkout-summary-sticky {
    position: sticky;
    top: 24px;
}

.summary-items {
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--checkout-border-light, rgba(119, 126, 144, 0.2));
}

.summary-item:last-child {
    border-bottom: none;
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.item-name {
    font-size: 14px;
    color: var(--checkout-text-primary, #ffffff);
    font-weight: 500;
}

.item-dates {
    font-size: 12px;
    color: var(--checkout-text-secondary, #a3a3a3);
}

.item-price {
    font-size: 14px;
    color: var(--checkout-text-primary, #ffffff);
    font-weight: 600;
    margin-left: 12px;
}

.summary-totals {
    padding-top: 16px;
    border-top: 2px solid var(--checkout-border, #777E90);
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.total-line span:first-child {
    color: var(--checkout-text-secondary, #a3a3a3);
}

.total-line span:last-child {
    color: var(--checkout-text-primary, #ffffff);
    font-weight: 500;
}

.total-line--final {
    font-size: 16px;
    font-weight: 700;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--checkout-border-light, rgba(119, 126, 144, 0.2));
}

.total-line--final span:last-child {
    color: var(--checkout-accent-green, var(--event-secondary-color, #4FF6B1));
}

.security-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--checkout-border-light, rgba(119, 126, 144, 0.2));
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--checkout-text-secondary, #a3a3a3);
}

.security-badge i {
    color: var(--checkout-accent-green, var(--event-secondary-color, #4FF6B1));
    width: 16px;
    text-align: center;
}

/* Message Styling */
.checkout-message {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
}

.checkout-message--success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
}

.checkout-message--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.checkout-message--info {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid #8b5cf6;
    color: #8b5cf6;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .checkout-summary-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .item-price {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .security-badges {
        flex-direction: row;
        justify-content: space-around;
    }
}

/* Extra Selection Details Styling */
.cart-extra-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.extra-name-wrapper {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.extra-details {
    color: var(--checkout-text-secondary);
    font-size: 0.9em;
    font-weight: 500;
    font-style: italic;
}

.extra-quantity {
    color: var(--checkout-text-muted);
    font-size: 0.9em;
}

.extra-price {
    font-weight: 600;
    white-space: nowrap;
}

/* Type-specific detail styling */
.cart-extra-item[data-extra-type="sized"] .extra-details {
    color: var(--checkout-accent-purple);
}

.cart-extra-item[data-extra-type="shuttle"] .extra-details {
    color: var(--checkout-accent-green);
}

.cart-extra-item[data-extra-type="time_slot"] .extra-details {
    color: var(--checkout-warning);
}

.cart-extra-item[data-extra-type="multi_option"] .extra-details {
    color: var(--checkout-success);
}

/* Payment Page Layout */
.booking-checkout__payment-page-wrapper {
    max-width: var(--checkout-max-width);
    margin: 0 auto;
    padding: var(--checkout-spacing-xl) var(--checkout-spacing-lg);
}

.booking-checkout__payment-layout {
    display: grid;
    grid-template-columns: 1fr var(--checkout-sidebar-width);
    gap: var(--checkout-spacing-xl);
    align-items: start;
}

.booking-checkout__payment-form-col {
    display: flex;
    flex-direction: column;
    gap: var(--checkout-spacing-lg);
}

/* Ensure booking summary uses dark theme on payment page */
.booking-summary-wrapper {
    background: var(--summary-bg-secondary, #1a1a1c) !important;
    border: 1px solid var(--summary-border, #777E90) !important;
    border-radius: var(--summary-border-radius, 12px) !important;
    padding: 0 !important;
}

.booking-summary-wrapper h3 {
    color: var(--checkout-text-primary, #ffffff) !important;
    margin: 0 0 var(--checkout-spacing-md) 0 !important;
}

/* Payment page responsive */
@media (max-width: 1024px) {
    .booking-checkout__payment-layout {
        grid-template-columns: 1fr;
        gap: var(--checkout-spacing-lg);
    }
    
    .booking-summary-sidebar {
        order: -1; /* Show summary first on mobile */
    }
}

@media (max-width: 768px) {
    .booking-checkout__payment-page-wrapper {
        padding: var(--checkout-spacing-md);
    }
}

body:has([data-step="4"]) #booking-cart-widget,
body:has([data-step="4"]) .booking-cart-widget,
body:has(.payment-step-container) #booking-cart-widget,
body:has(.payment-step-container) .booking-cart-widget {
    display: none !important;
}

.card_container #payment-form,
.card_container #card-form {
    max-width: 100%;
}

.card_container #payment-form > .row:nth-of-type(1),
.card_container #card-form > .row:nth-of-type(1) {
    display: block !important;
    grid-template-columns: unset !important;
    width: 100% !important;
}

.card_container #payment-form > .row:nth-of-type(2),
.card_container #card-form > .row:nth-of-type(2) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px;
    width: 100% !important;
}

.card_container #payment-form > .row:nth-of-type(2) label,
.card_container #card-form > .row:nth-of-type(2) label {
    display: block !important;
    margin-bottom: 8px !important;
}

.card_container #payment-form > .row:nth-of-type(2) input,
.card_container #card-form > .row:nth-of-type(2) input {
    width: 100% !important;
    box-sizing: border-box !important;
}

.card_container #payment-form > .row:nth-of-type(3),
.card_container #card-form > .row:nth-of-type(3) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px;
    width: 100% !important;
}

.card_container #payment-form > .row:nth-of-type(3) label,
.card_container #card-form > .row:nth-of-type(3) label {
    display: block !important;
    margin-bottom: 8px !important;
}

.card_container #payment-form > .row:nth-of-type(3) input,
.card_container #card-form > .row:nth-of-type(3) input {
    width: 100% !important;
    box-sizing: border-box !important;
}

.card_container #payment-form > .row:nth-of-type(4),
.card_container #card-form > .row:nth-of-type(4) {
    display: inline-block !important;
    grid-template-columns: unset !important;
    width: calc(50% - 8px) !important;
    vertical-align: top;
}

.card_container #payment-form > .row:nth-of-type(4) .field-container,
.card_container #card-form > .row:nth-of-type(4) .field-container {
    width: 100%;
}

.card_container #payment-form > .row:nth-of-type(4) label,
.card_container #card-form > .row:nth-of-type(4) label {
    display: block !important;
    margin-bottom: 8px !important;
}

.card_container #payment-form > .row:nth-of-type(4) select,
.card_container #card-form > .row:nth-of-type(4) select,
.card_container #payment-form #card-billing-address-country,
.card_container #card-form #card-billing-address-country,
.card_container #payment-form .address-field.country-select select,
.card_container #card-form .address-field.country-select select,
.card_container #payment-form .field-container.country-select select,
.card_container #card-form .field-container.country-select select,
.booking-checkout__main .card_container #payment-form #card-billing-address-country,
.booking-checkout__main .card_container #card-form #card-billing-address-country {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 40px 12px 16px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: #242428 !important;
    background-color: #242428 !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    color: #ffffff !important;
    border-color: #777E90 !important;
}

.card_container #payment-form > .row:nth-of-type(4) select:focus,
.card_container #card-form > .row:nth-of-type(4) select:focus,
.card_container #payment-form #card-billing-address-country:focus,
.card_container #card-form #card-billing-address-country:focus,
.card_container #payment-form .address-field.country-select select:focus,
.card_container #card-form .address-field.country-select select:focus,
.booking-checkout__main .card_container #payment-form #card-billing-address-country:focus,
.booking-checkout__main .card_container #card-form #card-billing-address-country:focus {
    background: #323235 !important;
    background-color: #323235 !important;
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
}

.card_container #payment-form > .row:nth-of-type(4) select:hover,
.card_container #card-form > .row:nth-of-type(4) select:hover,
.card_container #payment-form #card-billing-address-country:hover,
.card_container #card-form #card-billing-address-country:hover,
.booking-checkout__main .card_container #payment-form #card-billing-address-country:hover,
.booking-checkout__main .card_container #card-form #card-billing-address-country:hover {
    background: #242428 !important;
    background-color: #242428 !important;
}

.card_container #payment-form > .row:nth-of-type(4) select option,
.card_container #card-form > .row:nth-of-type(4) select option,
.card_container #payment-form #card-billing-address-country option,
.card_container #card-form #card-billing-address-country option,
.booking-checkout__main .card_container #payment-form #card-billing-address-country option,
.booking-checkout__main .card_container #card-form #card-billing-address-country option {
    background: #242428 !important;
    background-color: #242428 !important;
    color: #ffffff !important;
}

.card_container #payment-form #card-billing-address-country[value],
.card_container #card-form #card-billing-address-country[value],
.card_container #payment-form .address-field.country-select select[value],
.card_container #card-form .address-field.country-select select[value],
.booking-checkout__main .card_container #payment-form #card-billing-address-country[value],
.booking-checkout__main .card_container #card-form #card-billing-address-country[value] {
    background: #242428 !important;
    background-color: #242428 !important;
    color: #ffffff !important;
}

.card_container #payment-form #card-billing-address-country,
.card_container #card-form #card-billing-address-country {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: #242428 !important;
    background-color: #242428 !important;
    color: #ffffff !important;
}

.card_container #payment-form > .row:nth-of-type(5),
.card_container #card-form > .row:nth-of-type(5) {
    display: block !important;
    grid-template-columns: unset !important;
    width: 100% !important;
    clear: both;
}

.card_container #payment-form .gdlr-form-term-and-agreement,
.card_container #card-form .gdlr-form-term-and-agreement {
    margin-bottom: 0 !important;
}

.card_container #card-element,
.card_container #card-information-section #card-element,
#card-element {
    font-family: 'DM Sans', 'Roboto', 'Open Sans', 'Segoe UI', sans-serif !important;
}

.card_container #card-element, .card_container #card-information-section #card-element:focus, #card-element:focus {
    border-color: var(--checkout-accent-purple);
}

.card_container,
.card_container *:not(iframe) {
    font-family: 'DM Sans', 'Roboto', 'Open Sans', 'Segoe UI', sans-serif;
}
/* Pay Now form: Skip Payment left-aligned, label 14px */
form#payment-form .admin-skip-payment-wrapper {
    margin-left: -15px !important;
    margin-top: 12px !important;
    text-align: left !important;
}
form#payment-form .admin-skip-payment-wrapper span.admin-skip-payment-label {
    text-align: left !important;
    font-size: 14px !important;
}
#card-container-stripe,
#card-information-section {
    font-family: 'DM Sans', 'Roboto', 'Open Sans', 'Segoe UI', sans-serif !important;
}

.card_container #payment-form #card-button,
.card_container #card-form #card-button {
    display: block !important;
    margin-top: 24px !important;
    margin-left: -15px !important;
    margin-right: auto !important;
    min-width: 200px !important;
    padding: 14px 32px !important;
    position: relative !important;
    left: 0 !important;
}

@media (max-width: 768px) {
    .card_container #payment-form > .row:nth-of-type(2),
    .card_container #card-form > .row:nth-of-type(2),
    .card_container #payment-form > .row:nth-of-type(3),
    .card_container #card-form > .row:nth-of-type(3) {
        grid-template-columns: 1fr !important;
        gap: var(--checkout-spacing-md);
    }

    .card_container #payment-form > .row:nth-of-type(4),
    .card_container #card-form > .row:nth-of-type(4) {
        display: block !important;
        width: 100% !important;
    }
    
    .card_container #payment-form #card-button,
    .card_container #card-form #card-button {
        width: 100% !important;
    }
}

.booking-checkout__main .booking-checkout__content-payment-finished .card_container #payment-form .address-field.country-select.field-container #card-billing-address-country,
.booking-checkout__main .booking-checkout__content-payment-finished .card_container #payment-form #card-billing-address-country,
.booking-checkout__main .card_container #payment-form .address-field.country-select.field-container #card-billing-address-country,
.booking-checkout__main .card_container #payment-form #card-billing-address-country {
    background: #242428 !important;
    background-color: #242428 !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"), #242428 !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    color: #ffffff !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.card_container #payment-form #card-billing-address-country:-webkit-autofill,
.card_container #card-form #card-billing-address-country:-webkit-autofill,
.card_container #payment-form .address-field.country-select select:-webkit-autofill,
.card_container #card-form .address-field.country-select select:-webkit-autofill,
.booking-checkout__main .card_container #payment-form #card-billing-address-country:-webkit-autofill,
.booking-checkout__main .card_container #card-form #card-billing-address-country:-webkit-autofill,
.booking-checkout__main .booking-checkout__content-payment-finished .card_container #payment-form #card-billing-address-country:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #242428 inset !important;
    box-shadow: 0 0 0 1000px #242428 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    background: #242428 !important;
    background-color: #242428 !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"), #242428 !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    color: #ffffff !important;
}

.card_container #payment-form #card-billing-address-country:-webkit-autofill:hover,
.card_container #card-form #card-billing-address-country:-webkit-autofill:hover,
.card_container #payment-form .address-field.country-select select:-webkit-autofill:hover,
.card_container #card-form .address-field.country-select select:-webkit-autofill:hover,
.booking-checkout__main .card_container #payment-form #card-billing-address-country:-webkit-autofill:hover,
.booking-checkout__main .card_container #card-form #card-billing-address-country:-webkit-autofill:hover {
    -webkit-box-shadow: 0 0 0 1000px #242428 inset !important;
    box-shadow: 0 0 0 1000px #242428 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    background: #242428 !important;
    background-color: #242428 !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"), #242428 !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    color: #ffffff !important;
}

.card_container #payment-form #card-billing-address-country:-webkit-autofill:focus,
.card_container #card-form #card-billing-address-country:-webkit-autofill:focus,
.card_container #payment-form .address-field.country-select select:-webkit-autofill:focus,
.card_container #card-form .address-field.country-select select:-webkit-autofill:focus,
.booking-checkout__main .card_container #payment-form #card-billing-address-country:-webkit-autofill:focus,
.booking-checkout__main .card_container #card-form #card-billing-address-country:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #323235 inset, 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
    box-shadow: 0 0 0 1000px #323235 inset, 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
    -webkit-text-fill-color: #ffffff !important;
    background: #323235 !important;
    background-color: #323235 !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"), #323235 !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    color: #ffffff !important;
    border-color: #8b5cf6 !important;
}


/* Team Manager Reassurance */
.team-manager-reassurance {
    margin-top: 12px;
    padding: 12px;
    background: rgba(79, 246, 177, 0.05);
    border-radius: 6px;
}

.team-manager-reassurance p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--checkout-accent-green, var(--event-secondary-color, #4FF6B1));
}
