/* ==========================================
   THE LAST RAGNAROK - SISTEMA DE ENQUETES
   Estilos para Enquetes e Dashboard
   ========================================== */

/* ==========================================
   VARIÁVEIS CSS - CORES PROFISSIONAIS
   ========================================== */
:root {
    --tlr-primary: #2563eb;      /* Azul forte profissional */
    --tlr-secondary: #7c3aed;    /* Roxo profissional */
    --tlr-success: #16a34a;      /* Verde sólido */
    --tlr-warning: #ea580c;      /* Laranja forte */
    --tlr-dark: #1e293b;         /* Cinza escuro */
    --tlr-light: #f1f5f9;        /* Cinza claro */
    --tlr-border: #cbd5e1;       /* Borda cinza */
    --tlr-shadow: rgba(0, 0, 0, 0.15);
    --tlr-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

/* ==========================================
   CONTAINER DA ENQUETE - COMPACTO
   ========================================== */
.tlr-poll-container {
    max-width: 700px;
    margin: 20px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--tlr-shadow);
    padding: 25px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tlr-poll-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--tlr-light);
}

.tlr-poll-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.tlr-poll-description {
    font-size: 14px;
    color: #475569;
    margin: 0;
    line-height: 1.4;
}

/* ==========================================
   OPÇÕES DA ENQUETE - COMPACTAS
   ========================================== */
.tlr-poll-options {
    margin: 15px 0;
}

.tlr-poll-option {
    margin-bottom: 10px;
    position: relative;
}

.tlr-poll-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.tlr-poll-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tlr-poll-label:hover {
    border-color: var(--tlr-primary);
    background: #f8fafc;
    transform: translateX(3px);
}

.tlr-poll-radio:checked + .tlr-poll-label {
    border-color: var(--tlr-primary);
    background: #eff6ff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.tlr-poll-radio:checked + .tlr-poll-label::before {
    content: '✓';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--tlr-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.tlr-option-emoji {
    font-size: 24px;
    margin-right: 12px;
    min-width: 30px;
    text-align: center;
}

.tlr-option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-right: 30px;
}

.tlr-option-text {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 3px;
}

.tlr-option-description {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}

/* ==========================================
   BOTÃO DE VOTAÇÃO - COMPACTO
   ========================================== */
.tlr-poll-actions {
    margin-top: 15px;
    text-align: center;
}

.tlr-poll-submit {
    background: var(--tlr-gradient);
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

.tlr-poll-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.tlr-poll-submit:active {
    transform: translateY(0);
}

.tlr-poll-submit:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================
   MENSAGENS E FEEDBACK
   ========================================== */
.tlr-poll-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    display: none;
}

.tlr-poll-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
    display: block;
}

.tlr-poll-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
    display: block;
}

.tlr-vote-success {
    background: #d1fae5;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #065f46;
    margin-bottom: 20px;
    border: 2px solid #10b981;
}

/* ==========================================
   RESULTADOS
   ========================================== */
.tlr-poll-results {
    margin-top: 30px;
}

.tlr-result-row {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--tlr-secondary);
}

.tlr-result-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.tlr-result-emoji {
    font-size: 24px;
    margin-right: 10px;
}

.tlr-result-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--tlr-dark);
}

.tlr-result-stats {
    margin-top: 10px;
}

.tlr-result-bar-container {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 5px;
    position: relative;
}

.tlr-result-bar {
    height: 100%;
    background: var(--tlr-gradient);
    border-radius: 15px;
    transition: width 0.8s ease;
    position: relative;
}

.tlr-result-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.tlr-result-numbers {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.tlr-result-percentage {
    font-weight: 700;
    color: var(--tlr-primary);
    font-size: 18px;
}

.tlr-result-count {
    color: #7f8c8d;
}

/* ==========================================
   FOOTER DA ENQUETE
   ========================================== */
.tlr-poll-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--tlr-light);
    text-align: center;
}

.tlr-poll-timer {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

.tlr-poll-timer strong {
    color: var(--tlr-primary);
    font-weight: 600;
}

/* ==========================================
   DASHBOARD - HEADER COMPACTO
   ========================================== */
.tlr-dashboard-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 15px;
}

