/* ═══════════════════════════════════════════════════════════
   Website Editor — split-panel layout
   ═══════════════════════════════════════════════════════════ */

.website-editor {
  height: calc(100vh - var(--navbar-height, 56px));
  display: flex;
  flex-direction: column;
}

.website-editor__panels {
  flex: 1;
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 0;
}

/* ── Left panel (editor cards) ── */
.website-editor__left {
  overflow-y: auto;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Right panel (preview) ── */
.website-editor__right {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ═══ Cards ═══ */
.website-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.website-card--bar .website-card__header {
  border-bottom: none;
}

.website-card__header {
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.website-card__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.website-card__body {
  padding: 10px 12px;
}

/* ═══ Toggle switch ═══ */
.website-toggle {
  width: 32px;
  height: 18px;
  background: var(--line);
  border-radius: 9px;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  padding: 0;
}

.website-toggle--on {
  background: var(--accent);
}

.website-toggle__dot {
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.website-toggle--on .website-toggle__dot {
  left: 16px;
}

.website-toggle-form {
  display: inline;
}

/* ═══ Copy button ═══ */
.website-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-3);
  cursor: pointer;
  flex-shrink: 0;
}

.website-copy-btn:hover {
  background: var(--bg-2);
  color: var(--ink);
}

/* ═══ Collapse toggle button ═══ */
.website-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-3);
  flex-shrink: 0;
  transition: transform 0.15s;
}

[data-collapsible-open="false"] .website-collapse-btn {
  transform: rotate(-90deg);
}

/* ═══ Form fields ═══ */
.website-field {
  margin-bottom: 10px;
}

.website-field__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.website-field__input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  color: var(--ink);
  font-family: inherit;
  outline: none;
}

.website-field__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

.website-field__input--slug {
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.website-field__error {
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: 2px;
}

.website-field__actions {
  padding-top: 6px;
}

.website-field__file {
  font-size: var(--text-xs);
  color: var(--ink-3);
  width: 100%;
}

/* ═══ Slug display ═══ */
.website-slug-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.website-field__input--readonly {
  background: var(--bg);
  color: var(--ink-2);
  font-family: ui-monospace, monospace;
  cursor: text;
}

.website-slug-edit {
  display: flex;
  align-items: center;
}

.website-slug-prefix-input {
  padding: 5px 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  font-size: var(--text-sm);
  color: var(--ink-3);
  white-space: nowrap;
}

/* ═══ Banner preview ═══ */
.website-banner-preview {
  border: 2px dashed var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.website-banner-preview__img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  display: block;
}

.website-banner-preview__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 8px;
  gap: 4px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.website-banner-upload {
  border: 2px dashed var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
}

.website-banner-upload__placeholder {
  font-size: var(--text-xs);
  color: var(--ink-4);
}

/* ═══ Post rows ═══ */
.website-post-row {
  display: flex;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--line-2);
  gap: 4px;
}

.website-post-row:last-of-type {
  border-bottom: none;
}

.website-post-row__drag {
  color: var(--ink-4);
  cursor: grab;
  font-size: var(--text-sm);
}

.website-post-row__title {
  flex: 1;
  font-size: var(--text-xs);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.website-post-row__badge {
  padding: 0 5px;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.website-post-row__badge--pin {
  background: var(--accent-light);
  color: var(--accent);
}

.website-post-row__badge--draft {
  background: var(--bg-2);
  color: var(--ink-4);
}

.website-post-row__date {
  font-size: var(--text-xs);
  color: var(--ink-4);
}

.website-post-row__action {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  padding: 2px 8px;
}

.website-post-row__action:hover {
  background: var(--bg-2);
  color: var(--ink);
}

.website-post-row__action--danger {
  color: var(--danger);
  border-color: transparent;
  background: none;
  padding: 2px 4px;
}

.website-post-row__action--danger:hover {
  background: var(--danger-soft);
}

.website-add-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

/* ═══ Live / Offline slider ═══ */
.website-live-slider {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  padding: 0;
}

.website-live-slider__option {
  padding: 2px 10px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-4);
  background: var(--surface);
}

.website-live-slider__option--active {
  color: #fff;
  background: var(--ink-3);
}

.website-live-slider__option--live {
  background: var(--success);
}

/* ═══ Publish section ═══ */
.website-publish-log {
  margin-bottom: 10px;
}

.website-publish-log__entry {
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin-bottom: 2px;
}

.website-publish-log__entry--older {
  color: var(--ink-4);
}

.website-publish-log__blocked {
  font-size: var(--text-xs);
  color: var(--ink-4);
  font-style: italic;
}

.website-publish-btn {
  width: 100%;
}

/* ═══ Preview panel ═══ */
.website-preview__toolbar {
  padding: 6px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.website-preview__label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.website-preview__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.website-preview__device-toggle {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.website-preview__device {
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
}

.website-preview__device--active {
  color: #fff;
  background: var(--accent);
}

.website-preview__frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--bg-2);
  padding: 12px;
}

.website-preview__loading {
  position: relative;
  width: 100%;
  height: 6px;
  flex-shrink: 0;
  border-radius: 3px;
  margin-bottom: 6px;
  background: var(--line-2);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.15s;
}

.website-preview__loading.is-loading {
  opacity: 1;
}

.website-preview__loading.is-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 30%;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  animation: preview-loading-slide 1.2s ease-in-out infinite;
}

