/* PG Forja Clínica · Encuestas de satisfacción (página pública y portal). */

/* ---------------- Página pública ---------------- */
.pgs-publico { --pgs-texto: #1f2a30; --pgs-suave: #5d6b73; --pgs-borde: #d9e0e4; --pgs-fondo: #f3f6f7; --pgs-caja: #fff;
  margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 17px; line-height: 1.5;
  color: var(--pgs-texto); background: var(--pgs-fondo); min-height: 100vh; display: flex; flex-direction: column; }
@media (prefers-color-scheme: dark) {
  .pgs-publico { --pgs-texto: #e8eef0; --pgs-suave: #a8b5bb; --pgs-borde: #34434a; --pgs-fondo: #111a1e; --pgs-caja: #1a252a; }
}
.pgs-publico *, .pgs-publico *::before, .pgs-publico *::after { box-sizing: border-box; }
.pgs-cab { background: var(--pgs-primario, #1d7874); color: #fff; padding: 16px 20px; display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 700; font-size: 1.1rem; }
.pgs-cab img { max-height: 44px; max-width: 160px; background: #fff; border-radius: 8px; padding: 4px; }
.pgs-caja { width: 100%; max-width: 640px; margin: 24px auto; padding: 28px 24px; background: var(--pgs-caja); border-radius: 16px; box-shadow: 0 6px 30px rgba(0, 0, 0, .07); flex: 1 0 auto; }
@media (max-width: 680px) { .pgs-caja { margin: 0; border-radius: 0; padding: 22px 16px; box-shadow: none; } }
.pgs-caja h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 8px; }
.pgs-intro, .pgs-sub, .pgs-aviso { color: var(--pgs-suave); }
.pgs-intro { margin: 0 0 20px; }
.pgs-sub { margin: 24px 0 6px; font-weight: 600; }
.pgs-aviso { font-size: .85rem; margin: 4px 0 12px; }
.pgs-error { background: #fdecea; color: #8a1c14; border-radius: 10px; padding: 10px 14px; }
.pgs-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.pgs-form legend { font-weight: 600; padding: 0; margin-bottom: 10px; }
.pgs-form abbr { color: #b3261e; text-decoration: none; }
.pgs-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* NPS 0-10 */
.pgs-nps-fila { display: grid; grid-template-columns: repeat(11, 1fr); gap: 5px; }
@media (max-width: 440px) { .pgs-nps-fila { grid-template-columns: repeat(6, 1fr); } }
.pgs-nps-op { position: relative; }
.pgs-nps-op input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pgs-nps-op span { display: flex; align-items: center; justify-content: center; height: 46px; border: 2px solid var(--pgs-borde); border-radius: 10px; font-weight: 700; cursor: pointer; transition: transform .1s, background .15s; }
.pgs-nps-op:hover span { transform: translateY(-2px); }
.pgs-nd input:checked + span { background: #d9534f; border-color: #d9534f; color: #fff; }
.pgs-np input:checked + span { background: #e0a526; border-color: #e0a526; color: #1f1a0a; }
.pgs-nr input:checked + span { background: #2e8b57; border-color: #2e8b57; color: #fff; }
.pgs-nps-op input:focus-visible + span, .pgs-estrellas input:focus-visible + label { outline: 3px solid var(--pgs-primario, #1d7874); outline-offset: 2px; }
.pgs-nps-leyenda { display: flex; justify-content: space-between; font-size: .8rem; color: var(--pgs-suave); margin-top: 6px; }

/* Estrellas 1-5 (orden inverso en el HTML para colorear las anteriores con CSS) */
.pgs-aspectos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
@media (max-width: 500px) { .pgs-aspectos { grid-template-columns: 1fr; } }
.pgs-aspecto legend { font-weight: 500 !important; margin-bottom: 2px !important; }
.pgs-estrellas { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.pgs-estrellas input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pgs-estrellas label { font-size: 2rem; line-height: 1; padding: 2px 3px; color: var(--pgs-borde); cursor: pointer; transition: color .1s, transform .1s; }
.pgs-estrellas label:hover, .pgs-estrellas label:hover ~ label, .pgs-estrellas input:checked ~ label { color: #f2b01e; }
.pgs-estrellas label:hover { transform: scale(1.12); }

.pgs-campo { display: block; font-weight: 600; margin: 24px 0 6px; }
.pgs-form textarea { width: 100%; font: inherit; padding: 10px 12px; border: 2px solid var(--pgs-borde); border-radius: 10px; background: transparent; color: inherit; resize: vertical; }
.pgs-form textarea:focus { outline: none; border-color: var(--pgs-primario, #1d7874); }
.pgs-check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 20px; cursor: pointer; }
.pgs-check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--pgs-primario, #1d7874); flex: none; }
.pgs-btn { display: inline-block; background: var(--pgs-primario, #1d7874); color: #fff; border: 0; border-radius: 999px; padding: 14px 26px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.pgs-btn:hover { filter: brightness(1.08); }
.pgs-btn:focus-visible { outline: 3px solid var(--pgs-acento, #f4c095); outline-offset: 3px; }
.pgs-btn[disabled] { opacity: .6; cursor: wait; }
.pgs-enviar { width: 100%; }
.pgs-fin { text-align: center; padding: 20px 0; }
.pgs-icono { font-size: 3rem; }
.pgs-google { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--pgs-borde); }
.pgs-pie { text-align: center; font-size: .8rem; color: var(--pgs-suave); padding: 18px 16px 28px; }

/* ---------------- Portal (dirección y fisios) ---------------- */
.pgs-kpis .pgs-nps-kpi b { font-size: 2rem; }
.pgs-rep { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--pg-borde, #ddd); margin: 8px 0 6px; }
.pgs-rep i { display: block; height: 100%; }
.pgs-rep .d, .pgs-ley .d { background: #d9534f; }
.pgs-rep .p, .pgs-ley .p { background: #e0a526; }
.pgs-rep .r, .pgs-ley .r { background: #2e8b57; }
.pgs-ley { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; color: var(--pg-texto-2, #666); }
.pgs-ley i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.pgs-medias { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pgs-medias li { display: grid; grid-template-columns: 11em 1fr 3em; align-items: center; gap: 10px; }
.pgs-pista { height: 10px; border-radius: 5px; background: var(--pg-borde, #ddd); overflow: hidden; }
.pgs-pista i { display: block; height: 100%; background: var(--pg-primario, #1d7874); border-radius: 5px; }
.pgs-graf svg { width: 100%; height: auto; display: block; }
.pgs-graf .rej { stroke: var(--pg-borde, #ddd); stroke-width: 1; }
.pgs-graf .eje { fill: var(--pg-texto-2, #666); font-size: 11px; }
.pgs-graf .lin { fill: none; stroke: var(--pg-primario, #1d7874); stroke-width: 2.5; }
.pgs-graf .pt { fill: var(--pg-primario, #1d7874); }
.pgs-graf .cero { stroke: var(--pg-texto-2, #999); stroke-dasharray: 4 3; }
.pgs-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .pgs-dos { grid-template-columns: 1fr; } }
.pgs-com { list-style: none; margin: 0; padding: 0; }
.pgs-com li { padding: 12px 0; border-bottom: 1px solid var(--pg-borde, #eee); }
.pgs-com li:last-child { border-bottom: 0; }
.pgs-com p { margin: 6px 0 0; white-space: pre-line; }
.pgs-com small { color: var(--pg-texto-2, #666); }
.pgs-nota-n { display: inline-flex; align-items: center; justify-content: center; min-width: 2em; height: 2em; border-radius: 50%; font-weight: 700; color: #fff; margin-right: 8px; }
.pgs-nota-n.d { background: #d9534f; } .pgs-nota-n.p { background: #e0a526; color: #1f1a0a; } .pgs-nota-n.r { background: #2e8b57; }
.pgs-filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pgs-grande { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.pgs-w-cab { display: flex; align-items: baseline; gap: 10px; }
[data-tema="oscuro"] .pgs-nota-n.p { color: #1f1a0a; }
