/**
 * TST — Widget "Argentinos en Competición" v7.0
 * Mobile: 1 card visible + flechas laterales + dots + "Ver más" expandible
 * Desktop: score strip horizontal + flechas externas
 */

/* ── Tokens ─────────────────────────────────────────────────────── */
#tst-argentinos-hoy-widget {
  --tst-brand-dark:  #1E3A5F;
  --tst-brand:       #305180;
  --tst-lime:        #E1FA59;
  --tst-gold:        #F5B021;
  --tst-live:        #E63946;
  --tst-win:         #2A9D8F;
  --radius-lg:       12px;
  --font-headline:   "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono:       "DM Mono", "Courier New", monospace;
}

/* ══════════════════════════════════════════════════════════════════
   SHARED — estructuras comunes desktop + mobile
══════════════════════════════════════════════════════════════════ */

.arg-strip-outer { position: relative; padding: 0 12px; margin-bottom: 32px; }

.arg-strip-wrap {
  background: var(--tst-brand-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(225,250,89,.12);
}

/* Header */
.arg-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0,0,0,.18);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.arg-strip-header-left { display: flex; align-items: center; gap: 10px; }
.arg-strip-flag-big    { font-size: 18px; line-height: 1; }
.arg-strip-title {
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
}
.arg-strip-title span { color: var(--tst-lime); }
.arg-strip-link {
  font-family: var(--font-headline);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--tst-gold);
  text-decoration: none;
}
.arg-strip-link:hover { opacity: .75; }

/* Tile */
.ast-tile {
  border-right: 1px solid rgba(255,255,255,.06);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  transition: background 150ms;
  cursor: pointer;
}
.ast-tile:last-child { border-right: none; }
.ast-tile:hover      { background: rgba(255,255,255,.03); }