@keyframes preview-loading-slide {
  0% { left: -30%; }
  100% { left: 100%; }
}

.website-preview__iframe {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}

.website-preview__content {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 300px;
}

.website-preview__placeholder {
  padding: 2rem;
  text-align: center;
  color: var(--ink-4);
  font-size: var(--text-sm);
}

/* ═══════════════════════════════════════════════════════════
   Public Website — layout, nav, banner, header, footer
   ═══════════════════════════════════════════════════════════ */

.public-body {
  background: var(--bg);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navbar ── */
.public-nav {
  height: var(--navbar-height);
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--navbar-border);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.public-nav__logo {
  font-size: 1.143rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad-light);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.public-nav__title {
  color: var(--navbar-tab);
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-nav__links {
  margin-left: auto;
  display: flex;
  gap: 0;
  height: 100%;
}

.public-nav__link {
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  color: var(--navbar-tab);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  height: 100%;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}

.public-nav__link:hover {
  color: var(--navbar-tab-hover);
}

.public-nav__link--active {
  color: var(--navbar-tab-active);
  font-weight: 700;
  border-bottom-color: var(--navbar-tab-active);
}

.public-nav__current-page,
.public-nav__hamburger,
.public-nav__dropdown {
  display: none;
}

/* ── Banner ── */
.public-banner {
  width: 100%;
  max-height: 300px;
  overflow: hidden;
}

.public-banner__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.public-banner--default {
  height: 160px;
  background: linear-gradient(135deg, #0f1722 0%, #1e3a5f 40%, #2a5a8a 70%, #1a4570 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.public-banner__watermark {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.06);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  user-select: none;
}

/* ── Header ── */
.public-header {
  padding: 16px 20px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.public-header__title {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.public-header__meta {
  font-size: var(--text-sm);
  color: var(--ink-3);
  margin-top: 2px;
}

.public-header__status {
  padding: 1px 8px;
  background: var(--success-soft);
  color: var(--success);
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--r-pill);
}

.public-header__status--neutral {
  background: var(--bg-2);
  color: var(--ink-3);
}

/* ── Main content ── */
.public-main {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 2rem;
}

/* ── Footer ── */
.public-footer {
  padding: 6px 20px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--ink-4);
}

/* ── Mobile overrides ── */
@media (max-width: 768px) {
  .public-nav__links {
    display: none;
  }

  .public-nav__current-page {
    display: block;
    margin-left: auto;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--navbar-tab-active);
  }

  .public-nav__hamburger {
    display: block;
    background: none;
    border: none;
    color: var(--navbar-tab);
    font-size: var(--text-base);
    cursor: pointer;
    padding: 0 0 0 8px;
  }

  .public-nav__dropdown {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--navbar-border);
    z-index: 99;
    padding: 0.5rem 0;
  }

  .public-nav__dropdown[hidden] {
    display: none;
  }

  .public-nav__dropdown-link {
    padding: 0.6rem 1.25rem;
    color: var(--navbar-tab);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 600;
  }

  .public-nav__dropdown-link--active {
    color: var(--navbar-tab-active);
    background: rgba(255, 255, 255, 0.05);
  }

  .public-banner--default {
    height: 100px;
  }

  .public-banner__watermark {
    font-size: 1.5rem;
  }

  .public-banner__img {
    height: 120px;
  }

  .public-header {
    padding: 12px 16px 10px;
  }

  .public-header__title {
    font-size: var(--text-lg);
  }

  .public-main {
    padding: 12px;
  }

  /* Standings mobile: hide Tier, PF, PA; compact layout */
  .public-standings .col-tier,
  .public-standings .col-pf,
  .public-standings .col-pa {
    display: none;
  }
  .public-standings thead th,
  .public-standings tbody td {
    font-size: 11px !important;
    padding: 6px !important;
  }
  .public-standings .col-rank {
    width: 22px;
    text-align: center;
    padding-left: 4px !important;
    padding-right: 2px !important;
  }
  .public-standings .col-rank .standings-rank-cell__current {
    width: auto;
    text-align: center;
  }
  .public-standings .standings-col--team {
    max-width: 140px;
    font-size: 11px !important;
  }

  /* Games tab mobile: hide Period, Pt Diff, Location */
  .public-main .col-period,
  .public-main .col-ptdiff,
  .public-main .col-location {
    display: none;
  }

  /* Overview tables mobile: hide extra columns */
  .public-main .col-gp,
  .public-main .col-pts-fa,
  .public-main .col-opp-diff,
  .public-main .col-avg-elo,
  .public-main .col-pb-tier,
  .public-main .col-pb-pts,
  .public-main .col-pb-delta {
    display: none;
  }

  /* Team header mobile: icon left of name, stats full width, form centered */
  .team-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .team-header__info {
    flex: 1;
    min-width: 0;
  }
  .team-header__stats {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .team-header__meta,
  .team-header__stat-label {
    font-size: 9px !important;
  }

  /* Chart segmented buttons: smaller on mobile */
  .public-chart-segmented .segmented__btn {
    font-size: 11px;
    padding: 0.2rem 0.6rem;
  }

  /* Opponents sidebar → stacked on mobile (CSS fallback if JS viewport not loaded) */
  .opponents-layout {
    grid-template-columns: 1fr;
  }

  /* Schedule: card view always visible on mobile, list view hidden */
  [data-public-schedule-filter-target="cardView"] {
    display: block !important;
  }
  [data-public-schedule-filter-target="listView"] {
    display: none !important;
  }
}

/* ═══ Public page sections ═══ */
.public-section-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 12px;
}

.public-section-card__header {
  padding: 8px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-2);
  font-size: var(--text-sm);
  font-weight: 700;
}

