/* Offside · modo vestuario: escudo en cabecera y selector «Mi equipo» del pie. Los colores los pone team-theme.js en :root. */
:root { --team-primary: var(--brand); --team-secondary: var(--brand-700); --team-on: #fff; }

/* Escudo junto al logo (header.php): oculto hasta que hay equipo */
.brand .team-crest { height: 26px; width: 26px; object-fit: contain; margin-left: 2px; animation: crest-in .6s var(--ease) both; }
.brand .team-crest[hidden] { display: none; }
@keyframes crest-in { from { opacity: 0; transform: scale(.6) rotate(-14deg); } to { opacity: 1; transform: none; } }
/* Con equipo: una línea fina con sus dos colores bajo la cabecera */
html[data-team] .site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, var(--team-primary) 0 50%, var(--team-secondary) 50% 100%); }

/* Selector */
.team-pick { position: relative; max-width: 520px; }
.team-pick-btn { list-style: none; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 14px; border-radius: var(--pill); background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: box-shadow .25s, transform .35s var(--ease); -webkit-tap-highlight-color: transparent; }
.team-pick-btn::-webkit-details-marker { display: none; }
.team-pick-btn:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .09); }
.team-pick-btn svg { width: 18px; height: 18px; color: var(--ink-3); transition: transform .35s var(--ease); }
.team-pick[open] .team-pick-btn svg { transform: rotate(180deg); }
.team-pick-crest:empty { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--team-primary), var(--team-secondary), var(--team-primary)); }
.team-pick-crest img { width: 22px; height: 22px; object-fit: contain; display: block; }
.team-pick-panel { margin-top: 12px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 18px 50px rgba(0, 0, 0, .1); display: grid; gap: 12px; animation: pick-in .4s var(--ease) both; }
@keyframes pick-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.team-pick-hint { font-size: .88rem; color: var(--ink-2); }
.team-pick-search input { width: 100%; min-height: 44px; padding: 0 16px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--bg-2); }
.team-pick-search input:focus { outline: 3px solid var(--brand); outline-offset: 2px; }
.team-pick h3 { font: 650 .78rem/1 var(--font-b); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.team-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; overscroll-behavior: contain; padding: 2px; }
.team-pick-grid li[hidden] { display: none; }
.team-pick-grid button { width: 100%; display: grid; justify-items: center; gap: 6px; padding: 10px 6px 8px; border: 1px solid transparent; border-radius: var(--r-s); background: var(--bg-2); color: var(--ink); font: 500 .72rem/1.2 var(--font-b); text-align: center; cursor: pointer; transition: transform .35s var(--ease), background-color .25s, border-color .25s; -webkit-tap-highlight-color: transparent; }
.team-pick-grid button:hover { transform: translateY(-2px); background: #fff; border-color: var(--line); }
.team-pick-grid button[aria-pressed="true"] { background: #fff; border-color: var(--tp); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tp) 25%, transparent); }
.team-pick-grid img { width: 40px; height: 40px; object-fit: contain; }
.team-pick-grid span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.team-pick-reset { justify-self: start; min-height: 40px; padding: 0 16px; border-radius: var(--pill); border: 0; background: var(--bg-2); color: var(--ink); font-weight: 600; cursor: pointer; }
.team-pick-reset[hidden] { display: none; }
.team-pick-none { font-size: .9rem; color: var(--ink-2); }
.team-pick-none a { text-decoration: underline; }
/* Celebración breve al elegir (sin movimiento si el usuario lo pide) */
.team-pick.is-cheer .team-pick-btn { animation: cheer .6s var(--ease); }
@keyframes cheer { 30% { transform: scale(1.06); } 60% { transform: scale(.98); } }
@media (prefers-reduced-motion: reduce) { .brand .team-crest, .team-pick-panel, .team-pick.is-cheer .team-pick-btn { animation: none; } .team-pick-grid button, .team-pick-btn { transition: none; } }
