/**
 * Booking Widget Styles - 3-Step Design
 *
 * Mobile-first responsive design for bike rental booking.
 */

/* =============================================================================
   CSS Variables
   ============================================================================= */
:root {
    --bw-primary: #FE5100;
    --bw-primary-hover: #e54900;
    --bw-primary-light: rgba(254, 81, 0, 0.1);
    --bw-secondary: #64748b;
    --bw-success: #22c55e;
    --bw-success-light: #dcfce7;
    --bw-error: #ef4444;
    --bw-error-light: #fee2e2;
    --bw-warning: #f59e0b;
    --bw-warning-light: #fef3c7;
    --bw-background: #f8fafc;
    --bw-surface: #ffffff;
    --bw-border: #e2e8f0;
    --bw-text: #1e293b;
    --bw-text-secondary: #64748b;
    --bw-text-muted: #94a3b8;
    --bw-radius: 12px;
    --bw-radius-sm: 8px;
    --bw-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --bw-shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --bw-shadow-xl: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --bw-transition: 0.2s ease;
}

/* =============================================================================
   Base Styles
   ============================================================================= */
.booking-widget {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 120px; /* Space for sticky bar */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--bw-text);
}

/* =============================================================================
   Progress Stepper
   ============================================================================= */
.booking-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px;
    margin-bottom: 24px;
    background: var(--bw-surface);
    border-radius: var(--bw-radius);
    box-shadow: var(--bw-shadow);
    position: sticky;
    top: 60px;
    z-index: 100;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    transition: all var(--bw-transition);
    cursor: default;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bw-border);
    color: var(--bw-text-secondary);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--bw-transition);
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--bw-text-secondary);
    transition: all var(--bw-transition);
}

.step.active .step-number {
    background: var(--bw-primary);
    color: white;
}

.step.active .step-label {
    color: var(--bw-text);
    font-weight: 600;
}

.step.completed .step-number {
    background: var(--bw-success);
    color: white;
}

.step.completed .step-number::before {
    content: "✓";
}

.step.completed .step-label {
    color: var(--bw-success);
}

/* Clickable completed steps */
.step.completed {
    cursor: pointer;
}

.step.completed:hover {
    background: var(--bw-success-light);
}

.step-connector {
    width: 40px;
    height: 2px;
    background: var(--bw-border);
    margin: 0 4px;
    transition: background var(--bw-transition);
}

.step-connector.completed {
    background: var(--bw-success);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
}

.lang-btn {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--bw-border);
    background: transparent;
    color: var(--bw-text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--bw-transition);
    line-height: 1;
}

.lang-btn:hover {
    background: var(--bw-primary-light);
    color: var(--bw-primary);
    border-color: var(--bw-primary);
}

.lang-btn.active {
    background: var(--bw-primary);
    color: white;
    border-color: var(--bw-primary);
}

/* Reset Link */
.reset-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--bw-text-muted);
    text-decoration: none;
    transition: color var(--bw-transition);
}

.reset-link:hover {
    color: var(--bw-error);
    text-decoration: underline;
}

/* =============================================================================
   Booking Steps
   ============================================================================= */
.booking-step {
    animation: fadeIn 0.3s ease;
}

.booking-step.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 24px;
}

.step-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--bw-text);
}

.step-subtitle {
    color: var(--bw-text-secondary);
    font-size: 16px;
    margin: 0;
}

/* =============================================================================
   Guest Type Selector (inside date-picker-card)
   ============================================================================= */
.guest-type-section {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bw-border);
}

.guest-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.guest-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--bw-text);
}

.guest-toggle-label svg {
    color: var(--bw-text-secondary);
    flex-shrink: 0;
}

.guest-toggle .toggle-switch input:checked + .toggle-slider {
    background-color: var(--bw-primary);
}

.accommodation-ref-field {
    margin-top: 10px;
}

.accommodation-ref-row {
    display: flex;
    gap: 8px;
}

.accommodation-ref-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius-sm);
    font-size: 15px;
    transition: border-color var(--bw-transition);
}

.accommodation-ref-row input:focus {
    outline: none;
    border-color: var(--bw-primary);
    box-shadow: 0 0 0 3px var(--bw-primary-light);
}

