/* ================================================
   BOOKING MODAL STYLES
   ================================================ */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

/* Modal Container */
.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

.modal-close:active {
    transform: scale(0.88);
}

/* Progress Bar */
.booking-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 36px;
    padding: 0 10px;
    overflow-x: auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
}

.step-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.progress-step.active .step-num {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.progress-step.active .step-label {
    color: var(--accent-primary);
}

.progress-step.completed .step-num {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.progress-step.completed .step-label {
    color: var(--text-secondary);
}

.progress-line {
    width: 24px;
    height: 2px;
    background: var(--border-color);
    flex-shrink: 0;
    margin: 0 4px;
    margin-bottom: 22px;
    transition: background 0.3s ease;
}

.progress-line.active {
    background: var(--accent-primary);
}

/* Booking Steps */
.booking-step {
    animation: stepFadeIn 0.4s ease;
}

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

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.step-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 28px;
    text-align: center;
}

/* Step 1: Package Selection */
.step-package-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

/* Hide the top-level package radio */
.step-package-option > input[type="radio"] {
    display: none;
}

.step-package-card {
    position: relative;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

/* Top accent bar */
.step-package-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* Checkmark badge */
.step-package-card::after {
    content: '';
    position: absolute;
    top: 14px; right: 14px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--accent-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%230a0e17' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.step-package-card:hover {
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Selected state */
.step-package-option input:checked + .step-package-card {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 28px rgba(0, 255, 136, 0.12);
}

.step-package-option input:checked + .step-package-card::before {
    transform: scaleX(1);
}

.step-package-option input:checked + .step-package-card::after {
    opacity: 1;
    transform: scale(1);
}

.step-package-card h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 12px 0 8px;
}

.step-package-price {
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    margin-bottom: 16px;
}

.step-package-card i {
    color: var(--accent-primary);
}

/* Format selector — pill buttons */
.step-format-select {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 4px;
}

/* Hide format radio dots */
.step-format-select input[type="radio"] {
    display: none;
}

.step-format-select label {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    user-select: none;
}

.step-format-select label:hover {
    border-color: rgba(0, 255, 136, 0.3);
    color: var(--text-primary);
}

.step-format-select input[type="radio"]:checked + label {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Step Navigation */
.step-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
}

.btn-next, .btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* Date + Time side-by-side layout */
.date-time-grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

/* Calendar */
.calendar-container {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    flex: 0 0 auto;
    width: 300px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.calendar-nav {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-nav:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.calendar-nav:active {
    transform: scale(0.88);
    box-shadow: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
}

.calendar-day:hover:not(.disabled):not(.empty) {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-primary);
}

.calendar-day.selected {
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-weight: 700;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.calendar-day.disabled {
    color: var(--text-muted);
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-day.today {
    border: 1px solid var(--accent-primary);
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.fully-booked {
    color: var(--danger);
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Time Slots */
.timeslots-container {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    min-width: 0;
}

.timeslots-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
}

.timeslot-hint {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.85rem;
    padding: 40px 10px;
}

.timeslots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.timeslot-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.timeslot-btn:hover:not(.disabled) {
    border-color: var(--accent-primary);
    background: rgba(0, 255, 136, 0.05);
}

.timeslot-btn:active:not(.disabled) {
    transform: scale(0.96);
}

.timeslot-btn.selected {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
    font-weight: 600;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

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

.timeslot-btn .slot-label {
    display: block;
    font-weight: 600;
}

.timeslot-btn .slot-availability {
    display: block;
    font-size: 0.75rem;
    margin-top: 4px;
    opacity: 0.7;
}

/* Manual Time Input */
.time-input-wrap {
    margin-bottom: 8px;
}

.time-manual-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: 'JetBrains Mono', 'Inter', monospace;
    letter-spacing: 0.04em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.time-manual-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.time-input-status {
    min-height: 22px;
    font-size: 0.83rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.time-status-ok {
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.time-status-error {
    color: var(--danger);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.time-input-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 4px;
    line-height: 1.5;
}

/* Booking Form */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

/* Phone input with country code selector */
.phone-input-group {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-secondary);
}

.phone-input-group:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1), 0 0 16px rgba(0, 255, 136, 0.08);
}

.phone-country-select {
    flex: 0 0 auto;
    padding: 14px 6px 14px 12px;
    border: none;
    border-right: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-secondary);
    background-image: none;
    appearance: auto;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    width: auto;
}

.phone-country-select:focus {
    border-color: transparent;
    box-shadow: none;
    background: var(--bg-secondary);
}

.phone-input-group input[type="tel"] {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg-secondary);
}

.phone-input-group input[type="tel"]:focus {
    border: none;
    box-shadow: none;
    background: var(--bg-tertiary);
}

/* Summary Card */
.summary-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
}

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

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

.summary-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.summary-value {
    color: var(--text-primary);
    font-weight: 600;
}

.summary-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--accent-primary);
}

.summary-total .summary-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.summary-total .summary-value {
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-family: 'Rajdhani', sans-serif;
}

.summary-deposit {
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 16px;
    text-align: center;
}

.summary-deposit-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.summary-deposit-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'Rajdhani', sans-serif;
}

