/* ===== CHECKOUT ELEGANTE ===== */

.elegant-checkout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.elegant-checkout-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.checkout-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.header-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Progress */
.progress-container {
    padding: 2rem 2rem 1rem 2rem;
    background: #f8fafc;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 50%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    max-width: 300px;
    margin: 0 auto;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active .step-circle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
}

.step span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
}

.step.active span {
    color: #1a202c;
    font-weight: 600;
}

/* Content */
.checkout-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.checkout-step {
    display: none;
    height: 100%;
    flex-direction: column;
}

.checkout-step.active {
    display: flex;
}

.step-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* Form Section */
.form-section h3 {
    margin: 0 0 1.5rem 0;
    color: #1a202c;
    font-size: 1.3rem;
    font-weight: 600;
}

.elegant-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.form-group input {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.valid {
    border-color: #10b981;
    background: #f0fdf4;
}

.form-group input.invalid {
    border-color: #ef4444;
    background: #fef2f2;
}

.field-status {
    font-size: 0.8rem;
    min-height: 1.2rem;
    display: flex;
    align-items: center;
}

.field-status.success {
    color: #10b981;
}

.field-status.error {
    color: #ef4444;
}

.field-status.loading {
    color: #667eea;
}

/* Plan Summary */
.plan-summary h3 {
    margin: 0 0 1rem 0;
    color: #1a202c;
    font-size: 1.1rem;
    font-weight: 600;
}

.checkout-plan-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.plan-header {
    text-align: center;
    margin-bottom: 1rem;
}

.plan-header h4 {
    margin: 0 0 0.5rem 0;
    color: #1a202c;
    font-size: 1.2rem;
    font-weight: 600;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: #667eea;
}

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    border: 1px solid #e5e7eb;
}

/* Step Actions */
.step-actions {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-success {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: white;
    color: #64748b;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* Payment Section */
.payment-section {
    grid-column: 1 / -1;
}

.payment-section h3 {
    margin: 0 0 2rem 0;
    color: #1a202c;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

/* Loading */
.loading-payment {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* PIX Payment Success */
.pix-payment-success {
    max-width: 600px;
    margin: 0 auto;
}

.pix-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 16px;
    border: 1px solid #0ea5e9;
}

.pix-icon {
    width: 48px;
    height: 48px;
    background: #0ea5e9;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pix-info h4 {
    margin: 0 0 0.25rem 0;
    color: #0c4a6e;
    font-size: 1.2rem;
}

.pix-info p {
    margin: 0;
    color: #0369a1;
    font-size: 0.9rem;
}

.qr-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.qr-code {
    text-align: center;
}

.qr-code img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.pix-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.detail-item .label {
    color: #64748b;
    font-weight: 500;
}

.detail-item .value {
    color: #1a202c;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .elegant-checkout-container {
        margin: 10px;
        max-height: 95vh;
    }
    
    .checkout-header {
        padding: 1.5rem;
    }
    
    .step-content {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .qr-section {
        grid-template-columns: 1fr;
    }
    
    .step-actions {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-success {
        width: 100%;
        justify-content: center;
    }
}

/* PIX Copy Section */
.pix-copy-section {
    margin-bottom: 2rem;
}

.pix-copy-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.copy-container {
    display: flex;
    gap: 0.5rem;
}

.copy-container input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.8rem;
    background: #f9fafb;
}

.copy-btn {
    padding: 0.75rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

/* Payment Instructions */
.payment-instructions {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #374151;
}

.instruction-item:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Auto Check Info */
.auto-check-info {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 12px;
    border: 1px solid #10b981;
    margin-bottom: 1rem;
}

.auto-check-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auto-check-info p {
    margin: 0;
    color: #065f46;
    font-size: 0.9rem;
    font-weight: 500;
}

/* WhatsApp Section */
.whatsapp-section {
    text-align: center;
    margin-top: 1rem;
}

.whatsapp-btn {
    background: #25d366;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.whatsapp-btn:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

/* Payment Success */
.payment-success {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    color: #10b981;
    margin-bottom: 1rem;
}

.payment-success h3 {
    color: #065f46;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.payment-success p {
    color: #047857;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.payment-success .btn-success {
    margin-top: 2rem;
}

/* PIX Error */
.pix-error {
    text-align: center;
    padding: 3rem 2rem;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.pix-error h4 {
    color: #dc2626;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.pix-error p {
    color: #7f1d1d;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.retry-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pix-payment-success,
.payment-success,
.pix-error {
    animation: fadeIn 0.5s ease-out;
}

/* Custom Scrollbar */
.step-content::-webkit-scrollbar {
    width: 6px;
}

.step-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.step-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.step-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Focus States */
.btn-primary:focus,
.btn-secondary:focus,
.btn-success:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.copy-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.whatsapp-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3);
}

/* Loading States */
.btn-primary:disabled,
.btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .elegant-checkout-container {
        border: 2px solid #000;
    }

    .form-group input {
        border-width: 3px;
    }

    .btn-primary,
    .btn-success {
        border: 2px solid #000;
    }
}