.accommodation-ref-row .btn-outline {
    padding: 8px 14px;
    border: 1px solid var(--bw-primary);
    color: var(--bw-primary);
    background: transparent;
    border-radius: var(--bw-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--bw-transition);
}

.accommodation-ref-row .btn-outline:hover {
    background: var(--bw-primary);
    color: white;
}

.accommodation-status {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--bw-radius-sm);
    font-size: 13px;
}

.accommodation-status.success {
    background: var(--bw-success-light);
    color: #166534;
}

.accommodation-status.error {
    background: var(--bw-error-light);
    color: #991b1b;
}

.accommodation-status.warning {
    background: #fef3c7;
    color: #92400e;
}

/* =============================================================================
   Compact Date Picker (Step 1)
   ============================================================================= */
.date-picker-card {
    background: var(--bw-surface);
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius);
    padding: 16px;
    margin-bottom: 20px;
}

.date-picker-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.date-field-compact {
    flex: 1;
    min-width: 180px;
}

.date-field-compact label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--bw-text-secondary);
    margin-bottom: 8px;
}

.date-field-compact input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius-sm);
    font-size: 15px;
    margin-bottom: 8px;
    transition: border-color var(--bw-transition), box-shadow var(--bw-transition);
    /* iOS Safari override */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: var(--bw-surface);
}

.date-field-compact input[type="date"]:focus {
    outline: none;
    border-color: var(--bw-primary);
    box-shadow: 0 0 0 3px var(--bw-primary-light);
}

.slot-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius-sm);
    font-size: 13px;
    color: var(--bw-text-secondary);
    background: var(--bw-background);
}

.date-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bw-text-muted);
    padding-bottom: 50px;
}

.rental-days-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: var(--bw-primary-light);
    border-radius: var(--bw-radius-sm);
    margin-bottom: 8px;
}

.rental-days-badge span {
    font-size: 16px;
    font-weight: 700;
    color: var(--bw-primary);
}

.slot-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bw-warning-light);
    border: 1px solid var(--bw-warning);
    border-radius: var(--bw-radius-sm);
    color: #92400e;
    margin-top: 16px;
    font-size: 14px;
}

/* =============================================================================
   Category Tabs
   ============================================================================= */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 0 4px;
}

.category-tabs-row {
    display: contents;
}

.category-tab {
    padding: 10px 20px;
    background: var(--bw-surface);
    border: 1px solid var(--bw-border);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--bw-transition);
}

.category-tab:hover {
    border-color: var(--bw-primary);
    color: var(--bw-primary);
}

.category-tab.active {
    background: var(--bw-primary);
    color: white;
    border-color: var(--bw-primary);
}

/* E-bike Toggle */
.ebike-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding-left: 16px;
}

.ebike-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--bw-text);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #f59e0b;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* E-bike Badges */
.ebike-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-left: 6px;
    color: #f59e0b;
}

.ebike-image-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* =============================================================================
   Bikes Grid
   ============================================================================= */
.bikes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.bikes-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
    background: var(--bw-surface);
    border: 2px dashed var(--bw-border);
    border-radius: var(--bw-radius);
}

.placeholder-icon {
    color: var(--bw-text-muted);
    margin-bottom: 16px;
}

.bikes-placeholder p {
    color: var(--bw-text-secondary);
    margin-bottom: 20px;
    font-size: 16px;
}

.bike-card {
    background: var(--bw-surface);
    border: 2px solid var(--bw-border);
    border-radius: var(--bw-radius);
    overflow: hidden;
    transition: all var(--bw-transition);
}

.bike-card:hover {
    box-shadow: var(--bw-shadow-lg);
    border-color: var(--bw-text-muted);
}

.bike-card.selected {
    border-color: var(--bw-primary);
    box-shadow: 0 0 0 3px var(--bw-primary-light);
}

.bike-image {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--bw-background);
    overflow: hidden;
}

.bike-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bike-info {
    padding: 16px;
}

.bike-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--bw-text);
}

.bike-category {
    color: var(--bw-text-secondary);
    font-size: 13px;
    margin: 0 0 4px;
}

