.booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    /* No transition on the container to allow backdrop-filter to appear instantly */
}

.booking-modal.open {
    opacity: 1;
    visibility: visible;
}

.booking-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.booking-modal-content {
    position: relative;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.booking-modal.open .booking-modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.booking-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.booking-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.booking-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.booking-modal-close:hover {
    background: #e5e7eb;
}

.booking-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #6b7280;
}

.booking-modal-description {
    padding: 16px 24px;
    background: #f8fafc;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    border-bottom: 1px solid #e5e7eb;
}

/* Booking Steps */
.booking-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 24px;
    background: #fafbfc;
    border-bottom: 1px solid #e5e7eb;
}

.booking-step {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.booking-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #e5e7eb;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    transition: all 0.2s ease;
}

.booking-step-label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    transition: all 0.2s ease;
}

.booking-step.active .booking-step-number {
    background: linear-gradient(135deg, #007AFF, #0063D1);
    color: white;
}

.booking-step.active .booking-step-label {
    color: #1a1a2e;
}

.booking-step.completed .booking-step-number {
    background: #007AFF;
    color: white;
    font-size: 0;
    line-height: 0;
}

.booking-step.completed .booking-step-number::after {
    content: '';
    width: 14px;
    height: 14px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.booking-step-line {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
    transition: all 0.2s ease;
}

.booking-step.completed+.booking-step-line {
    background: #007AFF;
}

/* Booking Modal Body */
.booking-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.booking-step-content {
    display: none;
    animation: bookingFadeIn 0.3s ease;
}

.booking-step-content.active {
    display: block;
}

@keyframes bookingFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Date Picker */
.booking-date-picker {
    margin-bottom: 20px;
}

.booking-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.booking-timezone-hint {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin: 0;
}

.booking-date-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    color: #1a1a2e;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.booking-date-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}

/* Calendar Date Picker (replaces manual date input) */
.booking-calendar {
    margin-bottom: 20px;
}

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

.booking-calendar-month {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.2px;
}

.booking-calendar-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #1a1a2e;
    cursor: pointer;
    transition: all 0.2s ease;
}

.booking-calendar-nav-btn:hover:not(:disabled) {
    border-color: #007AFF;
    background: rgba(0,122,255,0.08);
}

.booking-calendar-nav-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.booking-calendar-dow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.booking-calendar-dow span {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

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

.booking-calendar-day {
    height: 40px;
    width: 100%;
    padding: 0;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.booking-calendar-day.blank {
    border: none;
    background: transparent;
}

.booking-calendar-day.available {
    cursor: pointer;
    transition: all 0.2s ease;
}

.booking-calendar-day.available:hover {
    border-color: #007AFF;
    background: rgba(0,122,255,0.08);
}

.booking-calendar-day.disabled {
    background: #f8fafc;
    color: #cbd5e1;
    border-color: #eef2f7;
    user-select: none;
}

.booking-calendar-day.today {
    border-color: rgba(0,122,255,0.55);
}

.booking-calendar-day.selected {
    background: linear-gradient(135deg, #007AFF, #0063D1);
    border-color: #007AFF;
    color: #ffffff;
}

.booking-calendar-day.selected:hover {
    background: linear-gradient(135deg, #007AFF, #0063D1);
}

/* Time Slots */
.booking-slots-container {
    margin-bottom: 20px;
}

.booking-slots-header {
    margin-bottom: 10px;
}

.booking-slots-header .booking-label {
    margin-bottom: 2px;
}

.booking-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

.booking-slot {
    padding: 12px 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.booking-slot:hover {
    border-color: #007AFF;
    background: rgba(0,122,255,0.08);
}

.booking-slot.selected {
    background: linear-gradient(135deg, #007AFF, #0063D1);
    border-color: #007AFF;
    color: white;
}

.booking-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.booking-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(100, 116, 139, 0.25);
    border-top-color: #007AFF;
    border-radius: 50%;
    animation: booking-spin 0.8s linear infinite;
}

.booking-loading.booking-loading--error::before {
    content: none;
}

.booking-calendar-grid .booking-loading,
.booking-slots .booking-loading {
    grid-column: 1 / -1;
}

.booking-calendar-grid .booking-loading {
    min-height: 220px;
}

.booking-slots .booking-loading {
    min-height: 64px;
}

.booking-no-slots {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    color: #64748b;
}

.booking-no-slots svg {
    color: #d1d5db;
    margin-bottom: 12px;
}

.booking-no-slots p {
    font-size: 14px;
    margin: 0;
}

/* Booking Form */
.booking-form-group {
    margin-bottom: 20px;
}

.booking-input,
.booking-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    color: #1a1a2e;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.booking-input:focus,
.booking-textarea:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}

.booking-input.error,
.booking-textarea.error {
    border-color: #ef4444;
}

.booking-textarea {
    resize: vertical;
    min-height: 80px;
}

.booking-error {
    display: block;
    font-size: 12px;
    color: #ef4444;
    margin-top: 6px;
}

/* Booking File Upload */
.booking-file-upload {
    position: relative;
}

.booking-file-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.booking-file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #6b7280;
}

.booking-file-label:hover {
    border-color: #007AFF;
    background: rgba(0,122,255,0.08);
    color: #007AFF;
}

.booking-file-label svg {
    flex-shrink: 0;
    color: #9ca3af;
}

.booking-file-label:hover svg {
    color: #007AFF;
}

.booking-file-input:focus+.booking-file-label {
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}

.booking-file-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Booking Summary */
.booking-summary {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.booking-summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.booking-summary-header svg {
    color: #007AFF;
}

.booking-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

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

.booking-summary-label {
    font-size: 14px;
    color: #64748b;
    flex-shrink: 0;
}

.booking-summary-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    text-align: right;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Booking Success */
#bookingSuccess {
    flex: 1;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.booking-success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.booking-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(0,122,255,0.12), rgba(0,122,255,0.2));
    border-radius: 50%;
    margin-bottom: 20px;
}

.booking-success-icon svg {
    color: #007AFF;
}

.booking-success-container h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px 0;
}

.booking-success-container p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    max-width: 320px;
    margin: 0;
}

/* Booking Modal Footer */
.booking-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fafbfc;
}

