/* v293: keep the start-page geometry in LIVE.
   Only the Förutsättningar slot is replaced; no page, match, tile or footer redesign. */
#workspaceLivePanel[hidden] { display:none !important; }
body.workspace-live #workspace .tile-editors { display:none !important; }

#workspace > .workspace-right > .workspace-live-panel {
  width:100%;
  min-width:0;
  min-height:0;
  margin:0 !important;
  padding:13px 14px !important;
  box-sizing:border-box;
}
#workspaceLivePanel > .section-title { flex-wrap:wrap; margin-bottom:7px; }
.workspace-live-panel-actions {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-left:auto;
}
#workspaceLivePanel .workspace-live-panel-actions .button {
  font-size:12px;
  min-height:30px;
  padding:5px 9px;
}
#workspaceLivePanel .workspace-live-panel-actions .button:last-child { border-color:var(--accent); color:var(--accent); }
.workspace-live-panel-body { min-width:0; }
#workspaceLivePanel .quick-view,
#workspaceLivePanel .latest-goals-side {
  position:static !important;
  inset:auto !important;
  display:block !important;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  height:auto !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  transform:none !important;
  background:none !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  box-sizing:border-box;
}
#workspaceLivePanel .quick-view-head,
#workspaceLivePanel .side-collapse-button { display:none !important; }
#workspaceLivePanel #quickViewMetrics { display:block !important; }
.live-compact-standing {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:4px 10px;
  font-size:12px;
}
.live-compact-standing strong { color:var(--accent); }
.live-compact-standing.out strong { color:var(--danger); }
.live-compact-standing > span { color:var(--muted); }
.live-compact-metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:7px 0;
}
.live-compact-metrics > div { min-width:0; }
.live-compact-metrics span { display:block; color:var(--muted); font-size:12px; line-height:1.3; }
.live-compact-metrics strong {
  display:block;
  margin-top:3px;
  font:500 17px/1.2 'DM Mono',monospace;
  overflow-wrap:anywhere;
}
.live-compact-progress { height:3px; overflow:hidden; border-radius:3px; background:var(--line); }
.live-compact-progress > span { display:block; height:100%; background:var(--accent); }
.live-compact-footnote { display:none; }
#workspaceLivePanel .latest-goals-side { margin-top:8px !important; }
#workspaceLivePanel .latest-goals-head {
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 5px !important;
  padding:0 !important;
  border:0;
}
#workspaceLivePanel .latest-goals-head .live-kicker { display:none; }
#workspaceLivePanel .latest-goals-head strong { font-size:13px; }
#workspaceLivePanel .latest-goals-actions { margin-left:auto; }
#workspaceLivePanel .latest-goal-count { font-size:12px; }
#workspaceLivePanel .event-sound-toggle { width:28px; height:28px; min-width:28px; }
#workspaceLivePanel .latest-goals-list { max-height:112px; min-height:0; overflow-y:auto; }
#workspaceLivePanel .latest-goals-empty { min-height:30px; padding:5px 0; font-size:12px; }
#workspaceLivePanel .latest-goal-item { margin:0 0 4px; padding:6px 8px; gap:8px; border-radius:7px; }
#workspaceLivePanel .latest-goal-icon { width:24px; height:24px; min-width:24px; font-size:14px; }
#workspaceLivePanel .latest-goal-top { flex-wrap:wrap; gap:4px 7px; }
#workspaceLivePanel .latest-goal-top strong { font-size:13px; }
#workspaceLivePanel .latest-goal-match,
#workspaceLivePanel .latest-goal-score,
#workspaceLivePanel .latest-goal-bottom { font-size:12px; }
#workspaceLivePanel .latest-goal-bottom { flex-wrap:wrap; gap:3px 8px; }
.workspace-live-panel-footer { display:flex; align-items:center; flex-wrap:wrap; gap:5px 10px; margin-top:7px; }
.workspace-live-connection { flex:1; margin:0; font-size:12px; line-height:1.3; color:var(--muted); }
.workspace-live-connection.has-error { color:var(--danger); }
#workspaceLivePanel .workspace-live-panel-footer .button { font-size:12px; min-height:26px; padding:3px 8px; }

