
/* Custom checkbox styling for terms and conditions */
.checkout-checkbox {
    appearance: none;
    background-color: #fff;
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 1.15em;
    height: 1.15em;
    border: 0.15em solid #6b7280;
    border-radius: 0.15em;
    transform: translateY(-0.075em);
    display: grid;
    place-content: center;
}

.checkout-checkbox::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    transform: scale(0);
    transform-origin: bottom left;
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em #059669;
}

.checkout-checkbox:checked::before {
    transform: scale(1);
}

.checkout-checkbox:focus {
    outline: max(2px, 0.15em) solid #059669;
    outline-offset: max(2px, 0.15em);
}

/* Form validation styles */
.form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Terms and conditions scrollable area */
.terms-scroll {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f9fafb;
}

.terms-scroll::-webkit-scrollbar {
    width: 8px;
}

.terms-scroll::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 4px;
}

.terms-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.terms-scroll::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Loading button animation */
@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.btn-loading {
    animation: pulse-green 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
}

/* Responsive improvements for mobile */
@media (max-width: 640px) {
    .checkout-form-section {
        padding: 1rem;
    }
    
    .checkout-form-section h2 {
        font-size: 1.5rem;
    }
}

/* Order summary sticky positioning improvement */
@media (min-width: 1024px) {
    .order-summary-sticky {
        position: sticky;
        top: 6rem;
        height: fit-content;
    }
}

/* Progress indicators */
.progress-step {
    transition: all 0.3s ease;
}

.progress-step.completed {
    background-color: #059669;
    color: white;
}

.progress-step.active {
    background-color: #10b981;
    color: white;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Form field focus improvements */
.form-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    transition: all 0.2s ease;
}

/* Delivery address toggle animation */
.delivery-address-toggle {
    transition: all 0.3s ease;
    overflow: hidden;
}

.delivery-address-toggle.hidden {
    max-height: 0;
    opacity: 0;
}

.delivery-address-toggle:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}