/* Tile header: tag + estado */
.ast-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ast-tournament-tag {
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 7px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.ast-tag--clay   { background: rgba(180,80,30,.25);  color: #E8946A; border: 1px solid rgba(180,80,30,.3); }
.ast-tag--hard   { background: rgba(48,81,128,.35);  color: #A0C0E8; border: 1px solid rgba(48,81,128,.4); }
.ast-tag--grass  { background: rgba(42,157,143,.2);  color: #7ECEC6; border: 1px solid rgba(42,157,143,.3); }
.ast-tag--indoor { background: rgba(107,114,128,.2); color: #9CA3AF; border: 1px solid rgba(107,114,128,.3); }
.ast-tag--default{ background: rgba(107,114,128,.2); color: #9CA3AF; border: 1px solid rgba(107,114,128,.3); }

/* Estado */
.ast-status {
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(200,220,255,.35);
  white-space: nowrap;
  flex-shrink: 0;
}
.ast-status--live {
  color: var(--tst-live);
  display: flex;
  align-items: center;
  gap: 4px;
}
.ast-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--tst-live);
  animation: tst-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes tst-pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* Ronda */
.ast-round {
  font-family: var(--font-headline);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(200,220,255,.3);
  text-transform: uppercase;
  margin-top: -4px;
}

/* Jugadores */
.ast-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ast-player-info { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.ast-flag        { font-size: 14px; flex-shrink: 0; }
.ast-name {
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #E9F1F7;
}
.ast-name--arg    { color: #A8CBEE; font-weight: 800; }
.ast-name--winner { color: #fff;    font-weight: 800; }
.ast-name--loser  { color: rgba(233,241,247,.38); font-weight: 600; }
.ast-seed {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(200,220,255,.3);
  flex-shrink: 0;
}

/* Sets */
.ast-sets  { display: flex; gap: 3px; flex-shrink: 0; }
.ast-set {
  width: 22px; height: 22px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.ast-set--win   { background: var(--tst-win);  color: #fff; }
.ast-set--loss  { background: rgba(255,255,255,.08); color: rgba(233,241,247,.4); }
.ast-set--live  { background: var(--tst-live); color: #fff; }
.ast-set--empty { background: rgba(255,255,255,.05); color: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.08); }

/* Divider */
.ast-divider { height: 1px; background: rgba(255,255,255,.06); }

/* Empty */
.arg-strip-empty {
  padding: 40px 16px;
  text-align: center;
  font-family: var(--font-headline);
  font-size: 13px;
  color: rgba(200,220,255,.35);
}

/* ══════════════════════════════════════════════════════════════════
   DESKTOP
══════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .tst-mob-section { display: none !important; }

  .arg-strip-scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
  }
  .arg-strip-scroll::-webkit-scrollbar { display: none; }

  .ast-tile {
    flex: 0 0 210px;
    scroll-snap-align: start;
  }

  /* Flechas desktop — fuera del wrap */
  .score-strip-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    background: rgba(30,58,95,.92);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(255,255,255,.7);
    cursor: pointer;
    z-index: 2;
    transition: background 150ms, opacity 150ms;
    user-select: none;
    opacity: 0;
    pointer-events: none;
  }
  .score-strip-arrow.visible   { opacity: 1; pointer-events: auto; }
  .score-strip-arrow:hover     { background: var(--tst-brand); color: #fff; }
  .score-strip-arrow--right    { right: -10px; }
  .score-strip-arrow--left     { left:  -10px; }
}

/* ══════════════════════════════════════════════════════════════════
   MOBILE  (≤ 767px)
══════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .arg-strip-desktop-scroll { display: none !important; }
  .score-strip-arrow        { display: none !important; }

  .arg-strip-outer  { padding: 0 8px; margin-bottom: 24px; }
  .arg-strip-header { padding: 10px 12px; }
  .arg-strip-title  { font-size: 11px; }

  /* ── Card única visible + slider ─────────────────────────────── */
  .tst-mob-slider {
    overflow: hidden;           /* clip sin afectar el panel expansible */
    position: relative;
  }
  .tst-mob-track {
    display: flex;
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    will-change: transform;
  }
  /* Cada card ocupa 100% del ancho */
  .tst-mob-track .ast-tile {
    flex: 0 0 100%;
    width: 100%;
    border-right: none;
    scroll-snap-align: unset;
  }

  /* ── Dots ────────────────────────────────────────────────────── */
  .tst-mob-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 0 6px;
    background: rgba(0,0,0,.12);
  }
  .tst-mob-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    cursor: pointer;
    transition: all 0.25s;
    border: none;
    padding: 0;
  }
  .tst-mob-dot.active {
    background: var(--tst-lime);
    width: 18px;
    border-radius: 3px;
  }

  /* ── Barra inferior: ‹  ↓ VER MÁS  › ───────────────────────── */
  .tst-mob-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .tst-mob-nav {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(30,58,95,.92);
    border: 1px solid rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: rgba(255,255,255,.7);
    cursor: pointer;
    transition: opacity 0.2s, background 0.15s;
    user-select: none;
    flex-shrink: 0;
  }
  .tst-mob-nav:hover   { background: var(--tst-brand); color: #fff; }
  .tst-mob-nav.disabled{ opacity: .2; pointer-events: none; }

  /* Botón "↓ VER MÁS" — en lima */
  .tst-mob-expand-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-headline);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--tst-lime);
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 8px;
    transition: opacity 0.15s;
  }
  .tst-mob-expand-btn:hover { opacity: .75; }
  .tst-mob-expand-icon {
    display: inline-block;
    transition: transform 0.35s ease-spring, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
    font-size: 12px;
    line-height: 1;
  }
  .tst-mob-expand-btn.open .tst-mob-expand-icon { transform: rotate(180deg); }

  /* ── Panel expandido (2 cards extra) ────────────────────────── */
  .tst-mob-expand-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 400ms ease-decelerate;
    /* NO usar overflow:hidden en el ancestro — el DS lo prohíbe */
  }
  .tst-mob-expand-panel.open {
    max-height: 600px; /* cubre 2 cards holgadamente */
  }
  .tst-mob-expand-panel .ast-tile {
    width: 100%;
    border-right: none;
    border-top: 1px solid rgba(255,255,255,.06);
  }
}

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .tst-mob-track, .tst-mob-expand-panel, .tst-mob-expand-icon { transition: none !important; }
}

/* ── Skeleton de carga (estado inicial antes de que cargue el widget) ── */
/* Cubre las clases tst-arg-strip-* que emite el shortcode PHP          */
.tst-arg-strip-outer {
  position: relative;
  padding: 0 12px;
  margin-bottom: 32px;
}
.tst-arg-strip-wrap {
  background: var(--tst-surface, #1a1f2e);
  border-radius: 12px;
  overflow: hidden;
}
.tst-arg-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.tst-arg-strip-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tst-arg-strip-flag { font-size: 18px; line-height: 1; }
.tst-arg-strip-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--tst-text, #e8e8e0);
}
.tst-arg-strip-title span { color: var(--tst-lime, #c6f135); }

/* Loading / skeleton */
.tst-arg-strip-loading {
  display: flex;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
}
.tst-arg-strip-skel {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
}
.tst-arg-strip-skel-line {
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,.07) 25%,
    rgba(255,255,255,.13) 50%,
    rgba(255,255,255,.07) 75%
  );
  background-size: 200% 100%;
  animation: tst-skel-shimmer 1.4s infinite;
}
@keyframes tst-skel-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
@media (max-width: 767px) {
  .tst-arg-strip-outer { padding: 0 8px; margin-bottom: 24px; }
  .tst-arg-strip-loading { gap: 8px; padding: 12px; }
  .tst-arg-strip-skel { flex: 0 0 160px; }
}
