/* ==========================================
   🚀 MELHORIAS DO MODAL DE DEPÓSITO
   ========================================== */

/* ✅ Modal mais responsivo e rápido */
.profile-modal.deposit-modal {
    max-width: 480px !important;
    max-height: 90vh !important;
    animation: modalFadeIn 0.2s ease-out !important;
}

@keyframes modalFadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.95) translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

/* ✅ Header melhorado */
.profile-modal-header h2 {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
}

/* ✅ Botão de fechar melhorado */
.profile-modal-close {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.5rem !important;
    background: rgba(255, 107, 53, 0.2) !important;
    border: 1px solid rgba(255, 107, 53, 0.4) !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.profile-modal-close:hover {
    background: #ff6b35 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4) !important;
}

/* ✅ Conteúdo do depósito - sem delay */
.deposit-content {
    padding: 25px !important;
    animation: contentSlideIn 0.3s ease-out !important;
}

@keyframes contentSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ✅ Grid de valores - SEMPRE 3 botões por fileira */
.amounts-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.amount-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 61px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #ffffff0d, #ffffff08) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    padding: 0 4px !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.amount-card:hover {
    background: linear-gradient(135deg, #ffffff1a, #ffffff12) !important;
    border-color: #ff6b35 !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.3) !important;
}

.amount-card.selected {
    background: linear-gradient(135deg, #ff6b35, #ff8a65) !important;
    border-color: #fff !important;
    color: #fff !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.5) !important;
}

/* ✅ Input de valor customizado com validação */
.form-input[type="number"] {
    height: 56px !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    background: linear-gradient(135deg, #ffffff14, #ffffff08) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    color: #fff !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

.form-input[type="number"]:focus {
    border-color: #ff6b35 !important;
    background: linear-gradient(135deg, #ffffff1a, #ffffff12) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2) !important;
    transform: scale(1.02) !important;
}

/* ✅ Estados de validação */
.form-input[type="number"].invalid {
    border-color: #f44336 !important;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(244, 67, 54, 0.05)) !important;
    animation: shake 0.5s ease-in-out !important;
}

.form-input[type="number"].valid {
    border-color: #4caf50 !important;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05)) !important;
}

/* ✅ Animação de erro */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ✅ Mensagem de validação */
.validation-message {
    display: none !important;
    margin-top: 8px !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    animation: slideDown 0.3s ease-out !important;
}

.validation-message.error {
    display: block !important;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15), rgba(244, 67, 54, 0.08)) !important;
    border: 1px solid rgba(244, 67, 54, 0.3) !important;
    color: #ff6b6b !important;
}

.validation-message.success {
    display: block !important;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.08)) !important;
    border: 1px solid rgba(76, 175, 80, 0.3) !important;
    color: #66bb6a !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ✅ Placeholder personalizado */
.form-input[type="number"]::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 1rem !important;
    text-align: center !important;
}

/* ✅ Botão de depósito principal - 126px x 61px */
.deposit-button, 
.action-button.deposit-button {
    width: 100% !important;
    height: 61px !important;
    background: linear-gradient(135deg, #4caf50, #66bb6a) !important;
    border: 2px solid #388e3c !important;
    border-radius: 12px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3) !important;
}

.deposit-button:hover,
.action-button.deposit-button:hover {
    background: linear-gradient(135deg, #43a047, #5cb85c) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.5) !important;
}

.deposit-button:active,
.action-button.deposit-button:active {
    transform: translateY(0) scale(0.98) !important;
}

/* ✅ Botão de copiar PIX - 126px x 61px quando sozinho */
.copy-btn {
    min-width: 48px !important;
    height: 48px !important;
    background: linear-gradient(135deg, #ff6b35, #ff8a65) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3) !important;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #ff5722, #ff6b35) !important;
    transform: translateY(-2px) scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5) !important;
}

/* ✅ Responsividade melhorada */
@media (min-width: 769px) {
    /* Desktop - MANTÉM 3 botões por fileira */
    .amounts-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
    }
    
    .amount-card {
        font-size: 1rem !important;
        padding: 0 8px !important;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    /* Tablet - 3 botões por fileira */
    .amounts-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
    }
    
    .amount-card {
        font-size: 0.95rem !important;
        padding: 0 6px !important;
    }
    
    .deposit-content {
        padding: 22px !important;
    }
}

@media (max-width: 480px) {
    /* Mobile - 3 botões por fileira, tamanho 106x61px */
    .profile-modal.deposit-modal {
        max-width: calc(100vw - 20px) !important;
        margin: 10px !important;
    }
    
    .amounts-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .amount-card {
        font-size: 0.85rem !important;
        padding: 0 2px !important;
    }
    
    .deposit-content {
        padding: 18px !important;
    }
    
    .profile-modal-header h2 {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 360px) {
    /* Mobile pequeno - mantém 3 por fileira mas ajusta espaçamento */
    .amounts-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
    
    .amount-card {
        font-size: 0.8rem !important;
        padding: 0 1px !important;
    }
    
    .deposit-content {
        padding: 15px !important;
    }
}

/* ✅ Animações suaves para elementos que aparecem com delay */
.recommended-amounts,
.deposit-form,
.payment-content {
    animation: elementFadeIn 0.4s ease-out !important;
}

@keyframes elementFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ✅ QR Code melhorado */
.qr-code-container {
    background: linear-gradient(135deg, #ffffff0d, #ffffff05) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    animation: qrFadeIn 0.5s ease-out !important;
}

@keyframes qrFadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

.qr-code-image {
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

/* ✅ Status de pagamento melhorado */
.payment-status {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(255, 152, 0, 0.05)) !important;
    border: 2px solid rgba(255, 152, 0, 0.4) !important;
    border-radius: 16px !important;
    animation: statusPulse 2s ease-in-out infinite !important;
}

@keyframes statusPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4); 
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(255, 152, 0, 0.1); 
    }
}