.bike-specs {
    color: var(--bw-text-muted);
    font-size: 12px;
    margin: 0 0 12px;
}

.bike-pricing {
    margin-bottom: 12px;
}

.daily-rate {
    font-size: 20px;
    font-weight: 700;
    color: var(--bw-primary);
}

.total-rate {
    display: block;
    font-size: 13px;
    color: var(--bw-text-secondary);
    margin-top: 2px;
}

.bike-size {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.bike-size label {
    font-size: 13px;
    color: var(--bw-text-secondary);
}

.size-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius-sm);
    font-size: 14px;
}

.bike-availability {
    margin-bottom: 12px;
}

.available-count {
    font-size: 13px;
    color: var(--bw-success);
    font-weight: 500;
}

.bike-add-btn {
    width: 100%;
}

.bike-add-btn.added {
    background: var(--bw-success);
}

.bike-add-btn.added:hover {
    background: #16a34a;
}

.no-bikes {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--bw-text-secondary);
    background: var(--bw-surface);
    border-radius: var(--bw-radius);
}

/* =============================================================================
   Selection Summary (Twój wybór)
   ============================================================================= */
.selection-summary {
    background: var(--bw-surface);
    border: 2px solid var(--bw-primary);
    border-radius: var(--bw-radius);
    padding: 20px;
    margin-top: 24px;
}

.selection-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--bw-text);
}

.selection-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.selection-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--bw-background);
    border-radius: var(--bw-radius-sm);
}

.selection-item-info {
    flex: 1;
}

.selection-item-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.selection-item-details {
    font-size: 13px;
    color: var(--bw-text-secondary);
    margin-bottom: 10px;
}

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

.selection-item-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--bw-error);
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--bw-transition);
}

.selection-item-remove:hover {
    background: var(--bw-error-light);
}

/* Add another bike link */
.add-another-bike {
    display: block;
    text-align: center;
    padding: 12px;
    margin-top: 8px;
    color: var(--bw-primary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px dashed var(--bw-border);
    border-radius: var(--bw-radius-sm);
    transition: all var(--bw-transition);
}

.add-another-bike:hover {
    background: var(--bw-primary-light);
    border-color: var(--bw-primary);
}

/* =============================================================================
   Inline Extra Chips
   ============================================================================= */
.extra-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.extra-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bw-surface);
    border: 1px solid var(--bw-border);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--bw-transition);
}

.extra-chip:hover {
    border-color: var(--bw-primary);
}

.extra-chip.selected {
    background: var(--bw-primary-light);
    border-color: var(--bw-primary);
    color: var(--bw-primary);
}

.extra-chip-price {
    font-weight: 600;
    color: var(--bw-text-secondary);
}

.extra-chip.selected .extra-chip-price {
    color: var(--bw-primary);
}

/* =============================================================================
   Bike Extras (Carbon Wheels Toggle, Pedal Selector)
   ============================================================================= */
.bike-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    align-items: center;
}

/* Bike extras dropdowns (wheels and pedals) */
.wheels-select,
.pedal-select {
    padding: 8px 12px;
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius-sm);
    font-size: 13px;
    background: var(--bw-surface);
    min-width: 180px;
    cursor: pointer;
}

.wheels-select:focus,
.pedal-select:focus {
    outline: none;
    border-color: var(--bw-primary);
    box-shadow: 0 0 0 3px var(--bw-primary-light);
}

.wheels-select:disabled {
    background: var(--bw-surface);
    color: var(--bw-text-secondary);
    cursor: default;
    opacity: 0.7;
}

/* =============================================================================
   Group Extras Section
   ============================================================================= */
.group-extras-container {
    background: var(--bw-surface);
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius);
    padding: 20px;
    margin-top: 24px;
}

.group-extras-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--bw-text);
}

.group-extras-hint {
    font-size: 13px;
    color: var(--bw-text-secondary);
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bw-background);
    border-radius: var(--bw-radius-sm);
}

.group-extras-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-extras-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--bw-border);
    font-size: 14px;
}

.group-extras-subtotal .subtotal-label {
    color: var(--bw-text-secondary);
}

