/* Product-specific tweaks on top of Tabler. Brand rules: Confcommercio Brand Book v1.8. */
.result-form .score-input {
  font-size: 2.5rem;
  text-align: center;
  height: 4.5rem;
}

.result-form .btn-submit {
  min-height: 3.5rem;
  font-size: 1.25rem;
}

/* Shell: topbar, side navigation, public header (A7 5.4).
   Bars are white with the positive logo (tav. 20); in the dark theme they turn Blu Confcom with the negative colour logo (tav. 22). */
.tp-brand { display: inline-flex; align-items: center; gap: var(--tp-s5); min-width: 0; text-decoration: none; }
.tp-brand:hover { text-decoration: none; }
.tp-logo { display: inline-flex; align-items: center; flex: none; }
/* Confcommercio Cup logo: badge + name, so it is used whole at every width (no separate wordmark), positive on white, negative on Blu. */
.tp-logo img { display: block; width: auto; }
.tp-logo-full { height: 60px; }
.tp-on-dark { display: none !important; }
[data-bs-theme=dark] .tp-on-light { display: none !important; }
[data-bs-theme=dark] .tp-logo-full.tp-on-dark { display: block !important; }
@media (max-width: 767.98px) { .tp-logo-full { height: 48px; } }
/* Wide horizontal logo (02/12/2026): never wider than the space left by the header actions on phones. */
@media (max-width: 575.98px) { .tp-logo { min-width: 0; flex: 1 1 auto; } .tp-logo-full { height: auto; max-height: 40px; max-width: 100%; } }
/* Event name next to the logo: outside the logo's clear space (half the eagle, tav. 27), divided by a thin rule. */
.tp-wordmark {
  font-family: var(--tp-font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--tp-heading);
  padding-left: var(--tp-s5);
  border-left: 1px solid var(--tp-line);
}
.tp-empty { padding-block: var(--tp-s8); }

