/* Checkout Modal Styles */
.checkout-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.checkout-modal-content {
    position: relative;
    background: white;
    margin: 2% auto;
    max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    max-height: 95vh;
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.checkout-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.checkout-modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.checkout-close-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.checkout-close-btn:hover {
    color: var(--color-text);
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.checkout-modal-body {
    padding: 2rem 2.5rem 2.5rem;
}

#checkout-form .form-group {
    margin-bottom: 1.5rem;
}

#checkout-form label {
    display: block;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

#checkout-form input,
#checkout-form select,
#checkout-form textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    background: white;
}

#checkout-form input:focus,
#checkout-form select:focus,
#checkout-form textarea:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

#checkout-form textarea {
    resize: vertical;
    min-height: 120px;
}

.checkout-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 1.05rem;
}

.checkout-summary-row:first-child {
    padding-top: 0;
}

.checkout-summary-row:last-child {
    padding-bottom: 0;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.2rem;
}

.checkout-summary-row strong {
    color: var(--color-text);
    font-weight: 600;
}

.checkout-error {
    background: #ffe5e5;
    color: #d32f2f;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border-left: 4px solid #d32f2f;
}

.checkout-submit-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1.1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    position: relative;
}

.checkout-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.checkout-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.checkout-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.checkout-notice {
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .checkout-modal-content {
        margin: 0;
        max-width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }

    .checkout-modal-header {
        padding: 1.5rem;
    }

    .checkout-modal-header h2 {
        font-size: 1.5rem;
    }

    .checkout-modal-body {
        padding: 1.5rem;
    }

    #checkout-form input,
    #checkout-form select,
    #checkout-form textarea {
        padding: 0.8rem 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Buy Now Button Styles */
.buy-now-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    text-decoration: none;
    display: inline-block;
    margin-top: 0.5rem;
}

.buy-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.buy-now-btn:active {
    transform: translateY(0);
}

/* Etsy button alternative styling */
.etsy-btn {
    background: #f1641e;
    box-shadow: 0 4px 15px rgba(241, 100, 30, 0.3);
}

.etsy-btn:hover {
    box-shadow: 0 6px 20px rgba(241, 100, 30, 0.4);
}
