/* CartFlows Modal Styles for Framer Website */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
}

.modal-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.modal-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
}

.order-summary {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 0.95rem;
}

.summary-row span:first-child {
    font-weight: 500;
}

.summary-row span:last-child {
    font-weight: 600;
    color: #334155;
}

.summary-row.total {
    border-top: 2px solid #e2e8f0;
    padding-top: 15px;
    margin-top: 15px;
    font-weight: bold;
    color: #1e293b;
    font-size: 1.2rem;
}

.summary-row.total span:last-child {
    color: #10b981;
    font-size: 1.3rem;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-group input {
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.checkout-btn {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.checkout-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.checkout-btn:hover:before {
    left: 100%;
}

.checkout-btn:hover {
    background: linear-gradient(45deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.3);
}

.checkout-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.primary-checkout-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.primary-checkout-btn:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 6px;
    display: none;
    font-weight: 500;
}

.payment-methods {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e2e8f0;
}

.payment-method {
    padding: 8px 14px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.payment-method:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.security-badge {
    text-align: center;
    margin-top: 15px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.security-badge span {
    font-size: 0.8rem;
    color: #059669;
    font-weight: 500;
}

.security-icon {
    display: inline-block;
    margin-right: 6px;
    color: #10b981;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 3% auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .payment-methods {
        gap: 8px;
    }
    
    .payment-method {
        padding: 6px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .summary-row {
        font-size: 0.9rem;
    }
    
    .checkout-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}