/* assets/css/draw-manager.css */
/* Estilos para o shortcode [rmbz_gerir_sorteios] */
/* ATUALIZADO: Tema escuro para combinar com o frontend.css */

/* Container Principal */
.rmbz-draw-manager-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #1e1e1e; /* Cor escura */
    border: 1px solid #333; /* Borda escura */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: #f0f0f0; /* Cor de texto clara */
}

/* Avisos (Sucesso/Erro) */
.draw-notice {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}
.notice-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.notice-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Títulos */
.rmbz-draw-manager-container h2 {
    margin-top: 0;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    color: #fff;
}
.rmbz-draw-manager-container h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    color: #f0b90b; /* Cor de destaque */
}

/* Lista de Rifas (Seletor) */
.rifa-lista {
    list-style: none;
    padding: 0;
}
.rifa-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid #444;
    background-color: #2a2a2a; /* Fundo do item */
    margin-bottom: 10px;
    border-radius: 5px;
    transition: box-shadow 0.2s ease;
}
.rifa-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.rifa-item.concluida {
    background-color: #222; /* Mais escuro para concluídas */
}
.rifa-item h3 {
    margin: 0;
    font-size: 1.2em;
    border: none; /* Reset border from h3 rule */
    padding: 0;
    color: #fff;
}
.rifa-info small {
    color: #aaa;
    display: block; /* Fica abaixo do título */
    margin-top: 4px;
}
.button-manage {
    background-color: #f0b90b; /* Cor de destaque */
    color: #1e1e1e; /* Texto escuro */
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}
.button-manage:hover {
    opacity: 0.9;
}
.button-view {
    background-color: #555;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
}
.button-view:hover {
    background-color: #666;
}

/* Cabeçalho do Dashboard */
.draw-dashboard-header {
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.draw-dashboard-header h1 {
    margin: 0;
    color: #fff;
    display: inline-block; /* Para alinhar com o botão */
}
.draw-dashboard-header a {
    text-decoration: none;
    color: #f0b90b;
    font-weight: 500;
}
.draw-dashboard-header a:hover {
    text-decoration: underline;
}

/* --- INÍCIO (NOVOS ESTILOS): Botão Olho --- */
#toggle-stats-visibility {
    float: right;
    background: #333;
    border: 1px solid #555;
    color: #f0b90b;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 5px;
    margin-left: 15px;
    line-height: 1; /* Para alinhar o SVG */
}
#toggle-stats-visibility:hover {
    background: #444;
}
#toggle-stats-visibility svg {
    display: block; /* Remove espaço extra */
    width: 20px;
    height: 20px;
}

/* --- Classe para esconder os stats --- */
.stats-hidden {
    display: none !important;
}
/* --- FIM (NOVOS ESTILOS) --- */


/* Grelha de Estatísticas */
.draw-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    /* Adiciona transição para aparecer suavemente */
    transition: all 0.3s ease-in-out;
}
.stat-card {
    background-color: #2a2a2a;
    border: 1px solid #444;
    padding: 20px;
    border-radius: 5px;
}
.stat-card h4 {
    margin-top: 0;
    color: #aaa;
    font-size: 1em;
    font-weight: 600;
}
.stat-card .stat-value {
    font-size: 2.2em;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}
.stat-card .stat-value.revenue {
    color: #2ecc71; /* Verde para receita */
}
.stat-card .stat-value.stat-value-text {
    font-size: 1.7em; 
    line-height: 1.3;
}

