/* =====================================================================
   AvailableLeagues26.ascx.css - the open-leagues cards (KG/Claude 10/2/2026)
   Sits on the night surface of the Home/game pages (HomeMaster): each league is a white card, like the sign-in card. Colors are --sw-* only.
   The card wears the game's color through --sw-theme (the page sets data-theme on a wrapper). Everything is scoped to .al26-*.
   ===================================================================== */

.al26 { text-align: left; color: var(--sw-ink); }
.al26 *, .al26 *::before, .al26 *::after { box-sizing: border-box; }

/* ---------- messages above the list ---------- */
.al26-note, .al26-terms, .al26-alert {
  margin: 0 0 14px;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.5;
  border-radius: var(--sw-radius);
}
.al26-note { color: var(--sw-on-night); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
.al26-note a.al26-link { color: var(--sw-gold); }
.al26-terms { color: var(--sw-on-night-soft); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); }
.al26-terms label { display: flex; align-items: flex-start; gap: 10px; margin: 0; cursor: pointer; font-weight: 400; }
.al26-terms input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--sw-red); }
.al26-terms a.al26-link { color: var(--sw-gold); }
.al26-alert { color: var(--sw-danger); background: var(--sw-danger-bg); border: 1px solid color-mix(in srgb, var(--sw-danger) 35%, transparent); font-weight: 600; }
a.al26-link { font-weight: 600; text-decoration: underline; }

/* ---------- the cards ---------- */
.al26-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }

.al26-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px 18px;
  background: var(--sw-surface);
  border-top: 4px solid var(--sw-theme);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .42), 0 2px 6px rgba(0, 0, 0, .22);
}

.al26-top { display: flex; align-items: center; gap: 14px; }
.al26-logo { flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; overflow: hidden; border-radius: 12px; background: var(--sw-panel); border: 1px solid var(--sw-line); }
.al26-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.al26-logo.is-initial { font: 700 28px/1 var(--sw-font-cond); color: var(--sw-surface); background: var(--sw-theme); border-color: transparent; }
.al26-who { flex: 1 1 auto; min-width: 0; }
.al26 h4 { margin: 0; font: 700 26px/1.05 var(--sw-font-cond); letter-spacing: .01em; color: var(--sw-navy); overflow-wrap: anywhere; }
.al26-who p { margin: 3px 0 0; font-size: 13px; color: var(--sw-muted); overflow-wrap: anywhere; }
.al26-card a.al26-link { color: var(--sw-blue-dark); }

.al26-seats { flex: 0 0 auto; padding: 4px 11px; font: 700 12px/1.4 var(--sw-font-sans); white-space: nowrap; color: var(--sw-success); background: var(--sw-success-bg); border-radius: var(--sw-radius-pill); }
.al26-seats.is-last { color: var(--sw-warning); background: var(--sw-warning-bg); }
.al26-seats.is-full { color: var(--sw-muted); background: var(--sw-panel); }

/* seats filled: the width is passed in as --al-fill (a dynamic value, the one inline-style exception) */
.al26-meter { height: 6px; overflow: hidden; background: var(--sw-line); border-radius: var(--sw-radius-pill); }
.al26-meter > span { display: block; width: var(--al-fill, 0%); height: 100%; background: var(--sw-theme); border-radius: var(--sw-radius-pill); }

.al26-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.al26-facts div { min-width: 0; }
.al26-facts dt { margin: 0 0 2px; font: 700 11px/1.2 var(--sw-font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--sw-faint); }
.al26-facts dd { margin: 0; font-size: 14.5px; line-height: 1.35; font-weight: 600; color: var(--sw-ink); overflow-wrap: anywhere; }

.al26-more { font-size: 14px; color: var(--sw-ink-soft); }
.al26-more summary { cursor: pointer; font-weight: 600; color: var(--sw-theme-dark); }
.al26-more summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--sw-theme) 40%, transparent); outline-offset: 2px; border-radius: 4px; }
.al26-more p { margin: 8px 0 0; line-height: 1.55; }

.al26-card .al26-comments, .al26-card .al26-invite { margin: 0; font-size: 14px; line-height: 1.55; color: var(--sw-ink-soft); }
.al26-card .al26-invite { padding: 10px 12px; color: var(--sw-warning); background: var(--sw-warning-bg); border-radius: var(--sw-radius); font-weight: 600; }

.al26-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 2px; padding-top: 14px; border-top: 1px solid var(--sw-line); }
.al26-actions .al26-already { font-size: 14px; font-weight: 600; color: var(--sw-muted); }
.al26-actions .al26-already:empty { display: none; }
.al26 input.al26-btn {
  height: 46px;
  padding: 0 22px;
  font: 700 15px var(--sw-font-sans);
  border-radius: var(--sw-radius);
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .05s;
}
.al26 input.al26-btn:active { transform: translateY(1px); }
.al26 input.al26-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--sw-theme) 45%, transparent); outline-offset: 2px; }
.al26 input.al26-btn-primary {
  color: var(--sw-surface);
  border: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sw-red) 92%, white), color-mix(in srgb, var(--sw-red) 82%, black));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--sw-red) 30%, transparent);
}
.al26 input.al26-btn-primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--sw-red) 82%, white), var(--sw-red)); }
.al26 input.al26-btn-ghost { color: var(--sw-navy); background: var(--sw-surface); border: 1.5px solid var(--sw-line-strong); }
.al26 input.al26-btn-ghost:hover { background: var(--sw-panel); }

/* ---------- nothing open ---------- */
.al26-empty { padding: 22px 24px; color: var(--sw-on-night-soft); background: rgba(255, 255, 255, .05); border: 1px dashed rgba(255, 255, 255, .22); border-radius: 14px; }
.al26-empty p { margin: 0 0 6px; font-size: 16px; }
.al26-empty p b { color: var(--sw-surface); }

@media (max-width: 640px) {
  .al26-card { padding: 16px 16px 14px; border-radius: 14px; }
  .al26-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .al26 input.al26-btn { width: 100%; }
  .al26 h4 { font-size: 24px; }
}

/* ---------- the invite-code box (JoinLeague.aspx, ShowInviteBox) ---------- */
.al26-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  margin: 0 0 16px;
  padding: 20px 24px;
  background: var(--sw-surface);
  border-top: 4px solid var(--sw-red);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .42), 0 2px 6px rgba(0, 0, 0, .22);
}
.al26-code-text { flex: 1 1 260px; min-width: 0; }
.al26-code h3 { margin: 0 0 4px; font: 700 26px/1.05 var(--sw-font-cond); letter-spacing: .01em; color: var(--sw-navy); }
.al26-code-text p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--sw-muted); }
.al26-code-form { flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.al26-code-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.al26 input.al26-code-input {
  box-sizing: border-box;
  width: 240px;
  max-width: 100%;
  height: 46px;
  padding: 0 14px;
  font: 400 16px var(--sw-font-sans);
  letter-spacing: .04em;
  color: var(--sw-ink);
  background: var(--sw-surface);
  border: 1px solid var(--sw-line-strong);
  border-radius: var(--sw-radius);
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.al26 input.al26-code-input:focus { border-color: var(--sw-theme); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sw-theme) 18%, transparent); }
@media (max-width: 640px) {
  .al26-code { padding: 16px 16px; border-radius: 14px; }
  .al26-code-form { width: 100%; }
  .al26 input.al26-code-input { width: 100%; }
}