/* Tabler declares --tblr-navbar-* on .navbar itself, so the tokens must be set on the element, not on :root. */
.tp-topbar, .tp-public-header {
  --tblr-navbar-bg: var(--tp-paper);
  --tblr-navbar-color: var(--tp-heading);
  --tblr-navbar-hover-color: var(--tp-heading);
  --tblr-navbar-active-color: var(--tp-heading);
  --tblr-navbar-brand-color: var(--tp-heading);
  --tblr-navbar-brand-hover-color: var(--tp-heading);
  --tblr-navbar-border-color: var(--tp-line);
  --tblr-nav-link-color: var(--tp-heading);
  --tblr-nav-link-hover-color: var(--tp-link);
  background: var(--tp-paper);
  color: var(--tp-heading);
  border-bottom: 1px solid var(--tp-line);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 1040;
  padding-block: 0;
  box-shadow: none;
}
[data-bs-theme=dark] .tp-topbar, [data-bs-theme=dark] .tp-public-header {
  --tblr-navbar-bg: #003B75;
  --tblr-navbar-color: #fff;
  --tblr-navbar-brand-color: #fff;
  --tblr-navbar-brand-hover-color: #fff;
  --tblr-nav-link-color: #fff;
  --tblr-nav-link-hover-color: #56B7E6;
  background: #003B75;
  color: #fff;
  border-bottom-color: #003B75;
}
[data-bs-theme=dark] .tp-topbar .tp-wordmark, [data-bs-theme=dark] .tp-public-header .tp-wordmark { color: #fff; border-left-color: rgba(255, 255, 255, .3); }
.tp-topbar { height: var(--tp-header-h); padding-inline: var(--tp-s5); }
.tp-public-header { min-height: var(--tp-header-h); }
.tp-topbar .container-xl { max-width: none; padding-inline: 0; gap: var(--tp-s5); flex-wrap: nowrap; height: 100%; }
/* One row down to 360px (referees enter results on phones): the wordmark yields with an ellipsis, role and logout shrink to icons. */
.tp-topbar .tp-brand { flex: 0 1 auto; min-width: 0; }
.tp-topbar .tp-wordmark { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tp-topbar .tp-actions { flex: none; flex-wrap: nowrap; }
@media (max-width: 575.98px) {
  .tp-topbar { padding-inline: var(--tp-s4); }
  .tp-topbar .container-xl { gap: var(--tp-s3); }
  .tp-topbar .tp-actions { gap: var(--tp-s2) !important; }
  .tp-brand { gap: var(--tp-s3); }
  .tp-wordmark { font-size: 17px; padding-left: var(--tp-s3); }
  /* Visually hidden but still announced (display:none would drop the accessible name). */
  .tp-role-text, .tp-logout-text {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}
@media (min-width: 576px) { .tp-role-icon { display: none; } }

/* Skip link: hidden until focused, then a visible Blu/white pill above everything (WCAG 2.4.1 / 2.4.7). */
.tp-skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 2000;
  padding: 10px 18px; border-radius: var(--tp-radius, 4px);
  background: #003B75; color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 0 0 2px #fff, 0 4px 14px rgba(4, 30, 66, .35);
}
.tp-article-body { white-space: pre-line; }
.tp-skip-link:focus-visible { outline: 3px solid #56B7E6; outline-offset: 2px; }
.tp-topbar .navbar-brand, .tp-public-header .navbar-brand { margin: 0; padding: 0; }

/* Public navigation: Blu text, Celeste underline on hover and focus. */
.tp-public-header .nav-link {
  color: var(--tblr-nav-link-color);
  font-weight: 500;
  font-size: 15.5px;
  padding: var(--tp-s2) var(--tp-s3) !important;
  border-bottom: 2px solid transparent;
}
.tp-public-header .nav-link:hover, .tp-public-header .nav-link:focus-visible { color: var(--tblr-nav-link-hover-color); border-bottom-color: currentColor; }
.tp-public-header .navbar-toggler { color: var(--tblr-navbar-color); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); padding: 8px 10px; }
[data-bs-theme=dark] .tp-public-header .navbar-toggler { border-color: rgba(255, 255, 255, .5); }
.tp-topbar .btn-outline-secondary, .tp-public-header .btn-outline-secondary { color: var(--tp-heading); border-color: var(--tp-line); }
[data-bs-theme=dark] .tp-topbar .btn-outline-secondary, [data-bs-theme=dark] .tp-public-header .btn-outline-secondary {
  color: #fff; background: transparent; border-color: rgba(255, 255, 255, .5);
}
[data-bs-theme=dark] .tp-topbar .btn-outline-secondary:hover, [data-bs-theme=dark] .tp-public-header .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, .14); border-color: #fff;
}
/* Active role label. */
.tp-pill { background: var(--tp-soft); color: var(--tp-heading); font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: var(--tp-radius); letter-spacing: .02em; }
.tp-pill:hover { color: var(--tp-heading); background: var(--tp-line); }
[data-bs-theme=dark] .tp-topbar .tp-pill { background: rgba(255, 255, 255, .14); color: #fff; }

/* The page wrapper offset reads the width from its own scope, so it is set at the root as well. */
:root { --tblr-sidebar-width: 232px; }

/* Side navigation (A7 5.4): light list on the paper surface, Celeste marker on the active entry. Below lg Tabler stacks it above the topbar. */
.tp-sidebar.navbar-vertical {
  --tblr-sidebar-width: 232px;
  --tblr-navbar-bg: var(--tp-paper);
  --tblr-navbar-color: var(--tp-ink);
  --tblr-navbar-border-color: var(--tp-line);
  --tblr-navbar-active-bg: var(--tp-soft);
  background: var(--tp-paper);
  color: var(--tp-ink);
  border-right: 1px solid var(--tp-line);
  box-shadow: none;
  padding: var(--tp-s5) var(--tp-s3);
}
.tp-sidebar .navbar-toggler { color: var(--tp-ink); border: 1px solid var(--tp-line); }
.tp-sidebar.navbar-vertical .navbar-nav { padding-inline: 0; gap: 2px; }
.tp-sidebar.navbar-vertical .navbar-nav .nav-link {
  display: flex; align-items: center; gap: var(--tp-s3);
  padding: 10px var(--tp-s3); border-radius: var(--tp-radius); font-weight: 500; color: var(--tp-ink);
}
.tp-sidebar.navbar-vertical .navbar-nav .nav-link:hover,
.tp-sidebar.navbar-vertical .navbar-nav .nav-item.active > .nav-link { background: var(--tp-soft); color: var(--tp-heading); }
.tp-sidebar.navbar-vertical .navbar-nav .nav-item.active > .nav-link { font-weight: 700; box-shadow: inset 3px 0 0 var(--tp-secondary); }
.tp-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--tp-line); }
.tp-sidebar .nav-item.active .tp-dot { background: var(--tp-secondary); }
@media (min-width: 992px) {
  /* Topbar spans the full width; the side menu sits below it. */
  .tp-sidebar.navbar-vertical { top: var(--tp-header-h); height: calc(100% - var(--tp-header-h)); }
  .tp-sidebar.navbar-vertical ~ .tp-topbar.navbar { margin-inline-start: 0; }
}

