/**
 * Estilos para o Ranking do Troféu Empresa Destaque
 * Plugin WordPress - Versão 1.0.0
 */

/* Container principal */
.trofeu-ranking-wrapper {
    margin: 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Cabeçalho */
.trofeu-ranking-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.trofeu-ranking-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.trofeu-ranking-state {
    color: #6b7280;
    font-weight: 500;
}

.trofeu-ranking-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* Container da tabela */
.trofeu-ranking-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tabela */
.trofeu-ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Cabeçalho da tabela */
.trofeu-ranking-table thead {
    background: #f9fafb;
}

.trofeu-ranking-table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
}

/* Colunas */
.trofeu-rank-col {
    width: 60px;
    text-align: center;
}

.trofeu-empresa-col {
    min-width: 200px;
}

.trofeu-local-col {
    min-width: 150px;
}

.trofeu-pontuacao-col {
    width: 120px;
    text-align: right;
}

/* Linhas do corpo */
.trofeu-ranking-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.trofeu-ranking-table tbody tr:hover {
    background-color: #f9fafb;
}

.trofeu-row-even {
    background-color: #ffffff;
}

.trofeu-row-odd {
    background-color: #f9fafb;
}

/* Células */
.trofeu-ranking-table tbody td {
    padding: 1rem;
    font-size: 0.9375rem;
    color: #111827;
    vertical-align: middle;
}

/* Top 3 - Destaque */
.trofeu-top-1 {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    font-weight: 600;
}

.trofeu-top-2 {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%) !important;
    font-weight: 600;
}

.trofeu-top-3 {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%) !important;
    font-weight: 600;
}

.trofeu-top-1:hover,
.trofeu-top-2:hover,
.trofeu-top-3:hover {
    opacity: 0.95;
}

/* Badges de posição */
.trofeu-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: #ffffff;
}

.trofeu-badge-1 {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.trofeu-badge-2 {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.trofeu-badge-3 {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.3);
}

/* Pontuação */
.trofeu-pontuacao-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #059669;
}

.trofeu-pontuacao-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: 0.25rem;
}

/* Mensagens de erro/info */
.trofeu-error {
    padding: 1rem;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    color: #991b1b;
    margin: 1rem 0;
}

.trofeu-info {
    padding: 1rem;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    color: #1e40af;
    margin: 1rem 0;
}

/* Responsividade */
@media (max-width: 768px) {
    .trofeu-ranking-title {
        font-size: 1.25rem;
    }

    .trofeu-ranking-table {
        font-size: 0.875rem;
    }

    .trofeu-ranking-table thead th,
    .trofeu-ranking-table tbody td {
        padding: 0.75rem 0.5rem;
    }

    .trofeu-empresa-col {
        min-width: 150px;
    }

    .trofeu-local-col {
        min-width: 100px;
    }

    .trofeu-pontuacao-col {
        width: 100px;
    }
}

@media (max-width: 480px) {
    .trofeu-ranking-table thead {
        display: none;
    }

    .trofeu-ranking-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        padding: 0.75rem;
    }

    .trofeu-ranking-table tbody td {
        display: block;
        padding: 0.5rem 0;
        text-align: left !important;
        border: none;
    }

    .trofeu-ranking-table tbody td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #6b7280;
    }

    .trofeu-rank-col:before {
        content: "Posição: ";
    }

    .trofeu-empresa-col:before {
        content: "Empresa: ";
    }

    .trofeu-local-col:before {
        content: "Local: ";
    }

    .trofeu-pontuacao-col:before {
        content: "Pontuação: ";
    }
}