.group-extras-subtotal .subtotal-value {
    font-weight: 600;
    color: var(--bw-primary);
}

.group-extra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--bw-border);
}

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

.group-extra-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.group-extra-name {
    font-weight: 500;
    font-size: 14px;
}

.group-extra-price {
    font-size: 13px;
    color: var(--bw-text-secondary);
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bw-border);
    background: var(--bw-surface);
    border-radius: var(--bw-radius-sm);
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--bw-transition);
    color: var(--bw-text);
}

.qty-btn:hover:not(:disabled) {
    border-color: var(--bw-primary);
    color: var(--bw-primary);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-value {
    min-width: 32px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.group-extra-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
}

.group-extra-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--bw-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.group-extra-checkbox .group-extra-name {
    flex: 1;
}

.group-extra-checkbox .group-extra-price {
    white-space: nowrap;
}

/* "Included with stay" badge for verified base guests */
.included-badge {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    white-space: nowrap;
}
.included-with-stay .group-extra-price {
    text-decoration: line-through;
    opacity: 0.5;
}

/* Tooltip for insurance/assistance extras */
.extra-tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.extra-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 4px;
    border-radius: 50%;
    background: var(--bw-bg-light, #f0f0f0);
    color: var(--bw-text-muted, #888);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.extra-tooltip-trigger:hover,
.extra-tooltip-trigger.active {
    background: var(--bw-primary, #3b82f6);
    color: #fff;
}

.extra-tooltip-bubble {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    width: 300px;
    max-width: 90vw;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--bw-border, #e0e0e0);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--bw-text, #333);
    z-index: 100;
}

.extra-tooltip-bubble.visible {
    display: block;
}

.extra-tooltip-bubble strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .extra-tooltip-bubble {
        position: fixed;
        left: 16px;
        right: 16px;
        top: auto;
        bottom: 140px;
        width: auto;
        max-width: none;
    }
}

.extras-divider {
    height: 1px;
    background: var(--bw-border);
    margin: 16px 0;
}

.extras-subtitle {
    font-size: 12px;
    color: var(--bw-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Summary item for extras */
.summary-item-extra {
    background: var(--bw-background);
    padding: 12px;
    border-radius: var(--bw-radius-sm);
    margin-top: 8px;
}

/* Free Services Info */
.free-services-info {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #86efac;
    border-radius: var(--bw-radius);
    padding: 16px;
    margin-top: 16px;
}

.free-services-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #166534;
    margin-bottom: 12px;
}

.free-services-title svg {
    stroke: #22c55e;
}

.free-services-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.free-service-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #15803d;
}

.free-service-icon {
    flex-shrink: 0;
    font-size: 16px;
}

.free-service-text strong {
    color: #166534;
}

/* =============================================================================
   Step 2: Summary Cards
   ============================================================================= */
.summary-card,
.customer-card,
.terms-card {
    background: var(--bw-surface);
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius);
    padding: 24px;
    margin-bottom: 20px;
}

.summary-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bw-border);
}

.summary-dates {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    background: var(--bw-background);
    border-radius: var(--bw-radius-sm);
    margin-bottom: 20px;
}

.summary-date-item {
    text-align: center;
}

.summary-date-label {
    display: block;
    font-size: 12px;
    color: var(--bw-text-secondary);
    margin-bottom: 4px;
}

.summary-date-value {
    font-size: 15px;
    font-weight: 600;
}

.summary-date-arrow {
    color: var(--bw-text-muted);
    font-size: 20px;
}

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

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--bw-border);
}

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

.summary-item-name {
    font-weight: 500;
}

.summary-item-extras {
    font-size: 13px;
    color: var(--bw-text-secondary);
}

.summary-item-price {
    font-weight: 600;
}

/* Summary Extras */
.summary-extras {
    background: var(--bw-background);
    border-radius: var(--bw-radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}

.summary-extras-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--bw-text);
}

.summary-extras-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-extra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--bw-border);
}

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

.summary-extra-name {
    color: var(--bw-text-secondary);
}

.summary-extra-price {
    font-weight: 500;
    color: var(--bw-text);
}

