/* =================================================================
   N. SIMULADOR DE CLASSIFICAÇÃO EM TEMPO REAL (PALPITES)
   ================================================================= */
.classificacao-sidebar-wrapper {
    position: sticky;
    top: 96px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
}

.classificacao-sidebar-header {
    background: var(--bg-surface);
    border: 1px solid var(--border-highlight);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.classificacao-sidebar-scroll-container,
.classificacao-mobile-scroll-container {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 6px;
}

/* Custom Scrollbars */
.classificacao-sidebar-scroll-container::-webkit-scrollbar,
.classificacao-mobile-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.classificacao-sidebar-scroll-container::-webkit-scrollbar-track,
.classificacao-mobile-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.classificacao-sidebar-scroll-container::-webkit-scrollbar-thumb,
.classificacao-mobile-scroll-container::-webkit-scrollbar-thumb {
    background: var(--border-highlight);
    border-radius: 3px;
}

.classificacao-sidebar-scroll-container::-webkit-scrollbar-thumb:hover,
.classificacao-mobile-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary);
}

.classificacao-grupo-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-highlight);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.classificacao-grupo-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--brand-primary-rgb), 0.5);
}

.table-classificacao {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.table-classificacao th {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1.5px solid var(--border-subtle);
    padding: 10px 8px;
}

.table-classificacao td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

/* Glassmorphism zones of qualification */
.table-classificacao tr.zona-classificacao-direta {
    background: rgba(0, 188, 212, 0.05); /* Cyan glow */
}

.table-classificacao tr.zona-classificacao-direta td:first-child {
    border-left: 3px solid var(--brand-primary);
}

.table-classificacao tr.zona-repescagem {
    background: rgba(255, 193, 7, 0.03); /* Amber/Yellow glow */
}

.table-classificacao tr.zona-repescagem td:first-child {
    border-left: 3px solid var(--brand-accent);
}

.bg-success-glow {
    background-color: var(--brand-primary);
    box-shadow: 0 0 10px rgba(var(--brand-primary-rgb), 0.4);
}

.bg-warning-glow {
    background-color: var(--brand-accent);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.4);
}

.classificacao-sidebar-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
    margin-right: 6px;
    vertical-align: middle;
}

/* Floating Action Button (FAB) */
.btn-fab-classificacao {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: var(--text-on-brand);
    border: none;
    box-shadow: 0 8px 30px rgba(var(--brand-primary-rgb), 0.4);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: bottom 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.btn-fab-classificacao:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(var(--brand-primary-rgb), 0.6);
    color: var(--text-on-brand);
}

.btn-fab-classificacao:active {
    transform: scale(0.95);
}

.btn-fab-classificacao.btn-fab-elevated {
    bottom: 100px; /* Sobe suavemente para não sobrepor o botão de salvar no rodapé mobile */
}

/* Offcanvas custom background and borders */
.offcanvas.border-start {
    border-left: 1px solid var(--border-highlight) !important;
}

.offcanvas-body .table-classificacao {
    font-size: 0.95rem;
}

/* Standings row change animation */
.table-classificacao tbody tr {
    transition: background-color 0.25s ease, transform 0.2s ease;
}

.table-classificacao tbody tr:hover {
    background-color: rgba(var(--brand-primary-rgb), 0.04) !important;
}
