/* «Tus productos TuSello» (js/productSwitcher.js). Un mismo bloque en los tres paneles;
   cada panel le da sus colores con las variables --ps-* (al final del archivo).
   Los botones se reinician con all: unset porque components.css da estilo a todo button. */
.pswitch {
  --ps-ink: #1d1c21;
  --ps-muted: #6c6b72;
  --ps-line: #e6e4df;
  --ps-hover: #f3f2ee;
  --ps-mark-bg: #f0efec;
  --ps-mark-ink: #4a4950;
  --ps-accent: #2943ff;
  --ps-accent-ink: #ffffff;
  --ps-here: #6c6b72;
  --ps-error: #b3261e;
  display: grid;
  gap: 6px;
  color: var(--ps-ink);
  font: inherit;
}
.pswitch[hidden] { display: none !important; }
.pswitch-head { display: grid; gap: 2px; }
.pswitch-title { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--ps-ink); letter-spacing: 0; text-transform: none; }
.pswitch-lede { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ps-muted); }
.pswitch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pswitch-item { margin: 0; padding: 0; }
.pswitch .pswitch-row {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  padding: 10px;
  border-radius: 12px;
  color: var(--ps-ink);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pswitch div.pswitch-row { cursor: default; }
.pswitch button.pswitch-row:hover { background: var(--ps-hover); }
.pswitch button.pswitch-row:focus-visible { outline: 2px solid var(--ps-accent); outline-offset: 1px; }
.pswitch button.pswitch-row:disabled { cursor: not-allowed; opacity: .55; }
.pswitch button.pswitch-row[aria-busy="true"] { cursor: progress; }
.pswitch-mark {
  width: 32px; height: 32px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ps-mark-bg); color: var(--ps-mark-ink);
}
.pswitch-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pswitch-text { display: grid; gap: 1px; min-width: 0; }
.pswitch-name { font-size: 14px; font-weight: 700; line-height: 1.25; }
.pswitch-note { font-size: 12.5px; line-height: 1.35; color: var(--ps-muted); }
.pswitch-action {
  justify-self: end;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--ps-line);
  font-size: 13px; font-weight: 700; line-height: 1.2;
  color: var(--ps-ink);
  white-space: nowrap;
}
.pswitch-action.is-new { border-color: var(--ps-accent); background: var(--ps-accent); color: var(--ps-accent-ink); }
.pswitch-here { justify-self: end; font-size: 12px; font-weight: 600; color: var(--ps-here); white-space: nowrap; }
.pswitch-error { margin: 2px 4px 0; font-size: 13px; line-height: 1.4; color: var(--ps-error); }