.public-section-card__body {
  padding: 12px 14px;
  font-size: var(--text-sm);
  color: var(--ink-2);
  line-height: 1.6;
}

.public-section-card__photos {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.public-section-card__photo {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: max-height 0.2s;
}

/* ── News feed ── */
.public-news-post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.public-news-post--pinned {
  border-left: 3px solid var(--accent);
}

.public-news-post__meta {
  font-size: var(--text-xs);
  color: var(--ink-4);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.public-news-post__pin-badge {
  padding: 0 6px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: var(--r-pill);
  text-transform: uppercase;
}

.public-news-post__author-avatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.4rem;
  color: #fff;
  font-weight: 700;
}

.public-news-post__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 4px;
}

.public-news-post__body {
  font-size: var(--text-sm);
  color: var(--ink-2);
  line-height: 1.6;
}

.public-news-post__photos {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.public-news-post__photo {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: max-height 0.2s;
}

/* ── View toggle (list/card) ── */
.public-view-toggle {
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface);
}

.public-view-toggle--active {
  color: #fff;
  background: var(--accent);
}

/* ── Public chart overrides — compact controls ── */
.public-body .chart-header {
  flex-wrap: wrap;
  gap: 6px;
}

.public-body .segmented {
  padding: 2px;
}

.public-body .segmented__btn {
  padding: 0.2rem 0.6rem;
  font-size: var(--text-xs);
}

.public-body .chart-area canvas {
  max-height: 180px;
}

/* ── Team card grid ── */
.public-team-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 6px;
}

.public-team-row {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.1s;
}

.public-team-row:hover {
  box-shadow: var(--shadow);
}

.public-team-row__top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.public-team-row__name {
  font-size: var(--text-lg);
  font-weight: 800;
}