/* Extra connection information and original settings remain available in dialogs. */
.workspace-live-connection-details { margin-top:8px; }
.workspace-live-connection-details > summary { cursor:pointer; font-size:13px; color:var(--muted); }
.workspace-live-connection-details .live-status,
.workspace-live-connection-details .live-source-note,
.workspace-live-connection-details .live-share-note { font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
#workspaceConditionsDialog .system-panel { display:block !important; }
@media (max-width:1149px) {
  #workspace > .workspace-right > .workspace-live-panel { grid-area:settings; }
}
@media (max-width:480px) {
  .live-compact-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* v295: finish the small layout details without changing the live model. */

/* Keep the label and value in each extra overview metric visually together. */
#workspace .workspace-overview-card .workspace-additional {
  gap:4px 10px !important;
}
#workspace .workspace-overview-card .workspace-additional .workspace-metric {
  justify-content:flex-start !important;
  align-items:baseline !important;
  gap:5px !important;
  flex-wrap:wrap;
  row-gap:2px !important;
}
#workspace .workspace-overview-card .workspace-additional .workspace-metric span {
  min-width:0;
  flex:0 1 auto;
}
#workspace .workspace-overview-card .workspace-additional .workspace-metric strong {
  flex:0 0 auto;
  margin:0 !important;
}

/* Desktop shell and footer sizing are owned by desktop-layout.css (v301). */

/* In LIVE, the date and the current start/status badge share one vertical
   reading order. This prevents the two blocks from crossing each other. */
body.workspace-live #workspace #matches td.match-name {
  display:grid !important;
  grid-template-columns:28px minmax(0,1fr) !important;
  grid-template-rows:auto auto !important;
  align-items:start !important;
  align-content:center;
  column-gap:8px !important;
  row-gap:2px !important;
  padding-left:0 !important;
  padding-right:6px !important;
}
body.workspace-live #workspace #matches .match-meta {
  display:contents !important;
}
body.workspace-live #workspace #matches .match-number {
  grid-column:1 !important;
  grid-row:1 / span 2 !important;
  align-self:start !important;
  justify-self:center;
  margin:2px 0 0 !important;
}
body.workspace-live #workspace #matches .match-kickoff {
  grid-column:2 !important;
  grid-row:1 !important;
  justify-self:center;
  align-self:end;
  margin:0 !important;
  text-align:center !important;
  white-space:nowrap;
}
body.workspace-live #workspace #matches .match-copy {
  grid-column:2 !important;
  grid-row:2 !important;
  width:100%;
  min-width:0 !important;
  min-height:0 !important;
  align-items:center !important;
  justify-content:flex-start !important;
  text-align:center !important;
}
body.workspace-live #workspace #matches .match-name-text {
  width:100%;
  min-width:0;
  text-align:center !important;
  line-height:1.22;
}
body.workspace-live #workspace #matches .match-live-result {
  width:max-content !important;
  max-width:100% !important;
  margin:3px 0 0 !important;
  box-sizing:border-box;
}

@media (max-width:720px) {
  body.workspace-live #workspace #matches td.match-name {
    grid-column:1 / -1 !important;
    grid-template-columns:27px minmax(0,1fr) !important;
    padding:0 0 7px !important;
  }
  body.workspace-live #workspace #matches .match-kickoff {
    justify-self:start;
    text-align:left !important;
    font-size:9px !important;
  }
  body.workspace-live #workspace #matches .match-copy {
    align-items:flex-start !important;
    text-align:left !important;
  }
  body.workspace-live #workspace #matches .match-name-text {
    text-align:left !important;
  }
  body.workspace-live #workspace #matches .match-live-result {
    min-width:0 !important;
    align-self:flex-start;
    margin-left:0 !important;
    margin-right:0 !important;
    padding:5px 8px !important;
  }
}