/* Compacto: el menú lateral de /app (200 px). La acción baja debajo del nombre. */
.pswitch--compact { gap: 2px; margin: 10px 0 4px; padding-top: 10px; border-top: 1px solid var(--ps-line); }
.pswitch--compact .pswitch-head { padding: 0 10px 4px; }
.pswitch--compact .pswitch-title { font-size: 12px; font-weight: 600; color: var(--ps-muted); }
.pswitch--compact .pswitch-row { grid-template-columns: 17px minmax(0, 1fr); column-gap: 10px; row-gap: 1px; padding: 7px 10px; border-radius: 7px; align-items: start; }
.pswitch--compact .pswitch-mark { width: 17px; height: 17px; margin-top: 1px; background: none; border-radius: 0; color: currentColor; }
.pswitch--compact .pswitch-mark svg { width: 17px; height: 17px; stroke-width: 2; }
.pswitch--compact .pswitch-name { font-size: 12px; font-weight: 600; color: var(--ps-ink); }
.pswitch--compact .pswitch-note { display: none; }
.pswitch--compact .pswitch-action,
.pswitch--compact .pswitch-here { grid-column: 2; justify-self: start; padding: 0; border: 0; background: none; font-size: 12px; font-weight: 600; }
.pswitch--compact .pswitch-action { color: var(--ps-accent); }
.pswitch--compact .pswitch-action.is-new { background: none; color: var(--ps-accent); }
.pswitch--compact .pswitch-row { color: #626168; }

/* Hoja de TuSello ID (dialog). */
.pswitch-dialog {
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto auto 12px;
  padding: 20px 16px 16px;
  border: 1.5px solid var(--night-line, #2a2a36);
  border-radius: 24px;
  background: var(--night-surface, #12121a);
  color: var(--night-text, #f4f4f8);
  box-sizing: border-box;
  overflow: auto;
}
.pswitch-dialog::backdrop { background: rgba(0, 0, 0, .62); }
.pswitch-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px; }
.pswitch-dialog-title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; }
.pswitch-dialog .pswitch-dialog-close {
  all: unset; box-sizing: border-box; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--night-line, #2a2a36); color: var(--night-muted, #a5a5b4);
  font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center;
}
.pswitch-dialog .pswitch-dialog-close:focus-visible { outline: 3px solid var(--accent-magenta, #ff3ea5); outline-offset: 2px; }
.pswitch-dialog > .pswitch-lede { margin: 6px 6px 12px; }
@media (min-width: 640px) { .pswitch-dialog { margin: auto; } }

/* ---------- Colores de cada panel ---------- */
/* TuSello ID: tema nocturno, acento lima. */
.pswitch--sheet {
  --ps-ink: var(--night-text, #f4f4f8);
  --ps-muted: var(--night-muted, #a5a5b4);
  --ps-line: var(--night-line, #2a2a36);
  --ps-hover: rgba(255, 255, 255, .05);
  --ps-mark-bg: rgba(255, 255, 255, .07);
  --ps-mark-ink: var(--night-text, #f4f4f8);
  --ps-accent: var(--accent-lime, #ccff00);
  --ps-accent-ink: var(--night-bg, #07070c);
  --ps-here: var(--accent-lime, #ccff00);
  --ps-error: #ff8a80;
}
.pswitch-dialog .pswitch-lede { color: var(--night-muted, #a5a5b4); }
.pswitch--sheet .pswitch-row { padding: 12px 8px; }

/* TuSello Eventos: menú lateral oscuro y tarjeta clara de «Más», acento morado. */
.ep-side .pswitch {
  --ps-ink: #ffffff;
  --ps-muted: #8a8a99;
  --ps-line: #2a2a35;
  --ps-hover: #17171f;
  --ps-mark-bg: #1b1b24;
  --ps-mark-ink: #d9d9e3;
  --ps-accent: #a46bff;
  --ps-accent-ink: #0b0b12;
  --ps-here: #8a8a99;
  --ps-error: #ff8a80;
}
.ep-side .pswitch { gap: 4px; }
/* El pie del menú ya trae su línea divisoria. */
.ep-side .pswitch--compact { margin: 0; padding-top: 0; border-top: 0; }
.ep-side .pswitch-row { row-gap: 1px; align-items: start; }
.ep-side .pswitch-mark { grid-row: span 2; }
.ep-side .pswitch-title { font-size: 12px; font-weight: 600; color: #8a8a99; padding: 0 8px; }
.ep-side .pswitch-row { grid-template-columns: 28px minmax(0, 1fr); padding: 8px; column-gap: 10px; }
.ep-side .pswitch-mark { width: 28px; height: 28px; border-radius: 8px; }
.ep-side .pswitch-mark svg { width: 16px; height: 16px; }
.ep-side .pswitch-name { font-size: 13px; }
.ep-side .pswitch-note { display: none; }
.ep-side .pswitch-action, .ep-side .pswitch-here { grid-column: 2; justify-self: start; padding: 0; border: 0; background: none; font-size: 12px; font-weight: 600; }
.ep-side .pswitch-action, .ep-side .pswitch-action.is-new { color: #c4a3ff; background: none; }
.ep-page .pswitch--card {
  --ps-accent: #a46bff;
  --ps-accent-ink: #0b0b12;
  --ps-line: #e9e7e1;
  --ps-hover: #f5f4f0;
  --ps-mark-bg: #f2efe9;
}
.ep-page .pswitch--card .pswitch-row { padding: 12px 4px; }
.ep-page .pswitch--card .pswitch-item + .pswitch-item { border-top: 1px solid #f0eee8; }
.ep-page .pswitch--card .pswitch-title { font-size: 16px; }

/* Fidelización: «Más» del celular. */
.mobile-more-panel .pswitch--card { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--ps-line); }
.mobile-more-panel .pswitch--card .pswitch-head { padding: 0 4px 4px; }
.mobile-more-panel .pswitch--card .pswitch-row { padding: 10px 4px; }