/* ✅ Sucesso melhorado */
.deposit-success {
    text-align: center !important;
    animation: successBounce 0.6s ease-out !important;
}

@keyframes successBounce {
    0% { 
        opacity: 0; 
        transform: scale(0.8) translateY(20px); 
    }
    60% { 
        opacity: 1; 
        transform: scale(1.05) translateY(-5px); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

/* ✅ Loading states */
.deposit-button:disabled,
.action-button:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ✅ Limites de depósito melhorados */
.deposit-limits {
    background: linear-gradient(135deg, #ffffff0d, #ffffff05) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 18px !important;
    margin-bottom: 20px !important;
}

.deposit-limits h4 {
    color: #fff !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin-bottom: 15px !important;
    text-align: center !important;
}

.limits-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
}

.limit-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 16px !important;
    background: linear-gradient(135deg, #ffffff15, #ffffff08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
    flex-wrap: nowrap !important;
    min-height: 48px !important;
}

.limit-item:hover {
    background: linear-gradient(135deg, #ffffff20, #ffffff12) !important;
    border-color: rgba(255, 107, 53, 0.3) !important;
    transform: translateY(-1px) !important;
}

.limit-label {
    font-size: 0.95rem !important;
    color: #ffffffcc !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin-right: 12px !important;
}

.limit-value {
    font-size: 1rem !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-align: right !important;
    white-space: nowrap !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    background: linear-gradient(135deg, #ff6b35, #ff8a65) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ✅ Responsividade para limites */
@media (min-width: 481px) {
    .limits-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
    }
}

@media (max-width: 480px) {
    .deposit-limits {
        padding: 15px !important;
        margin-bottom: 18px !important;
    }
    
    .deposit-limits h4 {
        font-size: 1rem !important;
        margin-bottom: 12px !important;
    }
    
    .limits-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .limit-item {
        padding: 10px 14px !important;
        min-height: 44px !important;
    }
    
    .limit-label {
        font-size: 0.9rem !important;
        margin-right: 10px !important;
    }
    
    .limit-value {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 360px) {
    .deposit-limits {
        padding: 12px !important;
    }
    
    .limit-item {
        padding: 8px 12px !important;
        min-height: 40px !important;
    }
    
    .limit-label {
        font-size: 0.85rem !important;
        margin-right: 8px !important;
    }
    
    .limit-value {
        font-size: 0.9rem !important;
    }
}

/* ✅ Focus states para acessibilidade */
.amount-card:focus,
.deposit-button:focus,
.copy-btn:focus {
    outline: 3px solid rgba(255, 107, 53, 0.5) !important;
    outline-offset: 2px !important;
}
