/**
 * Market prediction pages — mobile accessibility & truncation fixes.
 * Scoped to layout-wide (corners, over-goals, cards, btts, wins).
 */

body.layout-wide {
  --market-filter-control-height: var(--touch-min, 44px);
  --market-filter-control-height-compact: 36px;
  --og-gauge-track: rgba(255, 255, 255, 0.12);
  --og-gauge-high: #5cb488;
  --og-gauge-medium: #d3a85a;
  --og-gauge-low: #c97a7a;
  --og-zero: rgba(160, 167, 179, 0.9);
  /* FotMob-style: true black canvas, slightly lifted cards */
  --match-dark-bg: #000000;
  --match-card-bg: #1a1a1a;
  --match-border: #2a2a2a;
  --card-bg: var(--match-card-bg);
  --background-primary: var(--match-card-bg);
  --background-secondary: var(--match-dark-bg);
  background-color: var(--match-dark-bg) !important;
}

[data-theme="light"] body.layout-wide {
  --og-gauge-track: rgba(15, 23, 42, 0.14);
  --og-zero: rgba(100, 116, 139, 0.9);
  --match-dark-bg: #f0f0f0;
  --match-card-bg: #ffffff;
  --match-border: #e2e8f0;
  background-color: var(--match-dark-bg) !important;
}

body.layout-wide .card,
body.layout-wide .match-card,
body.layout-wide .mobile-card {
  background-color: var(--match-card-bg) !important;
  border-color: var(--match-border) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="light"] body.layout-wide .card,
