/* AD-RP: classifiche dei personaggi (classifiche.php) + voce "Classifiche" nella testata. Usa le variabili del tema (chiaro e scuro). */

#header ul.menu.top_links a.classifiche { --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 21h8M12 17v4M7 4h10v5a5 5 0 0 1-10 0z'/%3E%3Cpath d='M17 5h3v2a3 3 0 0 1-3 3M7 5H4v2a3 3 0 0 0 3 3'/%3E%3C/svg%3E"); }

.adrp-clas { margin: 6px 0 24px; }
.adrp-clas-hero {
    position: relative; overflow: hidden;
    padding: 28px 28px 26px; margin-bottom: 20px; border-radius: var(--radius, 16px);
    background: linear-gradient(120deg, #1d3a7a 0%, #4b3ca8 55%, #8b5cff 100%);
    color: #fff; box-shadow: var(--shadow);
}
.adrp-clas-hero::after {
    content: ""; position: absolute; right: -40px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 105, .35), transparent 65%);
}
.adrp-clas-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.adrp-clas-hero h1 { margin: 6px 0 6px; font-size: clamp(24px, 4vw, 34px); line-height: 1.15; color: #fff; }
.adrp-clas-hero p { margin: 0; max-width: 560px; opacity: .88; }

.adrp-clas-griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.adrp-clas-card {
    --c: #2e9bff;
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
    padding: 20px; border-radius: var(--radius, 16px);
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
    transition: box-shadow .2s, transform .2s;
}
.adrp-clas-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.adrp-clas-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--c), transparent 80%); }
.adrp-clas-card[data-clas="ore"] { --c: #2e9bff; }
.adrp-clas-card[data-clas="livello"] { --c: #8b5cff; }
.adrp-clas-card[data-clas="ricchi"] { --c: #2fae72; }
.adrp-clas-card[data-clas="camion"] { --c: #f08c00; }
.adrp-clas-card[data-clas="birdy"] { --c: #f0457a; }
.adrp-clas-card[data-clas="imprese"] { --c: #13a9b8; }

.adrp-clas-testa { display: flex; align-items: center; gap: 14px; }
.adrp-clas-icona {
    display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 14px;
    color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
}
.adrp-clas-icona svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.adrp-clas-testa h2 { margin: 0; font-size: 17px; color: var(--text); }
.adrp-clas-testa p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.adrp-clas-vuota { margin: 4px 0; padding: 18px; border-radius: 12px; border: 1px dashed var(--border); color: var(--muted); text-align: center; font-size: 14px; }
.adrp-clas-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.adrp-clas-riga {
    display: grid; grid-template-columns: 28px 38px minmax(0, 1fr) auto; align-items: center; gap: 12px;
    padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent;
    transition: border-color .2s, transform .2s;
}
.adrp-clas-riga:hover { border-color: var(--border); transform: translateX(2px); }
.adrp-clas-pos { text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.adrp-clas-av {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
    background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--c); font-size: 13px; font-weight: 800;
}
.adrp-clas-av img { width: 100%; height: 160%; object-fit: cover; object-position: 50% 0; align-self: start; }
.adrp-clas-nome { display: grid; min-width: 0; }
.adrp-clas-nome strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.adrp-clas-nome small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.adrp-clas-val { font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); }

.adrp-clas-riga.podio .adrp-clas-pos { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #1a1204; font-size: 13px; }
.adrp-clas-riga.p1 { background: linear-gradient(90deg, rgba(245, 179, 27, .18), var(--surface-2)); border-color: rgba(245, 179, 27, .35); }
.adrp-clas-riga.p1 .adrp-clas-pos { background: linear-gradient(135deg, #ffe08a, #f5b31b); box-shadow: 0 0 14px rgba(245, 179, 27, .45); }
.adrp-clas-riga.p2 .adrp-clas-pos { background: linear-gradient(135deg, #f1f4f9, #a9b4c6); }
.adrp-clas-riga.p3 .adrp-clas-pos { background: linear-gradient(135deg, #f2b98c, #b8693a); }
.adrp-clas-riga.p1 .adrp-clas-av { box-shadow: 0 0 0 2px #f5b31b; }
.adrp-clas-riga.p2 .adrp-clas-av { box-shadow: 0 0 0 2px #a9b4c6; }
.adrp-clas-riga.p3 .adrp-clas-av { box-shadow: 0 0 0 2px #b8693a; }

.adrp-clas-nota { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 600px) {
    .adrp-clas-hero { padding: 22px 18px; }
    .adrp-clas-griglia { grid-template-columns: 1fr; }
    .adrp-clas-card { padding: 16px; }
    .adrp-clas-riga { grid-template-columns: 26px 34px minmax(0, 1fr) auto; gap: 10px; }
    .adrp-clas-av { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
    .adrp-clas-card, .adrp-clas-riga { transition: none; }
    .adrp-clas-card:hover, .adrp-clas-riga:hover { transform: none; }
}

/* gruppi (personaggi / fazioni), colori delle fazioni, dettagli su piu' righe */
.adrp-clas-gruppo { display: flex; align-items: center; gap: 14px; margin: 24px 0 14px; font-size: 19px; color: var(--text); }
.adrp-clas-gruppo:first-of-type { margin-top: 4px; }
.adrp-clas-gruppo::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.adrp-clas-card[data-clas="faz_illegali"] { --c: #e5484d; }
.adrp-clas-card[data-clas="faz_legali"] { --c: #3b82f6; }
.adrp-clas-nome small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
@media (max-width: 600px) {
    .adrp-clas-riga { padding: 8px 10px 8px 6px; }
    .adrp-clas-val { font-size: 14px; }
    .adrp-clas-card:hover, .adrp-clas-riga:hover { transform: none; }
}
/* fazioni: il nome va a capo invece di essere tagliato */
.adrp-clas-card[data-clas^="faz_"] .adrp-clas-nome strong { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
