/* Noor Sprouts - Checkout Modal Styles */

/* Progress indicator */
.checkout-progress {
    font-size: 0.875rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
}

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

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid currentColor;
}

.progress-step.active .step-number {
    background-color: #198754;
    color: white;
    border-color: #198754;
}

.progress-line {
    width: 40px;
    height: 2px;
    background-color: #dee2e6;
}

/* Error alert animation */
.checkout-error-alert {
    border-left: 4px solid #dc3545;
    animation: slideDown 0.3s ease-out;
}

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

/* Modal responsive sizing */
#checkoutModal {
    overflow: hidden;
    padding: 1rem !important;
}

#checkoutModal .checkout-modal-dialog {
    width: min(600px, calc(100% - 1rem));
    max-width: 600px;
    height: min(760px, calc(100dvh - 2rem));
    max-height: calc(100dvh - 2rem);
    margin: 0 auto;
    transform: translateY(14px);
}

#checkoutModal .modal-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

#checkoutModal .modal-header,
#checkoutModal .checkout-progress {
    flex: 0 0 auto;
}

#checkoutModal .modal-header {
    display: flex !important;
    min-height: 56px;
    visibility: visible !important;
}

#checkoutModal .modal-header .btn-close {
    display: block !important;
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    opacity: .75;
}

#checkoutModal .modal-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 576px) {
    .checkout-modal-dialog {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .checkout-modal-dialog {
        max-width: 600px;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 575px) {
    .checkout-modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
        width: calc(100% - 1rem);
        height: calc(100dvh - 1rem);
        max-height: calc(100dvh - 1rem);
        margin: 0.5rem auto;
        transform: none;
    }

    #checkoutModal .modal-body {
        padding: 1rem;
    }

    .checkout-progress {
        padding: 0.75rem 1rem !important;
    }

    .step-label {
        display: none;
    }

    .progress-line {
        width: 20px;
    }
}

/* Prevent iOS zoom on input focus */
@media (max-width: 767px) {
    #checkout-email {
        font-size: 16px;
    }
}
