/* ================================================
   VaultBox - Book Page Styles
   Extracted from inline styles for performance
   ================================================ */

/* Reset fieldset default border */
fieldset,
.step-panel {
    border: none !important;
    outline: none !important;
    margin: 0;
    padding: 0;
}

/* ================================================
   Focus Styles for Keyboard Navigation
   ================================================ */

/* Universal focus visible style */
:focus-visible {
    outline: 2px solid #f06543;
    outline-offset: 2px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Focus styles for duration chips */
.duration-chip:focus-visible {
    outline: 2px solid #f06543;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(240, 101, 67, 0.2);
}

/* Focus styles for size cards */
.size-card:focus-visible {
    outline: 2px solid #f06543;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(240, 101, 67, 0.2);
    transform: translateY(-2px);
}

/* Focus styles for buttons */
.btn-prev:focus-visible,
.btn-next:focus-visible,
.location-btn:focus-visible {
    outline: 2px solid #f06543;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(240, 101, 67, 0.2);
}

/* Focus styles for form inputs */
.form-group input:focus-visible,
.form-group select:focus-visible {
    outline: none;
    border-color: #f06543;
    box-shadow: 0 0 0 3px rgba(240, 101, 67, 0.15);
}

/* Focus styles for toggle switches */
.toggle-switch input:focus-visible + .toggle-slider {
    outline: 2px solid #f06543;
    outline-offset: 2px;
}

/* Skip to content link (for screen readers) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #f06543;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Prevent pull-to-refresh on mobile */
html, body {
    overscroll-behavior-y: contain;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better tap highlight */
* {
    -webkit-tap-highlight-color: rgba(240, 101, 67, 0.1);
}

/* Safe area support for notched phones */
.booking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px 4rem;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

/* Touch feedback for interactive elements */
.size-card:active,
.duration-chip:active,
.location-btn:active {
    transform: scale(0.97);
    transition: transform 0.1s;
}

/* Progress Indicator */
.progress-container {
    margin-bottom: 2rem;
    position: relative;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: #e0dbd4;
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eeebe7;
    border: 2px solid #e0dbd4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #877d6f;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.step-label {
    font-size: 0.75rem;
    color: #877d6f;
    text-align: center;
    transition: all 0.3s;
}

.progress-step.active .step-circle {
    background: #f06543;
    border-color: #f06543;
    color: #ffffff;
}

.progress-step.active .step-label {
    color: #f06543;
    font-weight: 600;
}

.progress-step.completed .step-circle {
    background: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
}

.progress-step.completed .step-label {
    color: #22c55e;
}

/* Booking Form */
.booking-form {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(45, 42, 38, 0.1);
}

.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.step-header {
    margin-bottom: 1.5rem;
}

.step-header h2 {
    color: #2d2a26;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.step-header h2 i {
    color: #f06543;
}

.step-header p {
    color: #5a534a;
    font-size: 0.9rem;
    margin-left: 2rem;
}

/* Timer Info Box */
.timer-info-box {
    background: linear-gradient(135deg, rgba(240, 101, 67, 0.15), rgba(240, 101, 67, 0.05));
    border: 1px solid rgba(240, 101, 67, 0.3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.timer-info-box .icon {
    width: 40px;
    height: 40px;
    background: rgba(240, 101, 67, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timer-info-box .icon i {
    color: #f06543;
    font-size: 1.2rem;
}

.timer-info-box .content h4 {
    color: #f06543;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.timer-info-box .content p {
    color: #5a534a;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

/* Duration Chips */
.duration-chips {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.duration-chip {
    position: relative;
    padding: 0.75rem 0.25rem;
    background: #f7f5f3;
    border: 2px solid #e0dbd4;
    border-radius: 10px;
    color: #2d2a26;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.duration-chip:hover {
    background: #ffffff;
    border-color: rgba(240, 101, 67, 0.3);
}

.duration-chip:active {
    transform: scale(0.97);
}

.duration-chip.selected {
    background: rgba(240, 101, 67, 0.15);
    border-color: #f06543;
    color: #2d2a26;
}

.duration-chip.popular::before {
    content: 'POPULAR';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.chip-discount {
    display: block;
    font-size: 0.7rem;
    color: #22c55e;
    font-weight: 500;
    margin-top: 0.15rem;
}

.duration-chip.selected .chip-discount {
    color: #4ade80;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    color: #2d2a26;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: #f7f5f3;
    border: 1px solid #e0dbd4;
    border-radius: 10px;
    color: #2d2a26;
    font-size: 16px;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.form-group select option {
    background: #ffffff;
    color: #2d2a26;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #f06543;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(240, 101, 67, 0.1);
}

.form-group input.error,
.form-group select.error {
    border-color: #ef4444;
}

.form-group .field-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: none;
}

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

/* Use My Location Button */
.location-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.7rem 1rem;
    background: rgba(240, 101, 67, 0.1);
    border: 1px solid rgba(240, 101, 67, 0.3);
    border-radius: 8px;
    color: #f06543;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.location-btn:hover {
    background: rgba(240, 101, 67, 0.2);
    border-color: #f06543;
}

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

.location-btn.loading i {
    animation: spin 1s linear infinite;
}

.location-btn.success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.location-btn.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

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

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

/* Locker Size Cards */
.locker-sizes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.size-card {
    background: #f7f5f3;
    border: 2px solid #e0dbd4;
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    text-align: center;
}

.size-card:hover {
    background: #eeebe7;
    border-color: rgba(240, 101, 67, 0.3);
    transform: translateY(-2px);
}

.size-card.selected {
    background: rgba(240, 101, 67, 0.12);
    border-color: #f06543;
}

.size-card input[type="radio"] {
    display: none;
}

.size-card .popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.size-card .size-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.75rem;
    background: rgba(240, 101, 67, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-card .size-icon i {
    font-size: 1.4rem;
    color: #f06543;
}

.size-card .size-name {
    font-weight: 700;
    color: #2d2a26;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.size-card .size-dimensions {
    color: #877d6f;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.size-card .size-fits {
    color: #5a534a;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.size-card .size-price {
    color: #f06543;
    font-weight: 700;
    font-size: 1.3rem;
}

.size-card .size-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: #877d6f;
}

/* Notification Toggles */
.notification-group {
    background: #f7f5f3;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.notification-group h4 {
    color: #2d2a26;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-group h4 i {
    color: #f06543;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.toggle-row + .toggle-row {
    border-top: 1px solid #eeebe7;
}

.toggle-row label {
    color: #5a534a;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

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

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

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

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

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

/* Payment Section */
.card-brands {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-brands img {
    height: 28px;
    opacity: 0.7;
}

.stripe-card-input {
    padding: 1rem;
    background: #f7f5f3;
    border: 1px solid #e0dbd4;
    border-radius: 10px;
    min-height: 50px;
    transition: all 0.3s;
    font-size: 16px;
}

.stripe-card-input:focus-within {
    border-color: #f06543;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(240, 101, 67, 0.1);
}

.trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e0dbd4;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #877d6f;
    font-size: 0.75rem;
}

.trust-badge i {
    font-size: 1rem;
    color: #22c55e;
}

/* Terms Checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0dbd4;
}

.terms-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #f06543;
}

.terms-checkbox label {
    color: #5a534a;
    font-size: 0.85rem;
    line-height: 1.4;
}

.terms-checkbox label a {
    color: #f06543;
}

/* Navigation Buttons */
.step-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-prev,
.btn-next {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-prev {
    background: #f7f5f3;
    border: 1px solid #e0dbd4;
    color: #5a534a;
}

.btn-prev:hover {
    background: #eeebe7;
    color: #2d2a26;
}

.btn-next {
    background: #f06543;
    border: none;
    color: #ffffff;
}

.btn-next:hover:not(:disabled) {
    background: #d94a2b;
    transform: translateY(-1px);
}

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

.btn-next.btn-pay {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.btn-next.btn-pay:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

/* Order Summary */
.order-summary {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #eeebe7;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(45, 42, 38, 0.1);
    position: sticky;
    top: 90px;
}

.order-summary h3 {
    color: #2d2a26;
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-summary h3 i {
    color: #f06543;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid #eeebe7;
    color: #877d6f;
    font-size: 0.9rem;
}

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

.summary-item strong {
    color: #2d2a26;
    font-weight: 500;
}

.summary-item.empty strong {
    color: #52525b;
    font-style: italic;
}

.discount-row {
    display: none;
}

.discount-row.visible {
    display: flex;
}

.discount-row strong {
    color: #22c55e !important;
}

.discount-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    margin-left: 0.5rem;
}

.summary-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(240, 101, 67, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-total .label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d2a26;
}

.summary-total .amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f06543;
}

/* Mobile Summary Toggle - Hidden */
.mobile-summary-toggle {
    display: none;
}

/* Error Message */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: none;
}

.error-message.visible {
    display: block;
}

/* ================================================
   Responsive Styles
   ================================================ */

@media (max-width: 900px) {
    .booking-container {
        grid-template-columns: 1fr;
        padding-bottom: 100px;
    }

    .order-summary {
        display: none;
    }

    .progress-steps::before {
        left: 20px;
        right: 20px;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .step-label {
        font-size: 0.65rem;
    }

    .step-panel {
        padding-bottom: 1rem;
    }
}

@media (max-width: 600px) {
    .locker-sizes {
        grid-template-columns: 1fr;
    }

    .duration-chips {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .trust-badges {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .step-navigation {
        flex-direction: column-reverse;
    }

    .step-navigation .btn-next,
    .step-navigation .btn-prev {
        width: 100%;
        min-height: 52px;
    }

    .booking-form {
        padding: 1.25rem;
    }

    .form-group input,
    .form-group select {
        font-size: 16px !important;
        padding: 0.9rem 1rem;
        min-height: 48px;
    }

    .stripe-card-input {
        min-height: 52px;
        padding: 0.9rem;
    }

    .stripe-card-input iframe {
        min-height: 24px !important;
    }

    .btn-prev,
    .btn-next {
        min-height: 52px;
        font-size: 1rem;
    }

    .toggle-switch {
        width: 50px;
        height: 28px;
    }

    .toggle-slider::before {
        height: 22px;
        width: 22px;
    }

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