@charset "UTF-8";
/* ARS 2.0 — tallit, tallisivu, oma profiili ja tallien hallinta. */

/* --- Välilehdet Kuljettajat | Tallit --- */
.section-tabs { display: flex; gap: 24px; margin: 18px 0 0; border-bottom: 1px solid var(--rule); }
.section-tabs a { padding: 10px 0 12px; color: var(--frost); font-size: 14px; font-variation-settings: 'wdth' 104, 'wght' 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.section-tabs a:hover { color: var(--snow); }
.section-tabs a[aria-current=page] { color: var(--snow); border-bottom-color: var(--ars); }

/* --- Logo tai nimikirjaimet --- */
.team-logo { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 3px; object-fit: contain; background: var(--board-lift); border: 1px solid var(--rule-strong); }
.team-logo.large { width: 76px; height: 76px; }
.team-initials { color: var(--snow); font-size: 13px; font-variation-settings: 'wdth' 112, 'wght' 750; }
.team-logo.large.team-initials { font-size: 22px; }

/* --- Tallilista --- */
.teams-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 6px; }
.team-rows, .team-series-rows, .team-admin-list, .profile-series-list { list-style: none; margin: 0; padding: 0; }
.team-row > a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); color: inherit; transition: background-color 0.15s; }
.team-row > a:hover { background: #09131c; }
.team-row-name strong { display: block; font-size: 1rem; font-variation-settings: 'wdth' 110, 'wght' 700; }
.team-row-name small { display: block; color: var(--frost); font-size: 12.5px; max-width: 70ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-row-count { color: var(--frost-dim); font-size: 12.5px; white-space: nowrap; }
.team-row-count b { color: var(--snow); font-variant-numeric: tabular-nums; }

/* --- Tallisivu --- */
.team-heading { display: flex; align-items: center; gap: 22px; padding: 6px 0 24px; border-bottom: 1px solid var(--rule-strong); }
.team-heading h1 { margin: 0; }
.team-heading p { margin-top: 8px; color: var(--frost); max-width: 60ch; }
.team-heading .chip { margin-top: 10px; }
.team-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.team-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 4vw, 56px); margin-top: 8px; }
.team-columns .section-head { margin-bottom: 4px; }
.team-series-row > a { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--rule); color: inherit; }
.team-series-row > a:hover strong { color: var(--ars); }
.team-series-name strong { display: block; font-variation-settings: 'wdth' 108, 'wght' 700; }
.team-series-name small { display: block; color: var(--frost-dim); font-size: 12px; }
.team-series-place, .team-series-points { color: var(--frost); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.team-series-place b, .team-series-points b { color: var(--snow); font-size: 15px; font-variation-settings: 'wdth' 110, 'wght' 750; }

/* --- Oma profiili --- */
.my-team { display: flex; align-items: center; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.my-team h2 { margin: 2px 0; font-size: 1.5rem; }
.my-team h2 a { color: var(--snow); }
.my-team small { color: var(--frost); font-size: 12.5px; }
.my-team > button { margin-left: auto; }
.profile-team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.profile-team-grid .panel { padding: 22px; }
.profile-team-grid h2 { font-size: 1.25rem; margin-bottom: 10px; }
.profile-team-grid label { display: block; margin: 12px 0 6px; }
.profile-team-grid select, .profile-team-grid input, .profile-team-grid textarea { width: 100%; }
.profile-team-grid button.primary { margin-top: 14px; }
.profile-series { margin-top: 32px; }
.profile-series-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 18px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.profile-series-list strong { font-variation-settings: 'wdth' 108, 'wght' 700; }
.profile-series-list span { color: var(--snow); text-align: right; }
.profile-series-list small { grid-column: 1 / -1; color: var(--frost-dim); font-size: 12px; }
label.check { display: flex; align-items: center; gap: 9px; color: var(--snow); font-size: 13px; cursor: pointer; }
label.check input { width: auto; margin: 0; accent-color: var(--ars); }
label.check[hidden] { display: none; }

/* --- Ilmoittautumisen talli --- */
.registration-team { grid-column: 1 / -1; display: grid; gap: 4px; padding: 14px 16px; margin: 6px 0; border: 1px solid var(--rule-strong); border-radius: 3px; background: var(--night); }
.registration-team strong { font-size: 1.0625rem; font-variation-settings: 'wdth' 110, 'wght' 700; }
.registration-team small { color: var(--frost); font-size: 12.5px; }
.registration-team small a { color: var(--ars); }
.registration-team label.check { margin-top: 6px; }

/* --- Sarjasivun tallitaulukko --- */
.series-content .series-team-standings h3 { color: var(--snow); }
.series-team-standings .points-leader { background: color-mix(in srgb, var(--ars) 7%, transparent); }
.series-team-standings .points-leader td:first-child { color: var(--ars); font-variation-settings: 'wdth' 100, 'wght' 750; }
.series-team-standings td strong a { color: var(--snow); }
.series-team-standings td strong a:hover { color: var(--ars); }
.series-team-standings td small { display: block; color: var(--frost-dim); font-size: 11.5px; margin-top: 3px; }
.series-team-standings > .text-link { display: inline-block; margin-top: 14px; }

/* --- Tallien hallinta --- */
.teams-admin section { margin-top: 30px; }
.team-admin-row { padding: 14px 0; border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.team-admin-row > div > strong { display: block; }
.team-admin-row small { display: block; color: var(--frost); font-size: 12.5px; }
.team-admin-row details { width: 100%; }
.team-admin-row summary { display: flex; align-items: center; gap: 14px; cursor: pointer; list-style: none; }
.team-admin-row summary::-webkit-details-marker { display: none; }
.team-admin-row summary strong { display: block; }
.team-admin-row form, .team-admin-danger { max-width: 560px; margin: 16px 0 6px 54px; }
.team-admin-row form label, .team-admin-danger label { display: block; margin: 10px 0 6px; }
.team-admin-row form input:not([type=file]), .team-admin-row form textarea, .team-admin-danger select { width: 100%; }
.team-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.team-admin-danger { padding-top: 14px; border-top: 1px solid var(--rule); }
.team-admin-danger button { margin: 10px 8px 0 0; }

@media (max-width: 760px) {
  .team-columns, .profile-team-grid { grid-template-columns: 1fr; }
  .team-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team-series-row > a { grid-template-columns: minmax(0, 1fr) auto; }
  .team-series-points { grid-column: 2; }
  .my-team { flex-wrap: wrap; }
  .my-team > button { margin-left: 0; }
  .team-heading { align-items: flex-start; }
  .team-admin-row { flex-wrap: wrap; }
  .team-admin-row form, .team-admin-danger { margin-left: 0; }
  .team-row-name small { white-space: normal; }
}

/* --- Oma talli: jäsenet, hakemukset ja perustaja --- */
.my-team-members, .team-requests { list-style: none; margin: 0; padding: 0; }
.my-team-members li, .team-requests li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.my-team-members li > span, .team-requests li > span:first-child { flex: 1 1 auto; min-width: 0; }
.my-team-members small, .team-requests small { color: var(--frost-dim); font-size: 12px; }
.team-requests li > span:first-child small { display: block; margin-top: 2px; }
.team-founder { margin-left: 6px; font-size: 11px; color: var(--ars); border-color: color-mix(in srgb, var(--ars) 45%, transparent); }
.team-owner-grid { margin-top: 18px; }
.team-owner-grid [data-logo-clear] { margin-top: 10px; }
.team-requests .team-admin-actions { margin-top: 0; }
.team-requests button { min-height: 38px; padding-top: 0; padding-bottom: 0; }