/* Summary Free Services */
.summary-free-services {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #86efac;
    border-radius: var(--bw-radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.summary-free-services-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #166534;
    margin-bottom: 8px;
}

.summary-free-services-title svg {
    stroke: #22c55e;
    flex-shrink: 0;
}

.summary-free-services-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #15803d;
}

/* Price breakdown */
.price-breakdown {
    padding-top: 16px;
    border-top: 1px solid var(--bw-border);
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}

.price-row.total {
    border-top: 2px solid var(--bw-border);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 700;
}

.price-row.discount {
    color: var(--bw-success);
}

/* Coupon */
.coupon-field {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.coupon-field input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius-sm);
    font-size: 14px;
}

.coupon-message {
    padding: 10px 16px;
    border-radius: var(--bw-radius-sm);
    font-size: 14px;
    margin-top: 12px;
}

.coupon-message.success {
    background: var(--bw-success-light);
    color: #166534;
}

.coupon-message.error {
    background: var(--bw-error-light);
    color: #991b1b;
}

/* Customer form */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--bw-border);
    border-radius: var(--bw-radius-sm);
    font-size: 16px;
    transition: border-color var(--bw-transition), box-shadow var(--bw-transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--bw-primary);
    box-shadow: 0 0 0 3px var(--bw-primary-light);
}

/* Validation states */
.form-group.valid input {
    border-color: var(--bw-success);
}

.form-group.valid input:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.form-group.invalid input {
    border-color: var(--bw-error);
}

.form-group.invalid input:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-group .field-error {
    display: none;
    color: var(--bw-error);
    font-size: 12px;
    margin-top: 4px;
}

.form-group.invalid .field-error {
    display: block;
}

.form-group .field-hint {
    color: var(--bw-text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.form-group.invalid .field-hint {
    display: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Terms */
.terms-card {
    padding: 20px 24px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 12px;
}

.checkbox-label:last-child {
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--bw-primary);
}

.checkbox-label span {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--bw-primary);
    text-decoration: underline;
}

.terms-card.invalid {
    border: 2px solid var(--bw-error);
    border-radius: var(--bw-radius-sm);
}

.terms-card.invalid .checkbox-label.required span {
    color: var(--bw-error);
}

/* =============================================================================
   Step 3: Payment
   ============================================================================= */
.payment-summary-card {
    background: linear-gradient(135deg, var(--bw-primary) 0%, var(--bw-primary-hover) 100%);
    color: white;
    border-radius: var(--bw-radius);
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
}

.payment-amount {
    margin-bottom: 12px;
}

.payment-label {
    font-size: 14px;
    opacity: 0.9;
}

.payment-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-top: 8px;
}

.payment-note {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
}

/* Stripe Embedded Checkout */
.stripe-checkout-container {
    margin-bottom: 24px;
    min-height: 300px;
}

.stripe-checkout-container iframe {
    border-radius: var(--bw-radius);
}

/* Checkout Skeleton Loader */
.checkout-skeleton {
    padding: 24px;
    background: var(--bw-surface);
    border-radius: var(--bw-radius);
    border: 1px solid var(--bw-border);
}

.checkout-skeleton.hidden {
    display: none;
}

.skeleton-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.skeleton-line {
    height: 16px;
    margin-bottom: 12px;
}

.skeleton-line.wide { width: 80%; }
.skeleton-line.medium { width: 50%; }
.skeleton-line.narrow { width: 35%; }

.skeleton-block {
    height: 48px;
    margin-bottom: 16px;
    width: 100%;
}