/* v301: chart and result sizing are owned by desktop-layout.css. */

/* v304: LIVE cards own their internal layout. The two IDs intentionally
   match the original workspace selectors, so old desktop/mobile rules do
   not split the label/value alignment or spread the count across the badge.
   The outer workspace sizing and panel order are unchanged. */
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter {
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) auto !important;
  grid-template-rows:auto auto auto !important;
  align-content:start;
  align-items:start;
  column-gap:8px;
  row-gap:6px;
  height:auto !important;
  min-height:0 !important;
  padding:8px 9px !important;
  overflow:visible !important;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter > label {
  grid-column:1;
  grid-row:1;
  align-self:center;
  min-width:0;
  margin:0 !important;
  padding:0 !important;
  font-size:13px !important;
  line-height:1.3 !important;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-paint-button {
  opacity:1;
  font-size:13px;
  line-height:1.3;
}
/* A real header cell, not an overlay over the MIN/MAX controls. */
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-live-now {
  grid-column:2;
  grid-row:1;
  position:static !important;
  inset:auto !important;
  transform:none !important;
  justify-self:end;
  align-self:center;
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 28px;
  width:28px !important;
  min-width:28px !important;
  max-width:28px !important;
  height:28px !important;
  min-height:28px !important;
  max-height:28px !important;
  margin:0 !important;
  padding:0 !important;
  gap:0 !important;
  border-radius:50% !important;
  box-sizing:border-box;
  text-align:center;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-live-now small {
  display:none !important; /* The badge retains its existing aria-label/title. */
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-live-now strong {
  display:block !important;
  position:static !important;
  transform:none !important;
  flex:0 0 auto;
  width:auto;
  height:auto;
  min-width:0;
  margin:0 !important;
  padding:0 !important;
  font:700 12px/1 'DM Mono', monospace !important;
  letter-spacing:0 !important;
  text-align:center !important;
  white-space:nowrap !important;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter > .range-inputs {
  grid-column:1 / -1;
  grid-row:2;
  min-width:0;
  width:100%;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-impact {
  grid-column:1 / -1;
  grid-row:3;
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) !important;
  gap:4px !important;
  min-width:0;
  min-height:0 !important;
  height:auto !important;
  margin:0 !important;
  padding:6px 0 0 !important;
  overflow:visible !important;
  opacity:1;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-impact .impact-stat-row {
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) minmax(0, 1.6fr) !important;
  align-items:baseline !important;
  justify-content:normal !important;
  gap:8px !important;
  width:100%;
  min-width:0;
  min-height:0 !important;
  margin:0;
  padding:0;
  line-height:1.3 !important;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-impact .impact-stat-row > span:first-child {
  min-width:0;
  color:#b9cce0;
  font:500 12px/1.3 Manrope, sans-serif !important;
  letter-spacing:0;
  white-space:normal !important;
  overflow-wrap:anywhere;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-impact .impact-stat-row > strong {
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-end !important;
  justify-content:flex-start !important;
  gap:2px !important;
  min-width:0;
  max-width:100%;
  margin:0 !important;
  padding:0;
  color:#edf5ff;
  font:500 12px/1.3 'DM Mono', monospace !important;
  text-align:right !important;
  white-space:normal !important;
  overflow-wrap:anywhere;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-impact .impact-relative {
  display:block;
  flex:none;
  margin:0 !important;
  color:#adc1d5;
  font:500 11px/1.3 'DM Mono', monospace !important;
  text-align:right;
  white-space:normal !important;
  overflow-wrap:anywhere;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-impact .impact-stat-row:only-child > span:only-child {
  grid-column:1 / -1;
}
body.live-edit-locked .live-compact-footnote {
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:4px 10px;
  margin-top:6px;
  padding-top:5px;
  border-top:1px solid rgba(142,169,196,.16);
  color:var(--muted);
  font:500 12px/1.35 Manrope,system-ui,sans-serif;
}
body.live-edit-locked .live-compact-footnote > span {
  color:inherit;
  font:inherit;
  white-space:normal;
}

/* v305: compact, readable LIVE filter cards. Each effect metric owns a
   complete cell; labels and values no longer compete on the same baseline. */
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter {
  grid-template-rows:auto auto minmax(0, 1fr) !important;
  row-gap:5px !important;
  padding:8px 9px 7px !important;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter > label {
  padding-right:0 !important;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-live-now {
  width:26px !important;
  min-width:26px !important;
  max-width:26px !important;
  height:26px !important;
  min-height:26px !important;
  max-height:26px !important;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-live-now strong {
  font-size:11px !important;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-impact {
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  gap:5px 12px !important;
  align-content:start;
  padding:5px 0 0 !important;
  border-top:1px solid rgba(142,169,196,.2);
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-impact .impact-stat-row {
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:1px !important;
  min-width:0 !important;
  width:100% !important;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-impact .impact-stat-row > span:first-child {
  color:#9ab0c4 !important;
  font:600 9px/1.1 Manrope,sans-serif !important;
  letter-spacing:.04em !important;
  text-transform:uppercase;
  white-space:nowrap !important;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-impact .impact-stat-row > strong {
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  overflow:visible !important;
  color:#edf5ff !important;
  font:600 11px/1.2 'DM Mono',monospace !important;
  letter-spacing:-.02em;
  text-align:left !important;
  white-space:nowrap !important;
}
body:is(.workspace-live, .shared-live-mode, .live-edit-locked) #workspace #filters .filter-impact .impact-relative {
  display:inline !important;
  margin-left:2px !important;
  color:#a9bfd1 !important;
  font:500 9px/1.2 'DM Mono',monospace !important;
  white-space:nowrap !important;
}

/* v309: expected payout and current row odds share a compact, aligned panel. */
#workspaceLivePanel .live-compact-metrics {
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.live-money {
  margin:8px 0;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(255,255,255,.025);
  min-width:0;
}
.live-money-values {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.live-money-values > div {
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:5px;
}
.live-money-values > div + div {
  padding-left:12px;
  border-left:1px solid var(--line);
}
.live-money-values > div:nth-child(2n+1) {
  padding-left:0;
  border-left:0;
}
.live-money-values span {
  display:block;
  font-size:14px;
  line-height:1.3;
  color:var(--muted);
}
.live-money-values strong {
  display:block;
  font:500 18px/1.25 'DM Mono',monospace;
  overflow-wrap:anywhere;
}

/* v311: visible clarification in own and shared LIVE, also on touch screens. */
.live-money-explanation {
  margin:9px 0 0;
  padding-top:8px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font:500 12px/1.4 Manrope,system-ui,sans-serif;
  white-space:normal;
}

/* v312: a soft green glow for a currently correct played row. */
body .live-perfect {
  color:#47d48e !important;
  font-weight:700;
}
.live-perfect-pulse {
  animation:live-perfect-glow 2.4s ease-in-out infinite;
}
@keyframes live-perfect-glow {
  0%,100% { text-shadow:0 0 0 rgba(71,212,142,0); }
  50% { text-shadow:0 0 9px rgba(71,212,142,.7),0 0 17px rgba(71,212,142,.25); }
}
.live-win {
  border-color:rgba(71,212,142,.5);
  background:rgba(71,212,142,.07);
}
.live-win h3 {
  margin:0 0 10px;
  color:#47d48e;
  font:700 16px/1.3 Manrope,system-ui,sans-serif;
}
@media (prefers-reduced-motion:reduce) {
  .live-perfect-pulse { animation:none; }
}
