/* CNV Entry List - frontend */
.cnv-el, .cnv-el-modal {
	--cnv-accent: #e10600;
	--cnv-ink: #111;
	--cnv-ink-2: #5b5b66;
	--cnv-line: #e6e6ea;
	--cnv-bg: #fff;
	--cnv-bg-2: #f4f4f6;
	--cnv-dark: #0d0d10;
	--cnv-dark-2: #1b1b21;
	--cnv-radius: 10px;
	font-family: inherit;
	color: var(--cnv-ink);
	line-height: 1.35;
	box-sizing: border-box;
}
.cnv-el *, .cnv-el-modal * { box-sizing: border-box; }
.cnv-el, .cnv-el-modal-box { container-type: inline-size; container-name: cnv; }
.cnv-el .cnv-el-head a { color: #fff; }
.cnv-el a, .cnv-el-modal a { color: inherit; text-decoration: none; }
.cnv-el button, .cnv-el-modal button { font-family: inherit; cursor: pointer; }
.cnv-el .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cnv-el-loading, .cnv-el-empty { padding: 24px; text-align: center; color: var(--cnv-ink-2); background: var(--cnv-bg-2); border-radius: var(--cnv-radius); }
.cnv-el-muted { color: var(--cnv-ink-2); }

/* ------------------------------------------------ testata */
.cnv-el-head {
	background: var(--cnv-dark);
	color: #fff;
	border-radius: var(--cnv-radius) var(--cnv-radius) 0 0;
	padding: 22px 24px 16px;
	position: relative;
	overflow: hidden;
}
.cnv-el-head::after {
	content: ""; position: absolute; right: -60px; top: 0; bottom: 0; width: 220px;
	background: var(--cnv-accent); transform: skewX(-20deg); opacity: .9;
}
.cnv-el-head-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.cnv-el-title { margin: 0; color: #fff; font-size: clamp(20px, 3vw, 30px); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
.cnv-el-title span { color: var(--cnv-accent); }
.cnv-el-tabs { display: inline-flex; background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px; margin-right: 120px; }
.cnv-el-tabs button { background: transparent; border: 0; color: #cfcfd6; padding: 8px 20px; border-radius: 999px; font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .04em; }
.cnv-el-tabs button.is-active { background: #fff; color: var(--cnv-dark); }
.cnv-el-filters { display: flex; align-items: center; gap: 12px; margin-top: 16px; position: relative; z-index: 1; flex-wrap: wrap; }
.cnv-el-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; flex: 1 1 auto; min-width: 0; }
.cnv-el-pill { flex: 0 0 auto; background: var(--cnv-dark-2); color: #e9e9ee; border: 1px solid #2c2c35; border-radius: 6px; padding: 7px 12px; font-size: 13px; font-weight: 700; text-transform: uppercase; white-space: nowrap; transition: background .15s, border-color .15s; }
.cnv-el-pill:hover { border-color: #55555f; }
.cnv-el-pill.is-active { background: var(--cnv-accent); border-color: var(--cnv-accent); color: #fff; }
.cnv-el-select-wrap { display: none; }
.cnv-el-select, .cnv-el-search { background: var(--cnv-dark-2); color: #fff; border: 1px solid #34343e; border-radius: 6px; padding: 8px 12px; font-size: 14px; min-height: 38px; }
.cnv-el-search { width: 270px; max-width: 100%; }
.cnv-el-search::placeholder { color: #8d8d99; }
.cnv-el-current { font-weight: 700; text-transform: uppercase; color: #fff; }


/* ------------------------------------------------ tabella */
.cnv-el-body { background: var(--cnv-bg); border: 1px solid var(--cnv-line); border-top: 0; border-radius: 0 0 var(--cnv-radius) var(--cnv-radius); overflow-x: auto; }
.cnv-el-table { width: 100%; border-collapse: collapse; margin: 0; font-size: 15px; border: 0; }
.cnv-el-table th { text-align: left; background: var(--cnv-bg-2); color: var(--cnv-ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--cnv-line); }
.cnv-el-table td { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--cnv-line); vertical-align: middle; background: transparent; }
.cnv-el-table tbody tr:hover td { background: #fafafb; }
.cnv-el-table tbody tr:last-child td { border-bottom: 0; }
.cnv-el-table .c-nr { width: 70px; text-align: center; }
.cnv-el-table td.c-nr span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 32px; padding: 0 6px; border-radius: 6px; background: var(--cnv-dark); color: #fff; font-weight: 900; font-style: italic; font-size: 17px; font-variant-numeric: tabular-nums; }
.cnv-el-table td.c-team a, .cnv-el-table td.c-team { color: var(--cnv-ink-2); font-size: 14px; }
.cnv-el-table td.c-team a:hover { color: var(--cnv-accent); text-decoration: underline; }
.cnv-el-table td.c-nat { white-space: nowrap; font-size: 14px; color: var(--cnv-ink-2); }
.cnv-el-table td.c-nat .cnv-el-flag { margin-right: 8px; }
.cnv-el-table td.c-brand { font-size: 14px; color: var(--cnv-ink-2); white-space: nowrap; }
.cnv-el-blogo { height: 20px; width: auto; max-width: 60px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
.cnv-el-rider-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-transform: uppercase; font-size: 15px; }
a.cnv-el-rider-link:hover .cnv-el-rname { color: var(--cnv-accent); }
.cnv-el-nr-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 5px; border-radius: 4px; background: var(--cnv-dark); color: #fff; font-size: 12px; font-weight: 800; font-style: italic; margin-right: 2px; }
.cnv-el-av { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; overflow: hidden; background: var(--cnv-bg-2); display: inline-flex; align-items: center; justify-content: center; }
.cnv-el-av img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cnv-el-av-logo { background: #fff; box-shadow: inset 0 0 0 1px var(--cnv-line); }
.cnv-el-av-logo img { object-fit: contain; object-position: center; padding: 5px; }
.cnv-el-ent { display: inline-flex; align-items: center; gap: 10px; }
.cnv-el-table td.c-brand .cnv-el-ent span, .cnv-el-table td.c-team .cnv-el-ent span { white-space: normal; }
.cnv-el-noimg { background: #2a2a33; color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.cnv-el-flag { width: 24px; height: 16px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); vertical-align: middle; display: inline-block; }
.cnv-el-iso { font-size: 11px; font-weight: 700; border: 1px solid var(--cnv-line); padding: 1px 4px; border-radius: 3px; margin-right: 6px; }
.cnv-el-mobile-meta { display: none; }
.cnv-el-note { font-size: 12px; color: var(--cnv-ink-2); padding: 10px 14px; margin: 0; border-top: 1px solid var(--cnv-line); }

/* ------------------------------------------------ modale */
.cnv-el-noscroll { overflow: hidden; }
.cnv-el-modal { position: fixed; inset: 0; z-index: 999999; display: none; }
.cnv-el-modal.is-open { display: block; }
.cnv-el-modal-bg { position: absolute; inset: 0; background: rgba(5,5,8,.75); backdrop-filter: blur(2px); }
.cnv-el-modal-box { position: relative; margin: 4vh auto; width: min(960px, 94vw); max-height: 92vh; overflow-y: auto; background: var(--cnv-bg); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.45); animation: cnvIn .2s ease-out; }
@keyframes cnvIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.cnv-el-modal-x { position: sticky; top: 10px; float: right; margin: 10px 10px -50px 0; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 26px; line-height: 1; }
.cnv-el-modal-x:hover { background: var(--cnv-accent); }

/* ------------------------------------------------ scheda pilota / team */
.cnv-el-card { background: var(--cnv-bg); border-radius: 14px; overflow: hidden; }
.cnv-el > .cnv-el-card { border: 1px solid var(--cnv-line); }
.cnv-el-card-hero { position: relative; display: grid; grid-template-columns: 220px 1fr auto; gap: 24px; align-items: end; background: radial-gradient(circle at 20% 0%, #2b2b35 0%, var(--cnv-dark) 70%); color: #fff; padding: 28px 28px 0; min-height: 250px; overflow: hidden; }
.cnv-el-card-hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--cnv-accent); }
.cnv-el-card-nr { position: absolute; right: 18px; top: -30px; font-size: 220px; font-weight: 900; font-style: italic; line-height: 1; color: rgba(255,255,255,.05); pointer-events: none; }
.cnv-el-card-photo { position: relative; z-index: 1; height: 240px; display: flex; align-items: flex-end; }
.cnv-el-card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 10px 10px 0 0; }
.cnv-el-team-logo { height: 200px; padding-bottom: 28px; }
.cnv-el-team-logo img { object-fit: contain; background: #fff; border-radius: 10px; padding: 14px; }
.cnv-el-ph-empty { width: 100%; height: 200px; margin-bottom: 20px; border-radius: 10px; background: #26262e; display: flex; align-items: center; justify-content: center; }
.cnv-el-ph-empty span { font-size: 64px; font-weight: 900; color: #4a4a56; }
.cnv-el-card-id { position: relative; z-index: 1; padding-bottom: 30px; min-width: 0; }
.cnv-el-card-class { display: inline-block; background: var(--cnv-accent); color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 4px; margin-bottom: 10px; }
.cnv-el-card-name { margin: 0 0 10px; color: #fff; font-size: clamp(24px, 3.4vw, 38px); font-weight: 900; text-transform: uppercase; line-height: 1.05; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cnv-el-card-name .cnv-el-nr-badge { background: #fff; color: var(--cnv-dark); font-size: 18px; height: 32px; min-width: 44px; }
.cnv-el-card-nation { display: flex; align-items: center; gap: 8px; color: #cfcfd6; font-size: 15px; }
.cnv-el-team-desc { color: #cfcfd6; font-size: 14px; max-width: 460px; }
.cnv-el-card-stats { position: relative; z-index: 1; display: flex; gap: 2px; padding-bottom: 30px; }
.cnv-el-card-stats div { background: rgba(255,255,255,.07); padding: 10px 16px; min-width: 88px; text-align: center; }
.cnv-el-card-stats div:first-child { border-radius: 8px 0 0 8px; }
.cnv-el-card-stats div:last-child { border-radius: 0 8px 8px 0; }
.cnv-el-card-stats span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #a9a9b5; }
.cnv-el-card-stats strong { font-size: 28px; font-weight: 900; }
.cnv-el-card-stats small { font-size: 13px; color: #a9a9b5; font-weight: 600; }
.cnv-el-card-info { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--cnv-line); }
.cnv-el-info { padding: 14px 18px; border-right: 1px solid var(--cnv-line); border-bottom: 1px solid var(--cnv-line); min-width: 0; }
.cnv-el-info-l { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--cnv-ink-2); margin-bottom: 4px; }
.cnv-el-info-v { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; min-height: 28px; }
.cnv-el-info-v .cnv-el-link { display: inline-flex; align-items: center; gap: 8px; }
.cnv-el-info-v .cnv-el-link:hover span { color: var(--cnv-accent); text-decoration: underline; }
.cnv-el-logo { height: 32px; width: auto; max-width: 90px; object-fit: contain; }
.cnv-el-info.is-team, .cnv-el-info.is-brand { grid-column: span 2; }
.cnv-el-also { padding: 10px 18px; font-size: 14px; background: var(--cnv-bg-2); }
.cnv-el-also a { color: var(--cnv-accent); font-weight: 700; }
.cnv-el-sub { margin: 0; padding: 18px 18px 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--cnv-ink); }

/* grafico */

/* risultati per evento */

/* piloti del team */
.cnv-el-team-riders { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; padding: 0 18px 10px; }
.cnv-el-team-rider { display: flex; align-items: center; gap: 12px; border: 1px solid var(--cnv-line); border-radius: 8px; padding: 8px 12px; transition: border-color .15s; }
.cnv-el-team-rider:hover { border-color: var(--cnv-accent); }
.cnv-el-tr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cnv-el-tr-name { font-weight: 800; text-transform: uppercase; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cnv-el-tr-meta { font-size: 12px; color: var(--cnv-ink-2); display: flex; align-items: center; gap: 6px; }
.cnv-el-tr-meta .cnv-el-flag { width: 18px; height: 12px; }

/* ------------------------------------------------ responsive */
@container cnv (max-width: 900px) {
	.cnv-el-pills { display: none; }
	.cnv-el-select-wrap { display: block; flex: 1 1 180px; }
	.cnv-el-select { width: 100%; }
	.cnv-el-tabs { margin-right: 0; }
	.cnv-el-head::after { width: 90px; right: -50px; }
	.cnv-el-table .c-brand, .cnv-el-table .c-nat { display: none; }
	.cnv-el-card-hero { grid-template-columns: 160px 1fr; }
	.cnv-el-card-stats { grid-column: 1 / -1; padding-bottom: 20px; }
	.cnv-el-card-photo { height: 200px; }
	.cnv-el-card-id { padding-bottom: 16px; }
	.cnv-el-card-info { grid-template-columns: repeat(2, 1fr); }
}
@container cnv (max-width: 600px) {
	.cnv-el-head { padding: 16px; }
	.cnv-el-search { flex: 1 1 100%; width: 100%; }
	.cnv-el-table { font-size: 14px; }
	.cnv-el-table .c-team { display: none; }
	.cnv-el-table td, .cnv-el-table th { padding: 8px 6px; }
	.cnv-el-table .c-nr { width: 52px; }
	.cnv-el-table td.c-nr span { min-width: 38px; height: 28px; font-size: 15px; }
	.cnv-el-av { width: 30px; height: 30px; flex-basis: 30px; }
	.cnv-el-rider-link { gap: 6px; font-size: 13px; }
	.cnv-el-mobile-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cnv-ink-2); margin: 4px 0 0 36px; }
	.cnv-el-mobile-meta .cnv-el-flag { width: 18px; height: 12px; }
	.cnv-el-card-hero { grid-template-columns: 110px 1fr; padding: 18px 16px 0; gap: 14px; min-height: 0; }
	.cnv-el-card-photo { height: 140px; }
	.cnv-el-ph-empty { height: 120px; }
	.cnv-el-card-nr { font-size: 140px; }
	.cnv-el-card-stats div { min-width: 0; flex: 1; padding: 8px; }
	.cnv-el-card-stats strong { font-size: 22px; }
	.cnv-el-info.is-team, .cnv-el-info.is-brand { grid-column: span 2; }
}

@media (max-width: 600px) {
	.cnv-el-modal-box { margin: 0; width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
}
.cnv-el-card-stats div.is-total { background: var(--cnv-accent); }


/* ------------------------------------------------ entry list: sezioni per classe */
.cnv-el-class + .cnv-el-class { border-top: 6px solid var(--cnv-bg-2); }
.cnv-el-class-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--cnv-line); border-left: 5px solid var(--cnv-accent); }
.cnv-el-class-head h3 { margin: 0; font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; color: var(--cnv-ink); line-height: 1.2; }
.cnv-el-count { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--cnv-ink-2); background: var(--cnv-bg-2); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.cnv-el-pad { padding: 20px; margin: 0; }
.cnv-el-noresult { text-align: center; }

/* elenco team (tabella unica) */
.cnv-el-table-team .c-rider { width: 34%; }
.cnv-el-table-team .c-num { width: 70px; text-align: center; }
.cnv-el-table-team td.c-num strong { font-size: 18px; font-weight: 900; }
.cnv-el-table-team .c-tr { width: auto; }
.cnv-el-table-team .cnv-el-rname { white-space: normal; }
.cnv-el-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cnv-el-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--cnv-line); border-radius: 999px; padding: 4px 10px 4px 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; white-space: nowrap; transition: border-color .15s; }
.cnv-el-chip .cnv-el-flag { width: 18px; height: 12px; }
.cnv-el-chip .cnv-el-iso { margin-right: 0; }
.cnv-el-chip:hover { border-color: var(--cnv-accent); color: var(--cnv-accent); }
@container cnv (max-width: 600px) {
	.cnv-el-table-team .c-rider { width: 42%; }
	.cnv-el-table-team .c-num { width: 40px; }
	.cnv-el-chip { font-size: 11px; white-space: normal; }
}

/* scheda team: piloti per classe */
.cnv-el-team-list { padding-bottom: 14px; }
.cnv-el-team-cls { margin: 6px 18px 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--cnv-accent); }
.cnv-el-team-hero { min-height: 220px; }
.cnv-el-rider .cnv-el-card-stats div.is-total strong { font-style: italic; }
/* colonne allineate tra le varie classi */
.cnv-el-table { table-layout: fixed; }
.cnv-el-table .c-nat { width: 170px; }
.cnv-el-table .c-team { width: 28%; }
.cnv-el-table .c-brand { width: 17%; }
.cnv-el-table td.c-team, .cnv-el-table td.c-brand { overflow: hidden; }
@container cnv (max-width: 600px) {
	.cnv-el-table .c-nr { width: 56px; }
}