.skeleton-block.short {
    height: 40px;
    width: 60%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-logos {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Checkout Error State */
.checkout-error {
    text-align: center;
    padding: 32px 24px;
    background: var(--bw-surface);
    border: 1px solid var(--bw-error-light);
    border-radius: var(--bw-radius);
    margin-bottom: 24px;
}

.checkout-error.hidden { display: none; }

.checkout-error-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.checkout-error-message {
    color: var(--bw-text-secondary);
    margin-bottom: 20px;
}

.checkout-retry-btn {
    min-width: 200px;
}

.payment-logos {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.payment-logo {
    padding: 8px 16px;
    background: var(--bw-background);
    border-radius: var(--bw-radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--bw-text-secondary);
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--bw-text-secondary);
    font-size: 13px;
}

.full-payment-notice {
    display: block;
    padding: 12px 16px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--bw-radius-sm);
    font-size: 13px;
    line-height: 1.4;
}

/* Wallet Card */
.wallet-card {
    background: var(--bw-success-light);
    border: 1px solid var(--bw-success);
    border-radius: var(--bw-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.wallet-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #166534;
}

.wallet-title {
    font-weight: 600;
    font-size: 15px;
}

.wallet-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(22, 101, 52, 0.2);
}

.wallet-label {
    color: var(--bw-text-secondary);
    font-size: 14px;
}

.wallet-value {
    font-size: 20px;
    font-weight: 700;
    color: #166534;
}

.wallet-checkbox {
    margin-bottom: 12px;
}

.wallet-summary {
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--bw-radius-sm);
    padding: 12px;
}

.wallet-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 6px;
}

.wallet-row:last-child {
    margin-bottom: 0;
}

.wallet-deduct {
    color: var(--bw-success);
}

.wallet-final {
    font-weight: 600;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px dashed rgba(22, 101, 52, 0.3);
}

/* Returning Customer Card */
/* Inline returning customer banner (under email field) */
.returning-banner {
    margin-top: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 10px 12px;
    animation: bannerFadeIn 0.3s ease;
}

@keyframes bannerFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.returning-banner-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.returning-banner-text {
    flex: 1;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.4;
}