.public-team-row__stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.public-team-row__stat-value {
  font-size: var(--text-base);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.public-team-row__stat-label {
  font-size: var(--text-xs);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ── Photo thumbnails in modal ── */
.website-photo-thumbnails {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.website-photo-thumbnail-wrap {
  position: relative;
  display: inline-block;
}

.website-photo-thumbnail {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

.website-photo-thumbnail__remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: none;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.website-photo-thumbnail__spinner {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.website-photo-thumbnail__spinner::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.website-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

/* ── File upload button ── */
.website-file-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.website-file-btn__input {
  display: none;
}



/* ── Public photos: click-to-expand ── */
.public-section-card__photo.is-expanded,
.public-news-post__photo.is-expanded {
  max-height: none;
}

/* ── Schedule search input — matches filter-bar__select styling but no dropdown arrow ── */
.filter-bar__input {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: var(--r-sm);
  padding: 5px 8px;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--ink);
  outline: none;
}
.filter-bar__input:focus {
  border-color: var(--accent);
}

/* ── Mobile games table — compact padding ── */
@media (max-width: 768px) {
  .public-games-table th,
  .public-games-table td {
    padding: 6px 4px !important;
  }
}

/* ── Mobile opponents vs table — tighter padding ── */
.public-opp-table th,
.public-opp-table td {
  padding: 6px !important;
}

/* ── Inline elo chip — lighter variant for next-to-team-name display ── */
.stat-badge--inline {
  background: var(--bg-2);
  color: var(--ink-2);
  font-weight: 600;
}

/* ── Team header: stick below navbar with gap ── */
.public-main .team-header {
  top: calc(var(--navbar-height) + 4px);
}

/* ── Remove darker bottom border on cards containing tables ── */

/* ── Public table overrides — 12px font, 7px row padding ── */
.public-main .data-table th {
  font-size: 11px;
}
.public-main .data-table th,
.public-main .data-table td {
  padding: 7px 10px;
}
.public-main .data-table td {
  font-size: 12px;
}

.public-standings { min-width: 0 !important; }
.public-standings th,
.public-standings td {
  font-size: 12px;
  padding: 7px 10px;
}
.public-standings thead th {
  padding: 7px 10px;
}
.public-standings .standings-col--team {
  font-size: 13px;
}

/* ── Viewport toggles ── */
/* CSS media query handles pre-JS state; Stimulus refines on connect */
.mobile-only { display: none !important; }
.public-mobile .mobile-only { display: revert !important; }
.public-mobile .desktop-only { display: none !important; }
@media (max-width: 768px) {
  body:not(.public-desktop) .mobile-only { display: revert !important; }
  body:not(.public-desktop) .desktop-only { display: none !important; }
}

/* ── Mobile team card list ── */
.public-team-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.public-team-list-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px 10px;
  text-decoration: none;
  color: inherit;
}

.public-team-list-card__rank {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-3);
  width: 20px;
  text-align: right;
  flex-shrink: 0;
}

.public-team-list-card__info {
  flex: 1;
  min-width: 0;
}

.public-team-list-card__row1 {
  display: flex;
  align-items: center;
  gap: 4px;
}

.public-team-list-card__name {
  font-size: var(--text-sm);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-team-list-card__row2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin-top: 4px;
}

/* ── Mobile form strip (small squares) ── */
.public-form-strip {
  display: inline-flex;
  gap: 2px;
}

.public-form-strip__item {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.45rem;
  color: #fff;
  font-weight: 700;
}

/* Mobile: form strips render as dots (no letter) */
.public-mobile .public-form-strip__item {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  font-size: 0;
}
.public-mobile .results-strip b {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  font-size: 0;
  padding: 0;
}

.public-form-strip__item--w { background: var(--success); }
.public-form-strip__item--l { background: var(--danger); }
.public-form-strip__item--t { background: var(--ink-3); }

/* ── Mobile opponent carousel ── */
.public-opp-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.public-opp-carousel::-webkit-scrollbar { display: none; }

.public-opp-carousel__card {
  flex-shrink: 0;
  width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px 10px;
  cursor: pointer;
}

.public-opp-carousel__card.is-active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.public-opp-carousel__name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.public-opp-carousel__name .cell-truncate {
  font-size: var(--text-sm);
  font-weight: 700;
}

.public-opp-carousel__stats {
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 2px;
}

.public-opp-carousel__form {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}

.public-opp-carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* ── Empty states ── */
.public-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-4);
  font-size: var(--text-sm);
}