.tlr-dashboard-header {
    background: var(--tlr-gradient);
    padding: 25px;
    border-radius: 10px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px var(--tlr-shadow);
}

.tlr-dashboard-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-align: center;
}

.tlr-dashboard-subtitle {
    text-align: center;
    font-size: 12px;
    margin: 0 0 20px 0;
    opacity: 0.95;
}

/* ==========================================
   DASHBOARD - ESTATÍSTICAS COMPACTAS
   ========================================== */
.tlr-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.tlr-stat-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.tlr-stat-number {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--tlr-primary);
}

.tlr-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tlr-dark);
    font-weight: 600;
}

/* ==========================================
   DASHBOARD - GRID COMPACTO
   ========================================== */
.tlr-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.tlr-dashboard-poll {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 12px var(--tlr-shadow);
    transition: all 0.2s ease;
}

.tlr-dashboard-poll:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.tlr-dashboard-poll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--tlr-light);
}

.tlr-dashboard-poll-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.tlr-dashboard-poll-total {
    text-align: center;
    padding: 6px 14px;
    background: var(--tlr-gradient);
    border-radius: 20px;
    color: white;
    margin-left: 10px;
}

.tlr-total-votes {
    font-size: 18px;
    font-weight: 700;
    display: block;
}

.tlr-total-label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* ==========================================
   DASHBOARD - GRÁFICOS E RESULTADOS COMPACTOS
   ========================================== */
.tlr-dashboard-chart-container {
    margin: 15px 0;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    position: relative;
    height: 200px;
}

.tlr-chart {
    max-height: 170px !important;
}

.tlr-dashboard-results {
    margin-top: 15px;
}

.tlr-result-row {
    margin-bottom: 12px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid var(--tlr-primary);
}

.tlr-result-info {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.tlr-result-emoji {
    font-size: 18px;
    margin-right: 8px;
}

.tlr-result-text {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.tlr-result-stats {
    margin-top: 6px;
}

.tlr-result-bar-container {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 4px;
    position: relative;
}

.tlr-result-bar {
    height: 100%;
    background: var(--tlr-gradient);
    border-radius: 10px;
    transition: width 0.6s ease;
    position: relative;
}

.tlr-result-numbers {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.tlr-result-percentage {
    font-weight: 700;
    color: var(--tlr-primary);
    font-size: 14px;
}

.tlr-result-count {
    color: #64748b;
}

/* ==========================================
   DASHBOARD - FOOTER
   ========================================== */
.tlr-dashboard-footer {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.tlr-auto-update {
    margin: 0;
    font-size: 14px;
    color: #7f8c8d;
}

#last-update {
    font-weight: 600;
    color: var(--tlr-primary);
}

/* ==========================================
   LOADING ANIMATION
   ========================================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tlr-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */
@media (max-width: 768px) {
    .tlr-poll-container {
        padding: 15px;
        margin: 10px;
    }
    
    .tlr-poll-title {
        font-size: 18px;
    }
    
    .tlr-option-emoji {
        font-size: 20px;
        margin-right: 10px;
    }
    
    .tlr-option-text {
        font-size: 14px;
    }
    
    .tlr-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .tlr-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .tlr-dashboard-title {
        font-size: 20px;
    }
    
    .tlr-stat-number {
        font-size: 24px;
    }
    
    .tlr-dashboard-poll-title {
        font-size: 14px;
    }
    
    .tlr-dashboard-chart-container {
        height: 180px;
    }
}

/* ==========================================
   TEMA ESCURO (OPCIONAL)
   ========================================== */
@media (prefers-color-scheme: dark) {
    .tlr-poll-container,
    .tlr-dashboard-poll {
        background: #1e272e;
        color: #ecf0f1;
    }
    
    .tlr-poll-title,
    .tlr-dashboard-poll-title,
    .tlr-option-text,
    .tlr-result-text {
        color: #ecf0f1;
    }
    
    .tlr-poll-label {
        background: #2c3e50;
        border-color: #34495e;
    }
    
    .tlr-poll-label:hover {
        background: #34495e;
    }
    
    .tlr-result-row {
        background: #2c3e50;
    }
}
