/* Checkout Page */
/* Checkout Container */
.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

.checkout-header {
    text-align: center;
    margin-bottom: 40px;
}

.checkout-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--surface);
    margin-bottom: 8px;
}

.checkout-header p {
    color: var(--text-light);
    font-size: 16px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 32px;
}

/* Form Card */
.form-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 32px;
    position: sticky;
    top: 12%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
}

.form-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.required {
    color: var(--primary);
}

.optional {
    color: var(--text-light);
    font-weight: normal;
    font-size: 12px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--bg);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

textarea.form-control {
    resize: vertical;
}

/* Summary Card */
.summary-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-light);
}

.summary-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.booking-badge {
    background: var(--green-light);
    color: var(--green);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.summary-details {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background: var(--bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-content {
    flex: 1;
}

.info-label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* Slots Section */
.slots-section {
    margin: 20px 0;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.slots-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.slot-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.slots-list {
    max-height: 180px;
    overflow-y: auto;
    border-radius: 12px;
}

.loading-slots {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}

.slot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.slot-item:hover {
    background: var(--primary-light);
    /* transform: translateX(4px); */
}

.slot-item:last-child {
    margin-bottom: 0;
}

.slot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slot-date {
    font-weight: 600;
    color: var(--text);
    background: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
}

.slot-time {
    color: var(--text-light);
    font-size: 13px;
}

/* Price Breakdown */
.price-breakdown {
    margin-top: 20px;
}

.price-detail {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: var(--text-light);
    font-size: 14px;
}

.price-total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0 0;
    margin-top: 8px;
    border-top: 2px solid var(--border);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.total-amount {
    color: var(--primary);
    font-size: 24px;
}

/* Payment Card */
.payment-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.payment-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.payment-options {
    display: flex;
    gap: 16px;
}

.payment-option {
    flex: 1;
    position: relative;
    cursor: pointer;
    padding: 16px;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    transition: all 0.2s ease;
}

.payment-option:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.payment-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-option:has(input:checked) .check-mark {
    display: flex;
}

.payment-option-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-icon {
    font-size: 28px;
}

.payment-info {
    flex: 1;
}

.payment-name {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.payment-desc {
    font-size: 11px;
    color: var(--text-light);
}

.check-mark {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Terms Card */
.terms-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-light);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-secondary {
    flex: 1;
    background: var(--bg);
    border: 1.5px solid var(--border);
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-primary {
    flex: 1;
    background: var(--primary);
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 16px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    max-width: 400px;
    text-align: center;
    animation: modalSlide 0.3s ease;
}

.success-animation {
    font-size: 64px;
    margin-bottom: 20px;
}

.modal-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.modal-content p {
    color: var(--text-light);
    margin-bottom: 24px;
}

.booking-id-box {
    background: var(--bg);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.booking-id-box span {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.booking-id-box strong {
    font-size: 20px;
    color: var(--primary);
}

.modal-content .btn-primary {
    width: 100%;
    padding: 14px;
}

@keyframes modalSlide {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .payment-options {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }

    .checkout-header h1 {
        font-size: 24px;
    }

    .form-card,
    .summary-card,
    .payment-card,
    .terms-card {
        padding: 20px;
    }
}
