/* FrameMind Live — pas bezicich zapasu + ziva tabulka.
   Vsechny barvy jdou pres promenne hostitelskeho webu, fallback je tmavy.
   Modul zamerne nedefinuje zadne :root promenne — prebira design webu. */

.fml-strip {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, .12));
  border-radius: var(--r, 14px);
  background: var(--glass-strong, linear-gradient(145deg, rgba(31, 43, 59, .68), rgba(8, 12, 18, .46)));
  box-shadow: var(--glass-shadow, 0 18px 46px rgba(0, 0, 0, .23));
}
.fml-strip[hidden] { display: none; }

.fml-strip-head {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--nar, sans-serif);
  text-transform: uppercase; letter-spacing: .1em; font-size: 12px;
  color: var(--ink-2, #a9b7c6);
  margin-bottom: 12px;
}
.fml-strip-head b { color: var(--bad, #f87171); }
.fml-strip-head small { color: var(--ink-3, #66758a); margin-left: auto; letter-spacing: .06em; }

/* tep bezicich zapasu — jediná animace v modulu, klidná a pomalá */
.fml-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bad, #f87171);
  box-shadow: 0 0 0 0 rgba(248, 113, 113, .55);
  display: inline-block; flex: none;
  animation: fml-pulse 2.4s ease-out infinite;
}
@keyframes fml-pulse {
  0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, .5); }
  70% { box-shadow: 0 0 0 9px rgba(248, 113, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .fml-dot { animation: none; }
}

.fml-strip-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.fml-live-match {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line, #1f2c3d);
  border-radius: calc(var(--r, 14px) - 4px);
  background: var(--panel, #111823);
}
.fml-lm-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: 14px; }
.fml-lm-team.away { justify-content: flex-end; text-align: right; }
.fml-lm-team img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.fml-lm-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fml-lm-score { text-align: center; line-height: 1.1; }
.fml-lm-score b { font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.fml-lm-score i { font-style: normal; color: var(--ink-3, #66758a); margin: 0 2px; }
.fml-lm-score small {
  display: block; margin-top: 2px;
  font-family: var(--nar, sans-serif); font-size: 11px; letter-spacing: .08em;
  color: var(--bad, #f87171);
}

/* ---------- ziva tabulka ---------- */
.fml-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fml-table th {
  font-family: var(--nar, sans-serif); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-3, #66758a);
  text-align: left; padding: 0 8px 10px; white-space: nowrap;
}
.fml-table th.fml-num { text-align: right; }
.fml-table td {
  padding: 9px 8px;
  border-top: 1px solid var(--line, #1f2c3d);
  vertical-align: middle;
}
.fml-table tbody tr { transition: background .25s ease; }
.fml-table tbody tr:hover { background: var(--glass-inset, rgba(255, 255, 255, .045)); }

.fml-pos {
  font-family: var(--nar, sans-serif); font-weight: 700;
  color: var(--ink-3, #66758a); width: 34px;
}
.fml-club { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.fml-club img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.fml-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2, #a9b7c6); white-space: nowrap; }
.fml-pts { font-weight: 800; color: var(--ink, #eef3f8); }
.fml-gd { color: var(--ink-3, #66758a); }

.fml-live-tag { display: inline-flex; align-items: center; margin-left: 2px; }
.fml-playing { background: rgba(248, 113, 113, .07); }
.fml-playing .fml-pts { color: var(--bad, #f87171); }

/* forma — posledních pet dohranych zapasu, nejnovejsi vpravo */
.fml-form { white-space: nowrap; }
.fml-f {
  display: inline-block; width: 17px; height: 17px; margin-right: 3px;
  border-radius: 4px;
  font-family: var(--nar, sans-serif); font-style: normal; font-size: 10px; font-weight: 700;
  line-height: 17px; text-align: center; color: #08111c;
}
.fml-f-w { background: var(--ok, #34d399); }
.fml-f-d { background: var(--mid, #fbbf24); }
.fml-f-l { background: var(--bad, #f87171); }

.fml-delta .up { color: var(--ok, #34d399); }
.fml-delta .down { color: var(--bad, #f87171); }
.fml-delta .same { color: var(--ink-3, #66758a); }

.fml-empty { padding: 22px 8px; color: var(--ink-2, #a9b7c6); text-align: center; }

/* zony soutezi — vyznam si pojmenuje kazdy web sam v legende,
   modul dodava jen tri neutralni akcenty na levem okraji radku */
.fml-zone-a td:first-child { box-shadow: inset 3px 0 0 var(--ok, #34d399); }
.fml-zone-b td:first-child { box-shadow: inset 3px 0 0 var(--fm-blue, #2563eb); }
.fml-zone-c td:first-child { box-shadow: inset 3px 0 0 var(--mid, #fbbf24); }
.fml-zone-d td:first-child { box-shadow: inset 3px 0 0 var(--bad, #f87171); }

.fml-legend {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px;
  font-family: var(--nar, sans-serif); font-size: 12px; color: var(--ink-3, #66758a);
}
.fml-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.fml-legend .z-a { background: var(--ok, #34d399); }
.fml-legend .z-b { background: var(--fm-blue, #2563eb); }
.fml-legend .z-c { background: var(--mid, #fbbf24); }
.fml-legend .z-d { background: var(--bad, #f87171); }

/* presun v poradi po gólu */
.fml-moved-up td { background: rgba(52, 211, 153, .1); }
.fml-moved-down td { background: rgba(248, 113, 113, .09); }
.fml-moved-up td, .fml-moved-down td { transition: background 1.2s ease; }

@media (max-width: 720px) {
  .fml-table { font-size: 13px; }
  .fml-table th, .fml-table td { padding-left: 5px; padding-right: 5px; }
  /* na uzkem displeji ustoupi vyhry/remizy/prohry — skore a body zustavaji */
  .fml-table th:nth-child(4), .fml-table td:nth-child(4),
  .fml-table th:nth-child(5), .fml-table td:nth-child(5),
  .fml-table th:nth-child(6), .fml-table td:nth-child(6),
  .fml-form-h, .fml-form { display: none; }
  .fml-lm-team span { font-size: 13px; }
}
