/* ============================================
   PADRONIZAÇÃO DE EFEITOS E BOTÕES
   Garante que efeitos e hover states sejam
   consistentes entre modos claro e escuro
   ============================================ */

/* ==================== BOTÕES PRIMÁRIOS ==================== */

/* Modo Claro */
body:not(.dark-theme) .btn-primary {
    background: linear-gradient(135deg, #B8A1D9 0%, #9B7FC7 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(155, 127, 199, 0.3);
    border: none;
}

body:not(.dark-theme) .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(155, 127, 199, 0.4);
    background: linear-gradient(135deg, #9B7FC7 0%, #7A5FA8 100%);
}

/* Modo Escuro */
body.dark-theme .btn-primary {
    background: linear-gradient(135deg, #9B7FC7 0%, #7A5FA8 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(155, 127, 199, 0.4);
    border: 1px solid #B8A1D9;
}

body.dark-theme .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(155, 127, 199, 0.5);
    background: linear-gradient(135deg, #7A5FA8 0%, #9B7FC7 100%);
    border-color: #B8A1D9;
}

/* ==================== BOTÕES SECUNDÁRIOS ==================== */

/* Modo Claro */
body:not(.dark-theme) .btn-secondary {
    background: transparent;
    color: #9B7FC7;
    border: 2px solid #B8A1D9;
    box-shadow: none;
}

body:not(.dark-theme) .btn-secondary:hover {
    background: linear-gradient(135deg, #B8A1D9 0%, #9B7FC7 100%);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 127, 199, 0.3);
}

/* Modo Escuro */
body.dark-theme .btn-secondary {
    background: transparent;
    color: #DCCFF2;
    border: 2px solid #9B7FC7;
    box-shadow: none;
}

body.dark-theme .btn-secondary:hover {
    background: linear-gradient(135deg, #9B7FC7 0%, #7A5FA8 100%);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 127, 199, 0.4);
}

/* ==================== BOTÃO WHATSAPP ==================== */

/* Ambos os temas (consistente) */
.btn-whatsapp {
    background: #25D366;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    border: none;
}

.btn-whatsapp:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

body.dark-theme .btn-whatsapp {
    background: #25D366;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
}

body.dark-theme .btn-whatsapp:hover {
    background: #1da851;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

/* ==================== BOTÕES DO SISTEMA ==================== */

/* Botão Logout/Sair */
.btn-logout {
    background: #d97706;
    color: #ffffff;
    border: none;
}

.btn-logout:hover {
    background: #a66515;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

body.dark-theme .btn-logout {
    background: #d97706;
    border: 1px solid #b45309;
}

body.dark-theme .btn-logout:hover {
    background: #a66515;
    border-color: #d97706;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

/* Botão Gerar Link */
.btn-gerar-link,
.btn-generate {
    background: #7c3aed;
    color: #ffffff;
    border: none;
}

.btn-gerar-link:hover,
.btn-generate:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

body.dark-theme .btn-gerar-link,
body.dark-theme .btn-generate {
    background: #7c3aed;
    border: 1px solid #6d28d9;
}

body.dark-theme .btn-gerar-link:hover,
body.dark-theme .btn-generate:hover {
    background: #6d28d9;
    border-color: #7c3aed;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

/* Botão Exportar */
.btn-export {
    background: #e8c547;
    color: #2d2d2d;
    border: none;
}

.btn-export:hover {
    background: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(232, 197, 71, 0.4);
}

body.dark-theme .btn-export {
    background: #e8c547;
    border: 1px solid #d4af37;
}

body.dark-theme .btn-export:hover {
    background: #d4af37;
    border-color: #e8c547;
    box-shadow: 0 5px 20px rgba(232, 197, 71, 0.5);
}

/* Botão Limpar/Clear */
.btn-clear {
    background: #e74c3c;
    color: #ffffff;
    border: none;
}

.btn-clear:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

body.dark-theme .btn-clear {
    background: #e74c3c;
    border: 1px solid #c0392b;
}

body.dark-theme .btn-clear:hover {
    background: #c0392b;
    border-color: #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* ==================== BOTÕES DE AÇÃO (CARDS) ==================== */

/* Botão Ver/View */
.btn-view,
.btn-icon.btn-view {
    background: #7cb342;
    color: #ffffff;
    border: none;
}

.btn-view:hover,
.btn-icon.btn-view:hover {
    background: #3d6b20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.3);
}

body.dark-theme .btn-view,
body.dark-theme .btn-icon.btn-view {
    background: #7cb342;
    border: 1px solid #4a7b28;
}

body.dark-theme .btn-view:hover,
body.dark-theme .btn-icon.btn-view:hover {
    background: #3d6b20;
    border-color: #7cb342;
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.4);
}

/* Botão Delete */
.btn-delete,
.btn-icon.btn-delete {
    background: #e74c3c;
    color: #ffffff;
    border: none;
}

.btn-delete:hover,
.btn-icon.btn-delete:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

body.dark-theme .btn-delete,
body.dark-theme .btn-icon.btn-delete {
    background: #e74c3c;
    border: 1px solid #c0392b;
}

body.dark-theme .btn-delete:hover,
body.dark-theme .btn-icon.btn-delete:hover {
    background: #c0392b;
    border-color: #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* ==================== BOTÕES GERAIS ==================== */

/* Garantir transformação consistente */
button:not(:disabled):hover,
.btn:not(:disabled):hover,
input[type="button"]:not(:disabled):hover,
input[type="submit"]:not(:disabled):hover {
    transform: translateY(-2px) !important;
    transition: all 0.3s ease !important;
}

/* Estado disabled consistente */
button:disabled,
.btn:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

body.dark-theme button:disabled,
body.dark-theme .btn:disabled {
    opacity: 0.4;
}

/* ==================== BOTÕES DE NAVEGAÇÃO ==================== */

/* Botão Voltar */
.btn-voltar {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.btn-voltar:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

body.dark-theme .btn-voltar {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-theme .btn-voltar:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* ==================== BOTÕES CIRCULARES/ÍCONES ==================== */

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-icon:hover {
    transform: translateY(-2px) scale(1.05);
}

body.dark-theme .btn-icon:hover {
    transform: translateY(-2px) scale(1.05);
}

/* ==================== BOTÃO DE TEMA ==================== */

.theme-toggle {
    background: #9B7FC7;
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(155, 127, 199, 0.3);
}

.theme-toggle:hover {
    background: #7A5FA8;
    transform: translateY(-2px) rotate(180deg);
    box-shadow: 0 6px 25px rgba(155, 127, 199, 0.4);
}

body.dark-theme .theme-toggle {
    background: #2d2d2d;
    border-color: #9B7FC7;
    box-shadow: 0 4px 20px rgba(155, 127, 199, 0.4);
}

body.dark-theme .theme-toggle:hover {
    background: #3d3d3d;
    border-color: #B8A1D9;
    transform: translateY(-2px) rotate(180deg);
    box-shadow: 0 6px 25px rgba(155, 127, 199, 0.5);
}

/* ==================== ESTADOS DE FOCO ==================== */

/* Garantir outline consistente */
button:focus-visible,
.btn:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible {
    outline: 2px solid #7cb342 !important;
    outline-offset: 2px !important;
}

body.dark-theme button:focus-visible,
body.dark-theme .btn:focus-visible {
    outline: 2px solid #a5d46a !important;
    outline-offset: 2px !important;
}

/* ==================== TRANSIÇÕES ==================== */

/* Garantir transições suaves em todos os botões */
button,
.btn,
input[type="button"],
input[type="submit"],
a.btn {
    transition: all 0.3s ease !important;
}

/* ==================== SOMBRAS CONSISTENTES ==================== */

/* Sombras padrão no modo claro */
body:not(.dark-theme) button:not(:disabled):not(:hover),
body:not(.dark-theme) .btn:not(:disabled):not(:hover) {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Sombras padrão no modo escuro */
body.dark-theme button:not(:disabled):not(:hover),
body.dark-theme .btn:not(:disabled):not(:hover) {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ==================== ACTIVE STATE ==================== */

button:active,
.btn:active {
    transform: translateY(0) !important;
}

body.dark-theme button:active,
body.dark-theme .btn:active {
    transform: translateY(0) !important;
}

/* ==================== BOTÕES EM MODAIS ==================== */

.modal-footer .btn-confirm {
    background: #7cb342;
    color: #ffffff;
}

.modal-footer .btn-confirm:hover {
    background: #3d6b20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.3);
}

body.dark-theme .modal-footer .btn-confirm {
    background: #7cb342;
    border: 1px solid #4a7b28;
}

body.dark-theme .modal-footer .btn-confirm:hover {
    background: #3d6b20;
    border-color: #7cb342;
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.4);
}

.modal-footer .btn-cancel {
    background: #95a5a6;
    color: #ffffff;
}

.modal-footer .btn-cancel:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

body.dark-theme .modal-footer .btn-cancel {
    background: #95a5a6;
    border: 1px solid #7f8c8d;
}

body.dark-theme .modal-footer .btn-cancel:hover {
    background: #7f8c8d;
    border-color: #95a5a6;
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.4);
}