/* ---- Rule hints (Views/Shared/_RuleHint.cshtml): info icon next to a field, short reason + link to the article of the regulation. */
.tp-hint { display: inline-block; position: relative; margin-left: .25rem; vertical-align: middle; }
.tp-hint > summary { list-style: none; cursor: pointer; color: var(--tblr-primary, #1d4f91); line-height: 1; }
.tp-hint > summary::-webkit-details-marker { display: none; }
.tp-hint > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 50%; }
.tp-hint .ti { font-size: 1.05rem; }
.tp-hint-body {
    position: absolute; z-index: 30; top: 1.6rem; left: -.5rem; width: min(22rem, 80vw); padding: .6rem .75rem;
    background: var(--tblr-bg-surface, #fff); color: var(--tblr-body-color, #1b2433); border: 1px solid var(--tblr-border-color, #d9e1ec);
    border-radius: .5rem; box-shadow: 0 8px 24px rgba(4, 30, 66, .14); font-size: .85rem; font-weight: 400; line-height: 1.4; white-space: normal;
}
.tp-hint-refs { display: block; margin-top: .35rem; font-weight: 600; }
.tp-hint-refs a { text-decoration: underline; }
@media (max-width: 575.98px) { .tp-hint-body { position: fixed; left: 1rem; right: 1rem; top: auto; bottom: 1rem; width: auto; } }
.tp-reg-books { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.co-lines { margin: 0 0 .5rem; }
.co-lines > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.co-lines dt { font-weight: 400; }
.co-due b { color: var(--tblr-danger, #b42318); }
.wiz-kits { border-top: 1px solid var(--tblr-border-color, #d9e1ec); padding-top: 1rem; margin-top: .5rem; }
.wiz-kits { border-left: 0; border-right: 0; border-bottom: 0; min-width: 0; }
.wiz-kits > legend { float: none; width: auto; margin-bottom: .25rem; font-size: 1rem; }
.wiz-kit-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr)); gap: .5rem .75rem; margin-top: .75rem; }
.wiz-kit-size .form-label { margin-bottom: .2rem; font-weight: 600; text-align: center; display: block; }
.wiz-kit-size .form-control { text-align: center; padding-left: .25rem; padding-right: .25rem; }
.wiz-kit-total { margin-top: .75rem; font-weight: 600; }
.wiz-kit-amount { font-weight: 400; color: var(--tblr-secondary, #5b6b82); margin-left: .25rem; }
.wiz-kits-locked { margin-top: .25rem; padding: .5rem .75rem; border-radius: .5rem; background: var(--tblr-bg-surface-secondary, #f1f5fa); font-size: .9rem; }
.wiz-kits:disabled .form-control { background: var(--tblr-bg-surface-secondary, #f1f5fa); cursor: not-allowed; }
.wiz-clearance { font-size: .85rem; margin-top: .25rem; }
.wiz-clearance.is-ok { color: var(--tblr-success, #2f7d32); }

/* Mandatory fields: red asterisk after the label (required-mark.js) */
.tp-required-mark { color: var(--tp-err); font-weight: 700; margin-left: .2em; margin-right: .15em; }