.booking-btn-back {
    flex: 1;
    padding: 14px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.booking-btn-back:hover {
    background: #f8fafc;
    border-color: #d1d5db;
}

.booking-btn-next {
    flex: 2;
    padding: 14px 20px;
    background: linear-gradient(135deg, #007AFF, #0063D1);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.booking-btn-next:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px -4px rgba(0,122,255,0.3);
}

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

.booking-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: booking-spin 0.8s linear infinite;
}

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

/* Booking Option Selection */
.booking-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.booking-option-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.booking-option-btn:hover {
    border-color: #007AFF;
    background: rgba(0,122,255,0.08);
}

.booking-option-btn.selected {
    border-color: #007AFF;
    background: linear-gradient(135deg, rgba(0,122,255,0.1), rgba(0,122,255,0.06));
    box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}

.booking-option-info {
    flex: 1;
    min-width: 0;
}

.booking-option-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.booking-option-description {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.booking-option-price {
    font-size: 15px;
    font-weight: 600;
    color: #007AFF;
    white-space: nowrap;
}

/* Booking Modal Responsive */
@media screen and (max-width: 900px) {
    .booking-modal-content {
        width: calc(100% - 32px);
        max-width: none;
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
    }
}

@media screen and (max-width: 600px) {
    .booking-modal {
        align-items: stretch;
    }

    .booking-modal-content {
        width: 100%;
        max-width: none;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
    }

    .booking-modal.open .booking-modal-content {
        transform: none;
    }

    .booking-steps {
        padding: 16px;
    }

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

    .booking-modal-body {
        padding: 20px 16px;
    }

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

    .booking-summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .booking-summary-value {
        text-align: left;
        width: 100%;
    }
}

@media screen and (max-width: 400px) {
    .booking-slots {
        grid-template-columns: repeat(2, 1fr);
    }
}
