/* ─── RESET & BASE ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #E9292F;
  --red-dark: #c41e24;
  --yellow: #FFD602;
  --bg: #f2f2f7;
  --card: #ffffff;
  --text: #1c1c1e;
  --text-secondary: #8e8e93;
  --border: #e5e5ea;
  --radius: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ─── HEADER ──────────────────────────────────────────────────────────────── */
.app-header {
  background: linear-gradient(160deg, var(--red) 0%, var(--red-dark) 100%);
  color: white;
  padding: 16px 16px 12px;
  padding-top: max(16px, env(safe-area-inset-top));
}

.header-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-brand { min-width: 0; flex: 1 1 auto; }
.team-switcher {
  display: flex;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.team-btn {
  background: none; border: none;
  color: rgba(255,255,255,0.75);
  font-size: 13px; font-weight: 600;
  padding: 5px 14px; border-radius: 16px;
  cursor: pointer; transition: all .15s;
}
.team-btn.active {
  background: white;
  color: var(--red);
}
.header-install-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 58px; height: 48px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.45);
  border-radius: 10px; color: white; cursor: pointer;
  padding: 4px 5px; font-size: 10px; font-weight: 700;
  line-height: 1.15; white-space: nowrap;
}
.header-install-btn:active { background: rgba(255,255,255,.3); }
.header-install-icon {
  width: 20px; height: 20px; margin-bottom: 2px;
  fill: none; stroke: currentColor; stroke-linecap: round;
  stroke-linejoin: round; stroke-width: 2;
}

@media (max-width: 390px) {
  .header-top { gap: 7px; }
  .header-club-logo { width: 44px; height: 44px; }
  .header-logo { font-size: 20px; }
  .header-sub { font-size: 12px; }
  .team-btn { padding-inline: 8px; font-size: 12px; }
  .header-install-btn { min-width: 52px; font-size: 9px; }
}

.header-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-sub {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 2px;
}

.header-club-logo {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: white;
  padding: 4px;
  flex-shrink: 0;
}

/* Sponsor banner */
.sponsor-bar {
  background: white;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.sponsor-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  font-weight: 600;
}

.sponsor-slot {
  height: 48px;
  min-width: 0;
  flex: 1;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  flex-shrink: 0;
}

.sponsor-slot img { max-width: 100%; height: 100%; object-fit: contain; padding: 0; }
.sponsor-slot:nth-child(2) { flex: 1.4; height: 64px; }

/* ─── NAVIGATION ─────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1;
  min-width: 70px;
  padding: 13px 8px;
  text-align: center;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.tab-btn.active { border-bottom-color: var(--red); color: var(--red); }

/* ─── VIEWS ──────────────────────────────────────────────────────────────── */
.view { display: none; padding: 12px 12px calc(80px + var(--safe-bottom)); min-height: 60vh; }
.view.active { display: block; }

/* ─── MATCH CARD ──────────────────────────────────────────────────────────── */
.match-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.match-card--live { border-left: 3px solid var(--red); }

.match-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
}

.team { flex: 1; text-align: center; }

.team-abbr {
  width: 44px; height: 44px;
  background: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: var(--red);
  margin: 0 auto 6px;
}

.team-name { font-size: 13px; font-weight: 500; }

.score {
  font-size: 30px;
  font-weight: 700;
  padding: 0 12px;
  letter-spacing: -1px;
}
.score--upcoming { font-size: 18px; color: var(--text-secondary); font-weight: 400; }

.match-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.match-arena { font-size: 12px; color: var(--text-secondary); }
.match-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── BADGES ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge--live { background: var(--red); color: white; animation: pulse 2s infinite; }
.badge--upcoming { background: #e5e5ea; color: var(--text-secondary); }
.badge--win { background: #d1fae5; color: #065f46; }
.badge--loss { background: #fee2e2; color: #991b1b; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }

/* ─── LINK BUTTON ────────────────────────────────────────────────────────── */
.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--red); font-size: 13px; font-weight: 600;
  padding: 0; text-decoration: none;
}

/* ─── PLAYER CARD ────────────────────────────────────────────────────────── */
.player-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  position: relative;
  transition: box-shadow .2s;
}
.player-card:active { box-shadow: 0 2px 8px rgba(0,0,0,.15); }

.player-photo {
  width: 46px; height: 46px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  flex-shrink: 0;
  margin-right: 12px;
  display: flex; align-items: center; justify-content: center;
}
.player-photo img { width: 100%; height: 100%; object-fit: cover; }
.player-initials { color: white; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; }