.summary-deposit-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Payment Terms (inline in success step) */
.payment-terms {
    width: 100%;
    margin: 16px 0;
    text-align: left;
}

/* Terms of Use Step */
.terms-summary-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.terms-toggle-row {
    margin-bottom: 12px;
}

.terms-toggle-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-family: var(--font-body);
    font-weight: 400;
    transition: color 0.2s ease;
}

.terms-toggle-link:hover {
    color: var(--text-secondary);
}

.terms-toggle-link:active {
    opacity: 0.6;
}

.terms-panel {
    background: transparent;
    padding: 12px 4px 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.75;
    font-family: var(--font-body);
    font-weight: 400;
    margin-bottom: 16px;
}

.terms-panel p {
    color: var(--text-muted);
    margin-bottom: 10px;
    max-width: none;
    font-weight: 400;
}

.terms-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.terms-agree {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.3s ease;
}

.terms-agree:has(input:checked) {
    border-color: rgba(0, 255, 136, 0.3);
}

.terms-agree input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    flex-shrink: 0;
    cursor: pointer;
}

.terms-agree input[type="checkbox"]:checked {
    animation: checkPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.terms-agree label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1.4;
}

/* Booking QR Code */
.booking-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 20px 0 8px;
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.qr-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: none;
    font-weight: 500;
}

#booking-qr-code {
    background: #f1f5f9;
    padding: 10px;
    border-radius: var(--radius-md);
}

#booking-qr-code img,
#booking-qr-code canvas {
    display: block;
}

.qr-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    max-width: none;
}

/* Confirmation Step */
.confirmation-container {
    text-align: center;
    position: relative;
}

.confirmation-icon {
    color: var(--success);
    margin-bottom: 16px;
    animation: confirmBounce 0.6s ease;
}

@keyframes confirmBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.confirmation-subtitle {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.confirmation-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: left;
    margin-bottom: 28px;
}

.confirmation-ref {
    text-align: center;
    padding: 16px;
    background: rgba(0, 255, 136, 0.08);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.confirmation-ref-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.confirmation-ref-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 3px;
}

.confirmation-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Confetti */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        padding: 24px;
        border-radius: var(--radius-lg);
    }

    .booking-progress {
        gap: 0;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .step-label {
        display: none;
    }

    .progress-line {
        margin-bottom: 0;
    }

    .step-package-grid {
        grid-template-columns: 1fr;
    }

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

    .date-time-grid {
        flex-direction: column;
    }

    .calendar-container {
        width: 100%;
    }

    .timeslots-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .step-title {
        font-size: 1.4rem;
    }

    .confirmation-actions {
        flex-direction: column;
    }
}
