/* MyRankingPro – Sincronizar con SNP Galaxy (panel admin). Mobile-first. */
#snpSyncSection h2 { margin-bottom: 4px; }
.snp-sub { font-size: .85rem; color: var(--text-muted, #777); margin: 0 0 16px; line-height: 1.45; }

.snp-bar { display: flex; flex-direction: column; gap: 10px; }
/* background-color (no "background") para no borrar la flecha dorada de style.css */
.snp-bar select {
  width: 100%; min-height: 44px; padding: 0 2.8rem 0 12px; border-radius: 12px; font: inherit; font-size: 16px;
  border: 1.5px solid var(--field-bd, #e0e0e0); background-color: var(--field-bg, #fff); color: var(--text, #111);
}
.snp-bar button { min-height: 44px; }
.snp-bar button:disabled, #snpImportBtn:disabled { opacity: .45; cursor: not-allowed; }
@media (min-width: 640px) { .snp-bar { flex-direction: row; } .snp-bar select { flex: 1; } }

.snp-status { font-size: .84rem; margin: 12px 0 0; min-height: 1.2em; color: var(--text-muted, #777); }
.snp-status--ok { color: #15803d; }
.snp-status--error { color: #b91c1c; }

/* Emparejar */
.snp-map { margin-top: 18px; border-top: 1px solid rgba(184,152,42,.2); padding-top: 14px; }
.snp-map summary { cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; gap: 8px; list-style: none; }
.snp-map summary::-webkit-details-marker { display: none; }
.snp-map summary small { font-weight: 500; color: var(--text-muted, #777); }
.snp-map__hint { font-size: .8rem; color: var(--text-muted, #777); margin: 8px 0 10px; }
.snp-map-list { display: grid; gap: 8px; }
.snp-map-row { display: grid; gap: 6px; align-items: center; }
.snp-map-row select {
  min-height: 44px; border-radius: 10px; padding: 0 2.8rem 0 10px; font: inherit; font-size: 16px;
  border: 1.5px solid var(--field-bd, #e0e0e0); background-color: var(--field-bg, #fff); color: var(--text, #111);
}
.snp-map-row.is-pending select { border-color: rgba(185,28,28,.45); }
.snp-map-name { font-size: .88rem; }
.snp-tag { font-style: normal; font-size: .7rem; padding: 1px 6px; border-radius: 999px; background: rgba(184,152,42,.15); color: var(--gold, #b8982a); }
@media (min-width: 640px) { .snp-map-row { grid-template-columns: 1fr 220px; } }
#snpMapSave { margin-top: 12px; }

/* Jornadas */
.snp-results { margin-top: 18px; display: grid; gap: 12px; }
.snp-j { border: 1px solid rgba(184,152,42,.22); border-radius: 14px; padding: 10px 12px; background: var(--field-bg, #fff); }
.snp-j__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.snp-j__n { font-weight: 800; color: var(--gold, #b8982a); }
.snp-j__rival { font-weight: 600; font-size: .9rem; flex: 1 1 auto; min-width: 0; }
.snp-j__res { font-weight: 800; font-variant-numeric: tabular-nums; }
.snp-j__date { font-size: .78rem; color: var(--text-muted, #777); }

.snp-row {
  display: grid; grid-template-columns: 24px 28px 1fr; grid-template-areas: "cb p main" "cb p chip";
  gap: 2px 8px; align-items: start; padding: 8px 0; border-top: 1px solid rgba(0,0,0,.06); cursor: pointer;
}
.snp-row input { grid-area: cb; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold, #b8982a); }
.snp-row__p { grid-area: p; font-weight: 700; font-size: .82rem; color: var(--text-muted, #777); padding-top: 2px; }
.snp-row__main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.snp-row__pair { font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.snp-row__score { font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--text-muted, #666); }
.snp-row__before { font-size: .75rem; color: #b45309; }
.snp-row.is-off { cursor: default; opacity: .72; }
.snp-muted { color: var(--text-muted, #888); font-weight: 500; }
@media (min-width: 640px) {
  .snp-row { grid-template-columns: 24px 28px 1fr auto; grid-template-areas: "cb p main chip"; align-items: center; }
}

.snp-chip { grid-area: chip; justify-self: start; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.snp-chip--nuevo { background: #dcfce7; color: #166534; }
.snp-chip--cambia { background: #fef3c7; color: #92400e; }
.snp-chip--igual { background: rgba(0,0,0,.06); color: #555; }
.snp-chip--sin-emparejar, .snp-chip--fuera, .snp-chip--revisar { background: #fee2e2; color: #991b1b; }

.snp-note { font-size: .8rem; color: var(--text-muted, #777); margin: 4px 0; }
.snp-note--error { color: #b91c1c; }
.snp-next { font-size: .8rem; color: var(--text-muted, #777); margin: 2px 0 0; }

.snp-foot { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.snp-foot__sum { font-size: .82rem; color: var(--text-muted, #777); }
@media (min-width: 640px) { .snp-foot { flex-direction: row; align-items: center; justify-content: space-between; } }

/* Modo oscuro */
body.dark-mode .snp-j, html.dark-mode .snp-j { background: rgba(255,255,255,.03); border-color: rgba(212,168,67,.2); }
body.dark-mode .snp-row, html.dark-mode .snp-row { border-top-color: rgba(255,255,255,.07); }
body.dark-mode .snp-chip--nuevo { background: rgba(34,197,94,.15); color: #86efac; }
body.dark-mode .snp-chip--cambia { background: rgba(245,158,11,.15); color: #fcd34d; }
body.dark-mode .snp-chip--igual { background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); }
body.dark-mode .snp-chip--sin-emparejar, body.dark-mode .snp-chip--fuera, body.dark-mode .snp-chip--revisar { background: rgba(239,68,68,.15); color: #fca5a5; }
body.dark-mode .snp-row__before { color: #fbbf24; }
body.dark-mode .snp-status--ok { color: #86efac; }
body.dark-mode .snp-status--error, body.dark-mode .snp-note--error { color: #fca5a5; }

@media (prefers-reduced-motion: no-preference) {
  .snp-j { animation: snpIn .22s ease-out both; }
  @keyframes snpIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