.returning-banner-action {
    background: var(--bw-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.returning-banner-action:hover {
    background: var(--bw-primary-hover);
}

.returning-banner-dismiss {
    background: none;
    border: none;
    color: #93c5fd;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.returning-banner-dismiss:hover {
    color: #1e40af;
}

.returning-otp {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #bfdbfe;
}

.returning-otp input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 20px;
    letter-spacing: 8px;
    text-align: center;
    font-family: monospace;
    box-sizing: border-box;
}

.login-message {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 8px;
}

.login-message.success {
    background: var(--bw-success-light);
    color: #166534;
}

.login-message.error {
    background: var(--bw-error-light);
    color: #991b1b;
}

/* Logged In Card */
.logged-in-card {
    background: var(--bw-success-light);
    border: 1px solid var(--bw-success);
    border-radius: var(--bw-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.logged-in-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #166534;
}

.logged-in-title {
    font-weight: 500;
    font-size: 15px;
}

.logged-in-info {
    margin-bottom: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 8px 0;
}

.info-label {
    color: var(--bw-text-secondary);
}

.info-value {
    font-weight: 600;
    color: #166534;
}

.btn-logout {
    color: var(--bw-text-secondary);
    font-size: 13px;
    text-decoration: underline;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.btn-logout:hover {
    color: var(--bw-text);
}

.btn-link {
    background: none;
    border: none;
    color: var(--bw-primary);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    color: var(--bw-primary-hover);
}

/* Readonly form fields */
input.readonly,
input[readonly] {
    background: var(--bw-background);
    color: var(--bw-text-secondary);
    cursor: not-allowed;
}

/* =============================================================================
   Sticky Bottom Bar
   ============================================================================= */
.sticky-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--bw-surface);
    border-top: 1px solid var(--bw-border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.bar-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bar-items,
.bar-days {
    font-size: 14px;
    color: var(--bw-text-secondary);
}

.bar-separator {
    color: var(--bw-text-muted);
}

.bar-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--bw-primary);
    margin-left: 8px;
}

.bar-actions {
    display: flex;
    gap: 12px;
}

/* =============================================================================
   Buttons
   ============================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--bw-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--bw-transition);
}

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

.btn-primary {
    background: var(--bw-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--bw-primary-hover);
}

.btn-secondary {
    background: var(--bw-background);
    color: var(--bw-text);
    border: 1px solid var(--bw-border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bw-border);
}

.btn-back {
    background: transparent;
    color: var(--bw-text-secondary);
    border: 1px solid var(--bw-border);
}

.btn-back:hover {
    background: var(--bw-background);
}

.btn-next {
    min-width: 140px;
}

.btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
}

/* =============================================================================
   Loading & Toast
   ============================================================================= */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bw-border);
    border-top-color: var(--bw-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.spinner.large {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

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

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 24px;
    background: var(--bw-text);
    color: white;
    border-radius: var(--bw-radius-sm);
    box-shadow: var(--bw-shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2001;
    animation: slideUp 0.3s ease;
}

.toast.error {
    background: var(--bw-error);
}

.toast.success {
    background: var(--bw-success);
}

.toast.warning {
    background: #f59e0b;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* =============================================================================
   Utility Classes
   ============================================================================= */
.hidden {
    display: none !important;
}


/* =============================================================================
   Responsive
   ============================================================================= */
@media (max-width: 768px) {
    .booking-widget {
        padding: 0;
        padding-bottom: 120px;
    }

    .booking-stepper {
        padding: 8px 12px;
        top: 0;
        margin: 0 0 8px;
        border-radius: 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        border-bottom: 1px solid var(--bw-border);
    }

    .step {
        flex-direction: column;
        gap: 2px;
        padding: 6px 10px;
        text-align: center;
    }

    .step-label {
        font-size: 11px;
        white-space: nowrap;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .step-connector {
        width: 24px;
    }

    .lang-switcher {
        flex-direction: column;
        gap: 1px;
        margin-left: 4px;
    }

    .lang-btn {
        padding: 3px 6px;
        font-size: 10px;
    }

    .step-header {
        padding: 0;
    }

    .step-header h1 {
        font-size: 22px;
    }

    .date-picker-card {
        padding: 12px;
        margin: 0 0 12px;
        border-radius: var(--bw-radius-sm);
        border: 1px solid var(--bw-border);
        background: var(--bw-surface);
    }

    .date-picker-row {
        flex-direction: column;
        gap: 8px;
    }

    .date-field-compact {
        width: 100%;
        min-width: 0;
    }

    .date-field-compact label {
        margin-bottom: 4px;
        font-size: 13px;
    }

    .date-field-compact input[type="date"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
        padding: 12px;
        margin-bottom: 4px;
        /* iOS Safari - force our styling */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background: var(--bw-background);
        color: var(--bw-text);
        text-align: left;
    }

    .date-field-compact .slot-select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 12px;
        font-size: 16px;
    }

    .rental-days-badge {
        margin-top: 2px;
        padding: 8px;
    }

    .date-arrow {
        display: none;
    }

    .rental-days-badge {
        width: 100%;
    }

    .bikes-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .summary-dates {
        flex-direction: column;
        gap: 12px;
    }

    .summary-date-arrow {
        transform: rotate(90deg);
    }

    .sticky-bottom-bar {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .bar-summary {
        width: 100%;
        justify-content: center;
    }

    .bar-actions {
        width: 100%;
    }

    .bar-actions .btn {
        flex: 1;
        white-space: normal;
        font-size: 15px;
    }

    .extra-chips {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .extra-chip {
        flex-shrink: 0;
    }

    .payment-summary-card {
        padding: 24px 20px;
    }

    .payment-value {
        font-size: 28px;
    }

    .security-badges {
        flex-direction: column;
        align-items: center;
    }

    /* Bike extras responsive */
    .bike-extras {
        flex-direction: column;
        align-items: flex-start;
    }

    .wheels-select,
    .pedal-select {
        min-width: 160px;
        width: 100%;
    }

    /* Group extras responsive */
    .group-extra-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .qty-selector {
        align-self: flex-end;
    }
}

@media (max-width: 400px) {
    .step-label {
        font-size: 10px;
    }

    .step-connector {
        width: 16px;
    }

    .coupon-field {
        flex-direction: column;
    }

    .coupon-field .btn {
        width: 100%;
    }
}

/* =============================================================================
   Custom Confirm Modal
   ============================================================================= */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.confirm-card {
    background: var(--bw-surface);
    border-radius: var(--bw-radius);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--bw-shadow-xl);
}

.confirm-card p {
    margin: 0 0 20px;
    font-size: 15px;
    color: var(--bw-text);
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
}
