/**
 * Estilos para o Modal de PIX
 * Sistema de Doação Ajude Theo
 */

/* Modal de Loading */
#pix-loading-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    width: 90%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* Modal Principal PIX */
#pix-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
}

.pix-modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

.pix-modal-title {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-align: center;
}

.pix-modal-subtitle {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0 0 25px 0;
    text-align: center;
}

.pix-amount-display {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 25px 0;
    text-align: center;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}


.pix-instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 0 0 25px 0;
    text-align: left;
}

.pix-instructions h4 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.pix-instructions ol {
    color: #555;
    font-size: 14px;
    margin: 0;
    padding-left: 20px;
}

.pix-instructions li {
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.pix-code-container {
    margin: 0 0 20px 0;
}

.pix-code-label {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-align: left;
}

#pix-code {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    color: #333;
    resize: vertical;
    min-height: 60px;
    box-sizing: border-box;
}

#pix-code:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.pix-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.pix-button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.pix-button-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.pix-button-primary:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.pix-button-secondary {
    background: #6c757d;
    color: white;
}

.pix-button-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.pix-button-outline {
    background: transparent;
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

.pix-button-outline:hover {
    background: #4CAF50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* Responsividade */
@media (max-width: 768px) {
    .pix-modal-content {
        padding: 20px;
        margin: 20px;
        max-width: none;
        width: calc(100% - 40px);
    }
    
    .pix-modal-title {
        font-size: 20px;
    }
    
    .pix-amount-display {
        font-size: 24px;
    }
    
    
    .pix-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .pix-button {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .pix-modal-content {
        padding: 15px;
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .pix-modal-title {
        font-size: 18px;
    }
    
    .pix-amount-display {
        font-size: 20px;
        padding: 12px;
    }
    
}

/* Animações */
.pix-modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.loading-content {
    animation: modalSlideIn 0.3s ease-out;
}

/* Melhorias de acessibilidade */
.close-modal:focus,
.pix-button:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Estados de loading nos botões */
.pix-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.pix-button:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}