[data-theme="light"] body.layout-wide .match-card,
[data-theme="light"] body.layout-wide .mobile-card {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

body.layout-wide .enhanced-table thead th {
  background-color: var(--match-card-bg);
}

body.layout-wide .filter-select,
body.layout-wide .mobile-day-dropdown {
  background-color: var(--match-card-bg);
  border-color: var(--match-border);
}

/* Probability gauge (shared — prevents black SVG circles when page CSS omits rules) */
body.layout-wide .probability-widget {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

body.layout-wide .probability-gauge {
  width: 42px;
  height: 42px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.layout-wide .probability-gauge svg {
  width: 42px;
  height: 42px;
  transform: rotate(-90deg);
}

body.layout-wide .probability-gauge .gauge-track,
body.layout-wide .probability-gauge .gauge-progress {
  fill: none;
}

body.layout-wide .probability-gauge .gauge-track {
  stroke: var(--og-gauge-track);
  stroke-width: 3;
}

body.layout-wide .probability-gauge .gauge-progress {
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 100.53;
  animation: marketGaugeFill 0.75s ease forwards;
}

body.layout-wide .probability-gauge.high .gauge-progress {
  stroke: var(--og-gauge-high);
}

body.layout-wide .probability-gauge.medium .gauge-progress {
  stroke: var(--og-gauge-medium);
}

body.layout-wide .probability-gauge.low .gauge-progress {
  stroke: var(--og-gauge-low);
}

body.layout-wide .probability-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary, #fff);
  pointer-events: none;
}

@keyframes marketGaugeFill {
  to {
    stroke-dashoffset: var(--gauge-offset, 100.53);
  }
}

/* ── Header controls (mobile / tablet) ───────────────────────────── */
/* Canonical header icon sizing: responsive-typography.css @ ≤1023px (--touch-min).
   layout-wide gap tweak only below. */
@media (max-width: 1023px) {
  body.layout-wide .header-controls {
    gap: 8px;
  }
}

/* ── Filter bar: touch targets & sort truncation ─────────────────── */
@media (max-width: 768px) {
  body.layout-wide .filter-select,
  body.layout-wide .mobile-day-dropdown,
  body.layout-wide .filter-container input.filter-select {
    height: var(--market-filter-control-height);
    min-height: var(--market-filter-control-height);
    padding: 0 2rem 0 0.75rem;
    font-size: 12px;
    line-height: 1.25;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 10px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.layout-wide .filter-row--middle .filter-select.filter-item-sort {
    flex: 1 1 46%;
    min-width: 8.75rem;
    max-width: 100%;
    padding-right: 2.25rem;
  }

  body.layout-wide .filter-row--middle .search-wrapper {
    flex: 1 1 54%;
    min-width: 0;
  }

  body.layout-wide .mobile-more-filters-btn {
    flex: 1 1 100%;
    min-height: var(--market-filter-control-height) !important;
    height: auto !important;
    padding: 10px 12px !important;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.2;
    border-radius: 6px;
    border: 1px solid var(--match-border, rgba(255, 255, 255, 0.12));
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  body.layout-wide .mobile-more-filters-btn:focus-visible {
    outline: 2px solid var(--match-green, #4a7c59);
    outline-offset: 2px;
  }

  body.layout-wide .mobile-more-filters-panel .high-conf-toggle {
    min-height: var(--market-filter-control-height) !important;
    height: auto !important;
    padding: 10px 12px !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  body.layout-wide .mobile-more-filters-panel .high-conf-toggle .toggle-icon {
    flex-shrink: 0;
    min-width: 44px;
    min-height: 26px;
  }

  body.layout-wide .filter-tab,
  body.layout-wide .filter-pills .filter-tab {
    min-height: var(--market-filter-control-height) !important;
    height: auto;
    padding: 10px 14px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.layout-wide .filter-row--bottom .high-conf-toggle {
    min-height: var(--market-filter-control-height);
    padding: 10px 14px;
  }
}

/* Compact filter bar on mobile + tablet (fixtures should lead) */
@media (max-width: 1133px) {
  body.layout-wide {
    --market-filter-control-height: var(--market-filter-control-height-compact, 36px);
  }

  body.layout-wide .sticky-filter-card {
    padding: 8px 10px !important;
    margin-bottom: 8px !important;
  }

  body.layout-wide .sticky-filter-card .filter-bar {
    gap: 6px !important;
  }

  body.layout-wide .filter-row {
    gap: 6px !important;
    margin-bottom: 0 !important;
  }

  body.layout-wide .filter-select,
  body.layout-wide .mobile-day-dropdown,
  body.layout-wide .filter-container input.filter-select {
    height: var(--market-filter-control-height-compact, 36px);
    min-height: var(--market-filter-control-height-compact, 36px);
    padding: 0 1.75rem 0 0.6rem;
    font-size: 11px;
  }

  body.layout-wide .mobile-more-filters-btn {
    min-height: 34px !important;
    padding: 6px 10px !important;
    margin-top: 2px !important;
    font-size: 10px !important;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-color: rgba(255, 255, 255, 0.08);
    background: transparent;
  }

  body.layout-wide .mobile-more-filters-panel {
    padding: 4px 0 0 !important;
    gap: 6px !important;
  }

  body.layout-wide .mobile-more-filters-panel .high-conf-toggle {
    min-height: 34px !important;
    padding: 6px 10px !important;
    font-size: 11px;
  }

  body.layout-wide .mobile-more-filters-panel .high-conf-toggle .toggle-icon {
    min-width: 36px;
    min-height: 22px;
  }

  body.layout-wide .filter-tab,
  body.layout-wide .filter-pills .filter-tab {
    min-height: 34px !important;
    padding: 6px 10px !important;
    font-size: 11px;
  }

  body.layout-wide .filter-row--bottom .high-conf-toggle {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 11px;
  }

  body.layout-wide .load-more-btn {
    min-height: 36px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
  }
}

/* ── Mobile + tablet match cards ───────────────────────────────────
   Phone/tablet widths OR touch / coarse pointer (large iPad landscape
   can exceed 1133px but still uses .mobile-only prediction cards).
   Expand hit targets previously lived only under ≤768. */
@media (max-width: 1133px), (hover: none), (pointer: coarse) {
  body.layout-wide .mobile-card .team-link {
    min-height: 36px;
    padding: 4px 4px 4px 0;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }

  body.layout-wide .mobile-card-team-row {
    min-height: 0;
    align-items: center;
    padding: 2px 0;
  }

  body.layout-wide .mobile-metric-chip {
    min-height: 0;
    padding: 4px 8px;
    align-items: center;
  }

  body.layout-wide .mobile-metric-chip.wide {
    min-height: 0;
    padding: 6px 8px;
  }

  body.layout-wide .confidence-badge {
    min-height: 28px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
  }

  /* Expand / collapse chevron hit area (FORM & H2H) */
  body.layout-wide .mobile-card-expand-hit,
  body.layout-wide .mobile-card > .mobile-card-expand-hit,
  body.layout-wide .mobile-card-form-toggle {
    min-height: var(--touch-min, 44px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 8px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
    position: relative;
    z-index: 2;
  }

  body.layout-wide .mobile-card-expand-hit .mobile-card-toggle-chevron,
  body.layout-wide .mobile-card-expand-hit .expand-icon,
  body.layout-wide .mobile-card-form-toggle .mobile-card-toggle-chevron {
    font-size: 14px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
  }

  /* Legacy chevron wrappers without class */
  body.layout-wide .mobile-card > div[style*="text-align: center"] {
    min-height: var(--touch-min, 44px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
  }

  body.layout-wide .mobile-card-toggle {
    min-height: var(--touch-min, 44px);
    padding: 10px 0;
  }

  body.layout-wide .mobile-card-toggle-row {
    gap: 0;
  }

  /* Prevent horizontal overflow in filter container */
  body.layout-wide .filter-container,
  body.layout-wide .filter-row {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.layout-wide .mobile-card-list {
    overflow-x: hidden;
    align-items: start;
  }

  body.layout-wide .probability-label,
  body.layout-wide .mobile-metric-label,
  body.layout-wide .mobile-metric-value {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /*
   * FORM & H2H open/close — beat motion-system.css max-height:0 + display:block !important
   * so tablet (and phone) reliably show/hide panel content inside the card.
   */
  body.layout-wide .mobile-card .mobile-card-details,
  body.layout-wide .mobile-card .mobile-card-details--panel,
  body.layout-wide .mobile-card .accordion-content {
    display: none !important;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    pointer-events: auto;
  }

  body.layout-wide .mobile-card.open .mobile-card-details,
  body.layout-wide .mobile-card.open .mobile-card-details--panel,
  body.layout-wide .mobile-card.open .accordion-content {
    display: block !important;
  }
}

/* Touch tablets wider than 1133px: keep prediction cards (not desktop table). */
@media (hover: none), (pointer: coarse) {
  body.layout-wide .desktop-only {
    display: none !important;
  }

  body.layout-wide .mobile-only {
    display: block !important;
  }
}

/* Tablet: maintain comfortable filter taps */
@media (min-width: 769px) and (max-width: 1024px) {
  body.layout-wide .filter-tab {
    min-height: var(--touch-compact, 36px);
    padding: 8px 12px;
  }

  body.layout-wide .filter-row--bottom .high-conf-toggle {
    min-height: var(--touch-compact, 36px);
    padding: 8px 12px;
  }
}

/* ── Mobile match cards: unified expand/collapse ───────────────────── */
body.layout-wide .mobile-card {
  cursor: pointer;
}

body.layout-wide .mobile-card-expand-hit:not(.mobile-card-form-toggle) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min, 44px);
  margin-top: 4px;
  padding: 8px 0;
  color: var(--match-text-muted, #888);
  -webkit-tap-highlight-color: transparent;
}

body.layout-wide .mobile-card-toggle-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}

body.layout-wide .mobile-card.open .mobile-card-toggle-chevron,
body.layout-wide .mobile-card.open .expand-icon.mobile-card-toggle-chevron {
  transform: rotate(180deg);
}

body.layout-wide .mobile-card-details--panel,
body.layout-wide .mobile-card .accordion-content,
body.layout-wide .mobile-card > .mobile-card-details:not(.mobile-card-details--panel) {
  /* Open/close display is controlled in the mobile+tablet media query above
     so it reliably beats motion-system max-height collapse. */
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--match-border, #333);
}

/* ── Market pick highlights (BTTS H2H %, Wins 1X2) — text only ───── */
body.layout-wide .btts-h2h-summary.market-pick-text {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-muted, #888);
}

body.layout-wide .market-pick-text.market-pick--high {
  color: var(--confidence-high, #22c55e);
  font-weight: 700;
}

body.layout-wide .market-pick-text.market-pick--mid {
  color: var(--text-secondary, #b0b8c4);
  font-weight: 600;
}

body.layout-wide .market-pick-text.market-pick--low {
  color: #e8a088;
  font-weight: 600;
}

body.layout-wide .one-x-two-stack {
  display: flex;
  justify-content: center;
  width: 100%;
}

body.layout-wide .one-x-two-metrics-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 6px 4px 4px;
  box-sizing: border-box;
}

body.layout-wide .one-x-two-pending-note {
  font-size: 9px;
  color: var(--text-muted, #888);
  margin-top: 4px;
  text-align: center;
}

/* 1X2 row (Wins): dots + bar + % text colors */
body.layout-wide .market-badge-strip--1x2 .market-badge-score-under--home {
  color: #c4b5fd;
}

body.layout-wide .market-badge-strip--1x2 .market-badge-score-under--away {
  color: #fdba74;
}

body.layout-wide .market-badge-strip--1x2 .market-badge-score-under--draw {
  color: var(--text-muted, #888);
}

body.layout-wide .market-badge-col.is-pick .market-badge-score-under {
  font-weight: 700;
}

body.layout-wide .market-badge-col--draw.is-pick.market-pick--high .market-badge-score-under--draw {
  color: var(--confidence-high, #22c55e);
}

body.layout-wide .market-badge-col--home.is-pick.market-pick--high .market-badge-score-under--home {
  color: #e9d5ff;
}

body.layout-wide .market-badge-col--away.is-pick.market-pick--high .market-badge-score-under--away {
  color: #fed7aa;
}

body.layout-wide .market-badge-col.is-pick.market-pick--mid .market-badge-score-under {
  color: var(--text-secondary, #b8c0cc);
  font-weight: 600;
}

body.layout-wide .market-badge-col--home.is-pick.market-pick--mid .market-badge-score-under--home {
  color: #ddd6fe;
}

body.layout-wide .market-badge-col--away.is-pick.market-pick--mid .market-badge-score-under--away {
  color: #fcd34d;
}

[data-theme="light"] body.layout-wide .market-pick-text.market-pick--high {
  color: #15803d;
}

[data-theme="light"] body.layout-wide .market-badge-strip--1x2 .market-badge-score-under--home {
  color: #6d28d9;
}

[data-theme="light"] body.layout-wide .market-badge-strip--1x2 .market-badge-score-under--away {
  color: #c2410c;
}

[data-theme="light"] body.layout-wide .market-badge-col--draw.is-pick.market-pick--high .market-badge-score-under--draw {
  color: #15803d;
}

[data-theme="light"] body.layout-wide .market-badge-col--home.is-pick.market-pick--high .market-badge-score-under--home {
  color: #5b21b6;
}

[data-theme="light"] body.layout-wide .market-badge-col--away.is-pick.market-pick--high .market-badge-score-under--away {
  color: #9a3412;
}

[data-theme="light"] body.layout-wide .market-pick-text.market-pick--low {
  color: #c2410c;
}

/* Touch / coarse pointer: never leave sticky green hover on prediction rows. */
@media (hover: none), (pointer: coarse) {
  body.layout-wide .enhanced-table tbody tr:hover,
  body.layout-wide table tbody tr:hover {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }

  body.layout-wide .win-1x2-module:hover {
    background: rgba(255, 255, 255, 0.012) !important;
    box-shadow: none !important;
  }

  body.layout-wide .mobile-card:hover,
  body.layout-wide .match-row.mobile-card:hover {
    background: var(--match-card-bg, #1a1a1a) !important;
    box-shadow: none !important;
    transform: none !important;
  }

  [data-theme="light"] body.layout-wide .win-1x2-module:hover {
    background: #fff !important;
  }

  [data-theme="light"] body.layout-wide .mobile-card:hover,
  [data-theme="light"] body.layout-wide .match-row.mobile-card:hover {
    background: #ffffff !important;
  }
}

/* Bottom nav: see app-surfaces-theme.css (global) */

@media (max-width: 1133px) {
  /* Opaque filter surface — no frosted blur (rows were visible through it on tablet). */
  body.layout-wide .sticky-filter-card,
  body.layout-wide .btts-filter-card,
  body.layout-wide .market-filters-wrap {
    background: var(--match-dark-bg) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.layout-wide .sticky-filter-card,
  body.layout-wide .btts-filter-card {
    position: relative;
    top: auto;
  }

  body.layout-wide #load-more-container {
    margin-bottom: 8px;
  }

  body.layout-wide .mobile-card-list {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
}

/* ── Mobile card layout — fixtures first, stats secondary ────────── */
body.layout-wide .mobile-card {
  padding: 10px 12px !important;
}

body.layout-wide .mobile-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

/* Redesigned cards: meta + teams stack vertically (not side-by-side) */
body.layout-wide .mobile-card-top.mobile-card-top--stack {
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 0;
}

body.layout-wide .mobile-card-teams {
  flex: 1;
  min-width: 0;
}

body.layout-wide .mobile-card-team-row {
  font-size: 14px;
  line-height: 1.35;
}

body.layout-wide .mobile-card-team-row span {
  font-weight: 500;
  color: var(--text-primary, #f0f0f0);
}

body.layout-wide .mobile-card-team-row img {
  width: 18px !important;
  height: 18px !important;
}

body.layout-wide .mobile-card-league {
  flex-shrink: 0;
}

body.layout-wide .mobile-card-league img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.85;
}

body.layout-wide .mobile-card-league span {
  font-size: 10px;
  color: var(--match-text-muted, #888);
  text-transform: uppercase;
}

body.layout-wide .mobile-card-vs-row {
  font-size: 11px;
  color: var(--match-text-muted, #888);
  margin: 2px 0 2px 26px;
  display: flex;
  align-items: center;
  gap: 6px;
}

body.layout-wide .mobile-card-time {
  color: var(--text-secondary, #b0b8c4);
}

body.layout-wide .mobile-card-hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: none;
  position: relative;
  overflow: visible;
}

body.layout-wide .mobile-card-hero--badge-only {
  margin-bottom: 4px;
  min-height: 0;
}

body.layout-wide .mobile-card-hero__gauge {
  flex-shrink: 0;
}

body.layout-wide .mobile-card-hero__gauge .probability-gauge {
  width: 40px;
  height: 40px;
}

body.layout-wide .mobile-card-hero__gauge .probability-gauge svg {
  width: 40px;
  height: 40px;
}

body.layout-wide .mobile-card-hero__gauge .probability-label {
  font-size: 10px;
}

body.layout-wide .mobile-card-hero__badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

body.layout-wide .mobile-card-hero__badge .confidence-badge {
  font-size: 9px;
  padding: 3px 8px;
}

body.layout-wide .mobile-card-hero__ratio {
  font-size: 9px;
  color: var(--text-muted, #888);
}

body.layout-wide .mobile-card-metrics--triple {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 4px;
  margin-top: 2px;
  padding: 0;
  clear: both;
}

body.layout-wide .mobile-card-metrics--triple .mobile-metric-chip {
  flex: 0 1 auto;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  text-align: left;
  padding: 0 !important;
  min-height: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
  gap: 4px;
  white-space: nowrap;
}

body.layout-wide .mobile-card-metrics--triple .mobile-metric-chip:not(:last-child) {
  padding-right: 12px !important;
  margin-right: 0;
  border-right: 1px solid rgba(128, 128, 128, 0.25) !important;
}

body.layout-wide .mobile-card-metrics--triple .mobile-metric-label {
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted, #888);
  font-weight: 500;
}

body.layout-wide .mobile-card-metrics--triple .mobile-metric-value {
  font-size: 11px;
  font-weight: 600;
}

body.layout-wide .mobile-metric-value.stat-high {
  color: var(--confidence-high, #22c55e);
}

body.layout-wide .mobile-metric-value.stat-warn {
  color: #eab308;
}

body.layout-wide .mobile-card-form-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  margin-top: 6px;
  padding: 6px 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--text-muted, #888);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body.layout-wide .mobile-card-form-toggle__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.layout-wide .mobile-card-form-toggle .mobile-card-toggle-chevron {
  font-size: 10px;
  min-width: 20px;
  min-height: 20px;
}

body.layout-wide .mobile-card.open .mobile-card-form-toggle {
  color: var(--text-secondary, #b0b8c4);
  border-top-color: rgba(34, 197, 94, 0.2);
}

@media (prefers-reduced-motion: no-preference) {
  body.layout-wide .mobile-card-details--panel {
    transition: opacity 0.2s ease, margin 0.2s ease;
  }

  body.layout-wide .mobile-card-toggle-chevron {
    transition: transform 0.2s ease;
  }
}

body.layout-wide .mobile-card-section-title {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted, #888);
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: none;
  letter-spacing: 0.04em;
  font-weight: 600;
}

body.layout-wide .mobile-card-details--panel {
  margin-top: 6px;
  padding-top: 8px;
  border-top-color: rgba(255, 255, 255, 0.06) !important;
}

body.layout-wide .mobile-vendor-consensus {
  font-size: 9px;
  font-weight: 600;
  color: var(--primary-green, #629670);
  text-align: left;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.layout-wide .mobile-list-header {
  font-size: 10px !important;
  margin-bottom: 6px !important;
  opacity: 0.85;
}

@media (max-width: 1133px) {
  body.layout-wide .mobile-card-expand-hit,
  body.layout-wide .mobile-card-form-toggle {
    min-height: 36px;
  }

  body.layout-wide .mobile-card-expand-hit .mobile-card-toggle-chevron {
    min-width: 24px;
    min-height: 24px;
    font-size: 10px;
  }

  /* Confidence-tier pill (STRONG/LIKELY/LEAN etc.) — hide on mobile/tablet where desktop Confidence column is absent. */
  .mobile-card .mobile-card-hero__badge {
    display: none !important;
  }
}
