* {
    font-family: Poppins;
}

/* Botão primário global - apenas dimensões, cores via tokens */
.ant-btn-primary {
    width: Hug (156px);
    height: Hug (32px);
    padding: 4px 15px 4px 15px;
    border-radius: 2px;
    border: 1px;
    gap: 8px;
}

.ant-select .ant-select-selection-placeholder {
    color: var(--ant-color-text-placeholder);
}

/* Garantir visibilidade dos modais */
.ant-modal {
    z-index: 1000 !important;
}

.ant-modal-mask {
    background-color: var(--ant-color-bg-mask, rgba(0, 0, 0, 0.45)) !important;
    z-index: 999 !important;
}

.ant-modal-wrap {
    z-index: 1000 !important;
}



/* Tema claro específico para modal */
body.light .ant-modal-content,
html.light .ant-modal-content,
.ant-modal-content {
    background-color: #ffffff !important;
    color: #000000 !important;
}

body.light .ant-modal-header,
html.light .ant-modal-header,
.ant-modal-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #d9d9d9 !important;
}

body.light .ant-modal-title,
html.light .ant-modal-title,
.ant-modal-title {
    color: #000000 !important;
}

body.light .ant-modal-body,
html.light .ant-modal-body,
.ant-modal-body {
    color: #000000 !important;
}

body.light .ant-modal-footer,
html.light .ant-modal-footer,
.ant-modal-footer {
    border-top: 1px solid #d9d9d9 !important;
}

body.light .ant-modal-close,
html.light .ant-modal-close,
.ant-modal-close {
    color: #000000 !important;
}

body.light .ant-modal-close:hover,
html.light .ant-modal-close:hover,
.ant-modal-close:hover {
    color: #000000 !important;
}

/* Tema escuro específico para modal - sobrescreve os fallbacks */
body.dark .ant-modal-content,
html.dark .ant-modal-content {
    background-color: #2c2c2c !important;
    color: #f5f5f5 !important;
}

body.dark .ant-modal-header,
html.dark .ant-modal-header {
    background-color: #2c2c2c !important;
    border-bottom: 1px solid #444444 !important;
}

body.dark .ant-modal-title,
html.dark .ant-modal-title {
    color: #f5f5f5 !important;
}

body.dark .ant-modal-body,
html.dark .ant-modal-body {
    color: #f5f5f5 !important;
}

body.dark .ant-modal-footer,
html.dark .ant-modal-footer {
    border-top: 1px solid #444444 !important;
}

body.dark .ant-modal-close,
html.dark .ant-modal-close {
    color: #f5f5f5 !important;
}

body.dark .ant-modal-close:hover,
html.dark .ant-modal-close:hover {
    color: #f5f5f5 !important;
}

/* Remover regras específicas de dark mode - deixar que as variáveis CSS do Ant Design funcionem */


/* Estilos para modais de confirmação (Modal.error, Modal.success, etc.) */
/* Tema claro para modais de confirmação */
body.light .ant-modal-confirm,
html.light .ant-modal-confirm,
.ant-modal-confirm {
    color: #000000 !important;
}

body.light .ant-modal-confirm .ant-modal-confirm-title,
html.light .ant-modal-confirm .ant-modal-confirm-title,
.ant-modal-confirm .ant-modal-confirm-title {
    color: #000000 !important;
}

body.light .ant-modal-confirm .ant-modal-confirm-content,
html.light .ant-modal-confirm .ant-modal-confirm-content,
.ant-modal-confirm .ant-modal-confirm-content {
    color: #000000 !important;
}

/* Remover linha indevida no rodapé do modal de confirmação */
body.light .ant-modal-confirm .ant-modal-confirm-btns,
html.light .ant-modal-confirm .ant-modal-confirm-btns,
.ant-modal-confirm .ant-modal-confirm-btns {
    border-top: none !important;
}

body.light .ant-modal-confirm .ant-btn,
html.light .ant-modal-confirm .ant-btn,
.ant-modal-confirm .ant-btn {
    background-color: rgb(254, 59, 0) !important;
    color: #ffffff !important;
}

/* Botão primário no modal de confirmação - deixar tokens do Ant Design funcionarem */

/* Tema escuro para modais de confirmação */
body.dark .ant-modal-confirm {
    background-color: #2c2c2c !important;
    color: #f5f5f5 !important;
}

body.dark .ant-modal-confirm .ant-modal-confirm-title {
    color: #f5f5f5 !important;
}

body.dark .ant-modal-confirm .ant-modal-confirm-content {
    color: #f5f5f5 !important;
}

/* Remover linha indevida no rodapé do modal de confirmação - Dark Mode */
body.dark .ant-modal-confirm .ant-modal-confirm-btns {
    border-top: none !important;
}

body.dark .ant-modal-confirm .ant-btn {
    background-color: rgb(254, 59, 0) !important;
    color: #ffffff !important;
}

/* Botão primário no modal de confirmação - Dark Mode - deixar tokens do Ant Design funcionarem */