/* Caixa de Ação do Sorteio */
.draw-action-box {
    background-color: #2a2a2a;
    border: 1px solid #f0b90b; /* Borda de destaque */
    padding: 25px;
    text-align: center;
    border-radius: 5px;
}
.draw-action-box h3 {
    margin-top: 0;
    color: #f0b90b; /* Cor de destaque */
    border: none;
    padding: 0;
}
.draw-action-box p {
    color: #ccc;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}
.draw-action-box label {
    display: block;
    margin-top: 20px;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: 500;
}

/* --- Estilos para as 12 caixas Baccarat --- */
.draw-digit-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}
.draw-digit-inputs input[type="number"] {
    width: 50px; /* Largura da caixa */
    height: 60px; /* Altura da caixa */
    padding: 10px 5px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 8px;
    color: #fff;
    font-size: 2em; /* Tamanho grande do número */
    box-sizing: border-box;
    text-align: center;
    font-weight: bold;
    -moz-appearance: textfield; /* Esconde setas no Firefox */
}
.draw-digit-inputs input[type="number"]::-webkit-outer-spin-button,
.draw-digit-inputs input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Esconde setas no Chrome/Safari */
    margin: 0;
}
.draw-digit-inputs input[type="number"]:focus {
    border-color: #f0b90b;
    outline: none;
}
/* Estilo para as caixas "AUTO" (desativadas) */
.draw-digit-inputs input[type="number"]:disabled {
    background-color: #111;
    border-color: #333;
    color: #f0b90b;
    opacity: 0.8;
}


.button-draw-manual {
    background-color: #f0b90b;
    color: #1e1e1e;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.2s ease;
    margin-top: 20px;
}
.button-draw-manual:hover {
    opacity: 0.9;
}
.button-draw-manual:disabled {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
}

/* Lista de Participantes */
.participant-list {
    margin-top: 30px;
}
.participant-list table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    color: #ddd; /* Texto da tabela */
}
.participant-list th, .participant-list td {
    padding: 12px 15px;
    border: 1px solid #444; /* Bordas escuras */
    text-align: left;
}
.participant-list th {
    background-color: #333; /* Cabeçalho escuro */
}
.participant-list tr:nth-child(even) {
    background-color: #2a2a2a; /* Linha alternada */
}

/* --- Caixa de Confirmação --- */
.draw-confirmation-box {
    background-color: #2a2a2a;
    border: 1px solid #f0b90b;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
}
.draw-confirmation-box h3 {
    margin-top: 0;
    color: #f0b90b;
    font-size: 24px;
    border: none;
    padding: 0;
}
.draw-confirmation-box p {
    color: #ccc;
    font-size: 16px;
    line-height: 1.6;
}
.winner-info-card {
    background-color: #1e1e1e;
    border: 1px solid #444;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
}
.winner-ticket-number {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    color: #f0b90b;
    font-family: monospace;
}
.winner-name {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
    margin-top: 10px;
}
.winner-location {
    display: block;
    font-size: 1.2em;
    color: #aaa;
    margin-top: 5px;
}
.confirmation-question {
    font-weight: bold;
    color: #fff;
    font-size: 18px !important;
}
.confirmation-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.button-draw-confirm,
.button-draw-revert {
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.2s ease;
}
.button-draw-confirm {
    background-color: #2ecc71; /* Verde para confirmar */
    color: #1e1e1e;
}
.button-draw-confirm:hover {
    opacity: 0.9;
}
.button-draw-revert {
    background-color: #555; /* Cinza para reverter */
    color: #fff;
}
.button-draw-revert:hover {
    background-color: #777;
}


/* Responsividade simples para telemóvel */
@media (max-width: 600px) {
    .rmbz-draw-manager-container {
        padding: 15px;
    }
    .rifa-item {
        padding: 15px;
    }
    .button-manage, .button-view {
        width: 100%;
        text-align: center;
    }
    /* Ajustar caixas de dígito para ecrãs pequenos */
    .draw-digit-inputs {
        gap: 5px;
        flex-wrap: wrap; 
    }
    .draw-digit-inputs input[type="number"] {
        width: 40px;
        height: 50px;
        font-size: 1.5em;
    }
    .confirmation-actions {
        gap: 10px;
    }
    .button-draw-confirm,
    .button-draw-revert {
        width: 100%;
    }
}