.player-info { flex: 1; min-width: 0; }
.player-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-position { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.player-number { font-weight: 700; font-size: 20px; color: var(--red); margin-left: 8px; min-width: 28px; text-align: right; }

.player-card--dnp { opacity: 0.5; }

.captain-badge {
  position: absolute; bottom: 2px; right: 2px;
  width: 16px; height: 16px;
  background: var(--yellow); color: #333;
  border-radius: 50%; font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ─── LINEUP BANNER ──────────────────────────────────────────────────────── */
.lineup-banner {
  background: var(--card);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.lineup-banner--upcoming { border-left-color: #27ae60; }
.lineup-banner__label { font-weight: 700; font-size: 14px; }
.lineup-banner__sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ─── FILTER BUTTONS ─────────────────────────────────────────────────────── */
.filter-row { display: flex; gap: 8px; margin-bottom: 12px; }
.filter-btn {
  padding: 7px 14px; border-radius: 20px;
  border: 1.5px solid var(--border); background: white;
  font-size: 13px; font-weight: 500; cursor: pointer;
  color: var(--text-secondary); transition: all .2s;
}
.filter-btn.active { background: var(--red); border-color: var(--red); color: white; }

/* ─── TABLE ──────────────────────────────────────────────────────────────── */
.table-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  margin-bottom: 10px;
}

.table-card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-card th { background: var(--bg); padding: 8px 6px; text-align: center; font-weight: 600; color: var(--text-secondary); font-size: 11px; text-transform: uppercase; }
.table-card td { padding: 10px 6px; text-align: center; border-top: 1px solid var(--border); }
.table-card .team-cell { text-align: left; padding-left: 10px; font-weight: 500; }
.table-card .pos-cell { color: var(--text-secondary); font-size: 12px; }
.table-card .pts-cell { color: var(--text); }
.table-card .diff-cell { color: var(--text-secondary); }
.table-card .empty-table-cell,
.stats-table .empty-table-cell {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
  padding: 18px 14px;
  text-align: center;
}
.table-card tr.our-team { background: #fff5f5; }
.table-card tr.our-team .team-cell { color: var(--red); }

/* NPS-knappar */
.nps-btn.selected { background: var(--red) !important; color: #fff !important; border-color: var(--red) !important; }

/* Tabellseparatorer */
.table-separator td { padding: 0; position: relative; }
.table-separator--solid td  { border-top: 2px solid var(--red); }
.table-separator--dashed td { border-top: 2px dashed #aaa; }
.table-separator-label {
  position: absolute;
  right: 8px;
  top: -10px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--card);
  padding: 0 4px;
  color: var(--text-secondary);
}

.form-row {
  padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--text-secondary);
  border-top: 1px solid var(--border);
}
.form-badges { display: flex; gap: 4px; }
.form-badge {
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.form-badge--win { background: #d1fae5; color: #065f46; }
.form-badge--loss { background: #fee2e2; color: #991b1b; }

/* ─── STATISTICS ─────────────────────────────────────────────────────────── */
.sort-row { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.sort-btn {
  padding: 6px 12px; border-radius: 16px;
  border: 1.5px solid var(--border); background: white;
  font-size: 12px; font-weight: 500; cursor: pointer; color: var(--text-secondary);
}
.sort-btn.active { background: var(--red); border-color: var(--red); color: white; }

.stats-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stats-table th { padding: 8px 6px; text-align: center; font-weight: 600; color: var(--text-secondary); font-size: 11px; text-transform: uppercase; background: var(--bg); }
.stats-table td { padding: 10px 6px; text-align: center; border-top: 1px solid var(--border); }
.stats-table .player-cell { text-align: left; padding-left: 10px; }
.stats-table .stats-name { display: block; font-weight: 600; }
.stats-table .stats-pos { font-size: 11px; color: var(--text-secondary); }
.stats-table .highlight-col { font-weight: 700; color: var(--red); }

/* ─── FANS / NEWS ────────────────────────────────────────────────────────── */
.section-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }

/* ─── AKTUELLT ───────────────────────────────────────────────────────────── */
.section-title--current { margin: 4px 0 10px; }
.current-match-card { margin-bottom: 18px; }
.current-result-card {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 14px; margin-bottom: 18px; border: none; border-radius: var(--radius);
  background: var(--card); color: var(--text); text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.current-result-card small { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 12px; font-weight: 400; }
.current-result-score { color: var(--red); font-size: 20px; white-space: nowrap; }
.current-result-empty {
  padding: 14px; margin-bottom: 18px; border-radius: var(--radius);
  background: var(--card); color: var(--text-secondary); font-size: 13px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.current-more-btn {
  width: 100%; padding: 12px; margin: 2px 0 18px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--card); color: var(--red);
  font-size: 14px; font-weight: 700; cursor: pointer;
}

.news-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  display: flex;
}
.news-image { width: 90px; min-height: 90px; background: var(--bg); flex-shrink: 0; overflow: hidden; }
.news-image img { width: 100%; height: 100%; object-fit: cover; }
.news-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.news-body { padding: 12px; flex: 1; min-width: 0; }
.news-date { font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.news-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.news-excerpt { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg);
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.action-btn {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--red); color: white;
  padding: 14px 16px; border-radius: var(--radius);
  border: none; width: 100%; cursor: pointer;
  font-size: 15px; font-weight: 600; margin-bottom: 10px;
}

/* ─── DETAIL VIEWS ────────────────────────────────────────────────────────── */
.detail-header {
  display: flex; align-items: center; gap: 12px;
  background: white; padding: 14px;
  border-radius: var(--radius); margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.back-btn {
  background: none; border: none; cursor: pointer;
  color: var(--red); font-size: 15px; font-weight: 600; padding: 0;
}

.detail-title { font-size: 16px; font-weight: 700; }
.detail-sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.section-card {
  background: var(--card); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.section-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

.player-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.player-row:last-child { border-bottom: none; }
.jersey { width: 28px; font-weight: 700; color: var(--red); font-size: 13px; }
.player-row-name { flex: 1; font-weight: 500; font-size: 14px; }
.player-row-pos { font-size: 12px; color: var(--text-secondary); }

.event-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.event-row:last-child { border-bottom: none; }
.event-time { width: 40px; font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.event-icon { font-size: 16px; }
.event-desc { flex: 1; font-size: 13px; }
.event-assist { color: var(--text-secondary); font-size: 12px; }
.event-score { font-weight: 700; font-size: 14px; }

/* Player profile */
.profile-photo-wrap {
  width: 96px; height: 128px; border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.profile-photo-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
#profile-initials { color: white; font-size: 32px; font-weight: 700; display: none; }

@media (max-width: 380px) {
  .profile-photo-wrap { width: 84px; height: 112px; }
}

.info-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-row:last-child { border-bottom: none; }

.player-profile-answers { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.player-profile-answer { margin-bottom: 14px; }
.player-profile-answer:last-child { margin-bottom: 0; }
.player-profile-answer span { display: block; color: var(--text-secondary); font-size: 12px; margin-bottom: 3px; }
.player-profile-answer strong { display: block; font-size: 14px; line-height: 1.4; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat-box { background: var(--bg); border-radius: 10px; padding: 12px 8px; text-align: center; }
.stat-num { font-size: 24px; font-weight: 700; color: var(--red); }
.stat-lbl { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }

/* ─── INSTALL BANNER ─────────────────────────────────────────────────────── */
/* ─── INSTALL MODAL ──────────────────────────────────────────────────────── */
.install-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 300;
  padding-bottom: calc(var(--safe-bottom) + 8px);
}
.hidden { display: none !important; }
.install-modal.hidden { display: none; }
.install-modal-box {
  background: white;
  border-radius: 20px 20px 16px 16px;
  padding: 24px 22px 28px;
  width: 100%; max-width: 440px;
  position: relative;
  box-shadow: 0 -4px 30px rgba(0,0,0,.2);
}
.install-modal-close {
  position: absolute; top: 14px; right: 16px;
  background: var(--bg); border: none;
  border-radius: 50%; width: 28px; height: 28px;
  font-size: 14px; cursor: pointer; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
}
.install-modal-icon { font-size: 32px; margin-bottom: 8px; }
.install-modal-box h3 { margin: 0 0 8px; font-size: 18px; }
.install-modal-box p { margin: 0; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.install-steps {
  margin: 10px 0 0; padding-left: 20px;
  font-size: 14px; color: var(--text-secondary); line-height: 1.9;
}
.install-steps strong { color: var(--text); }
.share-icon-ios {
  display: inline-block;
  background: #007AFF; color: white;
  border-radius: 6px; padding: 1px 6px;
  font-size: 13px; vertical-align: middle;
  font-style: normal;
}
.install-modal-btn {
  margin-top: 16px; width: 100%;
  background: var(--red); color: white;
  border: none; border-radius: 12px;
  padding: 13px; font-size: 15px; font-weight: 700;
  cursor: pointer;
}

/* ─── FOOTER SPONSORS ────────────────────────────────────────────────────── */
.sponsor-footer {
  background: white; padding: 16px;
  border-radius: var(--radius); margin-top: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.sponsor-footer--current { margin-top: 18px; }
.sponsor-footer-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; text-align: center; margin-bottom: 10px; font-weight: 600; letter-spacing: 0.5px; }
.sponsor-footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sponsor-footer-slot { height: 58px; background: transparent; border-radius: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text-secondary); font-weight: 600; }
.sponsor-footer-slot img { max-width: 100%; height: 100%; object-fit: contain; padding: 0; }
.app-install-footer { text-align: center; margin-top: 12px; }
.app-install-link {
  background: none; border: none;
  font-size: 12px; color: var(--text-secondary);
  cursor: pointer; padding: 4px 8px;
  text-decoration: underline; text-underline-offset: 3px;
  opacity: 0.7;
}

/* ─── LOADING / ERROR ────────────────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
}
.loading-overlay.hidden { display: none; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.error-banner { background: #fee2e2; color: #991b1b; padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 10px; }
.error-banner.hidden { display: none; }

.empty-state { color: var(--text-secondary); font-size: 14px; padding: 20px 0; text-align: center; }

/* ─── FOTOALBUM ──────────────────────────────────────────────────────────── */
.albums-section { margin-bottom: 8px; }
.instagram-section { margin-bottom: 12px; }
.instagram-copy { margin: -4px 0 10px; color: var(--text-secondary); font-size: 13px; line-height: 1.4; }
.album-btn {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 11px 14px; margin-bottom: 6px;
  font-size: 14px; font-weight: 500; color: var(--text);
  text-decoration: none;
}

.penalty-note { font-size: 11px; color: var(--text-secondary); font-weight: 400; }

/* ─── PUBLIKENS FAVORIT ──────────────────────────────────────────────────── */
.action-btn--vote { margin-top: 10px; }
.vote-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; font-size: 14px;
}
.vote-medal { font-size: 18px; width: 28px; text-align: center; }
.vote-name  { flex: 0 0 auto; min-width: 100px; font-weight: 500; }
.vote-bar-bg {
  flex: 1; height: 16px; background: var(--border);
  border-radius: 8px; overflow: hidden;
}
.vote-bar {
  height: 100%; background: var(--red); border-radius: 8px;
  transition: width 0.4s ease;
}
.vote-pct   { font-size: 13px; color: var(--text-secondary); width: 36px; text-align: right; }
.vote-total { font-size: 12px; color: var(--text-secondary); text-align: center; margin-top: 8px; }

/* Rösta-modal */
.vote-player-list {
  max-height: 60vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.vote-player-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 15px;
  cursor: pointer; text-align: left;
}
.vote-player-btn:active { background: var(--border); }
.vote-player-btn .jersey { font-weight: 600; color: var(--red); min-width: 36px; }

/* ─── GENERELL MODAL ─────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 400; padding: 20px;
}
.modal.hidden { display: none; }
.modal-content {
  background: var(--bg); border-radius: 12px;
  width: 100%; max-width: 400px; padding: 20px;
  max-height: 80vh; overflow-y: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.modal-header h3 { margin: 0; font-size: 17px; }
.modal-close {
  background: none; border: none; font-size: 24px;
  cursor: pointer; color: var(--text-secondary); padding: 0 4px;
}

/* ─── LAGLOGGOR ──────────────────────────────────────────────────────────── */
.team-logo-wrap {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px;
}
.team-logo { width: 44px; height: 44px; object-fit: contain; }
.team-logo--kungälvs-hk { transform: scale(1.25); }
.team-abbr-fallback {
  width: 44px; height: 44px;
  background: var(--bg); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: var(--red);
}

/* ─── MATCHHÄNDELSER TIDSLINJE ───────────────────────────────────────────── */
.tl-wrapper { font-size: 13px; }
.tl-row {
  display: grid;
  grid-template-columns: 1fr 52px 1fr;
  align-items: center;
  gap: 4px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.tl-row:last-child { border-bottom: none; }
.tl-home { text-align: right; padding-right: 4px; }
.tl-away { text-align: left;  padding-left: 4px; }
.tl-center { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tl-icon { text-align: center; font-size: 14px; line-height: 1; }
.tl-time {
  text-align: center; font-size: 10px;
  color: var(--text-secondary); font-weight: 600;
  line-height: 1.2;
}
.tl-score { display: block; font-size: 12px; font-weight: 700; color: var(--red); }
.tl-player { line-height: 1.3; }
.tl-player--type { color: var(--text-secondary); font-size: 11px; }
.tl-number { font-weight: 700; color: var(--red); margin-right: 3px; }
.tl-assist { font-size: 11px; color: var(--text-secondary); }
.tl-separator {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 0; margin: 4px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}
.tl-separator-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-secondary);
  padding: 0 8px;
}
.tl-separator--fulltime .tl-separator-label { color: var(--red); }