/* Garantir visibilidade dos modais de confirmação */
.ant-modal-confirm {
    z-index: 1000 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Remover regras específicas de dark mode - deixar que as variáveis CSS do Ant Design funcionem */


/* Corrigir arredondamento e espaçamento dos modais de confirmação */
.ant-modal-confirm .ant-modal-content {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
}

/* Remover padding excessivo do corpo do modal de confirmação */
.ant-modal-confirm .ant-modal-confirm-body {
    padding: 24px 24px 16px 24px !important;
}

/* Ajustar espaçamento da área de botões */
.ant-modal-confirm .ant-modal-confirm-btns {
    padding: 0 24px 24px 24px !important;
    margin: 0 !important;
}

/* Remover regras específicas de dark mode - deixar que as variáveis CSS do Ant Design funcionem */


/* ===== REGRAS CSS PARA SELECT E INPUT - DARK MODE ===== */
/* ===== SELECT COMPONENT ===== */

/* Tema claro para Select */
body.light .ant-select,
html.light .ant-select {
    background-color: #ffffff !important;
    color: #000000 !important;
}

body.light .ant-select-selector,
html.light .ant-select-selector {
    background-color: #ffffff !important;
    border: 1px solid #d9d9d9 !important;
    color: #000000 !important;
}

body.light .ant-select-selection-item,
html.light .ant-select-selection-item {
    color: #000000 !important;
}

body.light .ant-select-selection-placeholder,
html.light .ant-select-selection-placeholder {
    color: #bfbfbf !important;
}

body.light .ant-select-dropdown,
html.light .ant-select-dropdown {
    background-color: #ffffff !important;
    border: 1px solid #d9d9d9 !important;
}

body.light .ant-select-item,
html.light .ant-select-item {
    background-color: #ffffff !important;
    color: #000000 !important;
}

body.light .ant-select-item:hover,
html.light .ant-select-item:hover {
    background-color: #f5f5f5 !important;
}

body.light .ant-select-item-option-selected,
html.light .ant-select-item-option-selected {
    background-color: #e6f7ff !important;
    color: #000000 !important;
}

/* Tema escuro para Select */
body.dark .ant-select,
html.dark .ant-select {
    background-color: #2c2c2c !important;
    color: #f5f5f5 !important;
}

body.dark .ant-select-selector,
html.dark .ant-select-selector {
    background-color: #2c2c2c !important;
    border: 1px solid #444444 !important;
    color: #f5f5f5 !important;
}

body.dark .ant-select-selection-item,
html.dark .ant-select-selection-item {
    color: #f5f5f5 !important;
}

body.dark .ant-select-selection-placeholder,
html.dark .ant-select-selection-placeholder {
    color: #8c8c8c !important;
}

body.dark .ant-select-dropdown,
html.dark .ant-select-dropdown {
    background-color: #2c2c2c !important;
    border: 1px solid #444444 !important;
}

body.dark .ant-select-item,
html.dark .ant-select-item {
    background-color: #2c2c2c !important;
    color: #f5f5f5 !important;
}

body.dark .ant-select-item:hover,
html.dark .ant-select-item:hover {
    background-color: #404040 !important;
}

/* ===== REGRAS COM ALTA ESPECIFICIDADE PARA PLATAFORMA ===== */
body.dark .ant-select-item-option-selected,
html.dark .ant-select-item-option-selected,
body.dark .ant-select-dropdown .ant-select-item-option-selected,
html.dark .ant-select-dropdown .ant-select-item-option-selected,
body.dark .ant-select .ant-select-item-option-selected,
html.dark .ant-select .ant-select-item-option-selected {
    background-color: #e6f7ff !important;
    color: #000000 !important;
    background: #e6f7ff !important;
}

/* Regra adicional para garantir que o texto seja preto */
body.dark .ant-select-item-option-selected .ant-select-item-option-content,
html.dark .ant-select-item-option-selected .ant-select-item-option-content,
body.dark .ant-select-dropdown .ant-select-item-option-selected .ant-select-item-option-content,
html.dark .ant-select-dropdown .ant-select-item-option-selected .ant-select-item-option-content {
    color: #000000 !important;
}

/* ===== INPUT COMPONENT ===== */

/* Tema claro para Input */
body.light .ant-input,
html.light .ant-input {
    background-color: #ffffff !important;
    border: 1px solid #d9d9d9 !important;
    color: #000000 !important;
}

body.light .ant-input:hover,
html.light .ant-input:hover {
    border-color: #40a9ff !important;
}

body.light .ant-input:focus,
html.light .ant-input:focus {
    border-color: var(--ant-color-primary) !important;
    box-shadow: 0 0 0 2px rgba(254, 59, 0, 0.2) !important;
}

body.light .ant-input::placeholder,
html.light .ant-input::placeholder {
    color: #bfbfbf !important;
}

/* Tema escuro para Input */
body.dark .ant-input,
html.dark .ant-input {
    background-color: #2c2c2c !important;
    border: 1px solid #444444 !important;
    color: #f5f5f5 !important;
}

body.dark .ant-input:hover,
html.dark .ant-input:hover {
    border-color: #40a9ff !important;
}

body.dark .ant-input:focus,
html.dark .ant-input:focus {
    border-color: var(--ant-color-primary) !important;
    box-shadow: 0 0 0 2px rgba(254, 59, 0, 0.2) !important;
}

body.dark .ant-input::placeholder,
html.dark .ant-input::placeholder {
    color: #8c8c8c !important;
}

/* ===== FIM DAS REGRAS CSS PARA SELECT E INPUT ===== */

/* ===== REGRAS DE EMERGÊNCIA PARA PLATAFORMA ===== */
/* Força a aplicação das regras mesmo com CSS externo */
[data-theme="dark"] .ant-select-item-option-selected,
[data-theme="dark"] .ant-select-dropdown .ant-select-item-option-selected {
    background-color: #e6f7ff !important;
    color: #000000 !important;
    background: #e6f7ff !important;
}

[data-theme="dark"] .ant-select-item-option-selected .ant-select-item-option-content {
    color: #000000 !important;
}

/* Regra de último recurso */
.ant-select-dropdown .ant-select-item-option-selected[class*="dark"],
.ant-select-dropdown .ant-select-item-option-selected[data-theme="dark"] {
    background-color: #e6f7ff !important;
    color: #000000 !important;
}

