/* Public satisfaction survey (encuesta-nps-publica S7). Colors, sizes and
   spacing follow the approved prototype canvas board by board on a phone.
   From 768px wide (a computer or a tablet) the same screens sit in a centered
   panel under a full-width header. The width is read with a container query
   on <body>, so the preview can show both layouts side by side. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  container-type: inline-size;
  margin: 0;
  background: #f8fafc;
  color: #0f172a;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

button,
textarea {
  font-family: inherit;
}

a {
  color: #1d4ed8;
}

a:hover {
  color: #1e40af;
}

.page {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

/* Header */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.brand-logo {
  display: block;
  width: auto;
  height: 40px;
}

/* Survey */
.survey {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 20px 32px;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.sub {
  margin: 0;
  font-size: 15px;
  color: #475569;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.card h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.scale-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scale {
  display: grid;
  gap: 8px;
}

.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.opt {
  min-height: 48px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.opt-lg {
  min-height: 56px;
  font-size: 20px;
}

.opt[aria-pressed="true"] {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.opt:focus-visible,
.send-button:focus-visible,
.link-button:focus-visible,
.review-button:focus-visible,
textarea:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #475569;
}

.comment {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment label {
  font-size: 15px;
  font-weight: 600;
}

.comment textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 16px;
  resize: vertical;
  background: #ffffff;
  color: #0f172a;
}

.link-button {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
}

.send {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.send-button {
  min-height: 56px;
  border-radius: 14px;
  border: 0;
  background: #2563eb;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.send-button:disabled {
  background: #cbd5e1;
  color: #334155;
  cursor: default;
}

.hint {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: #475569;
}

/* Centered states: loading, thanks, expired, offline */
.center {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 24px;
  text-align: center;
}

.center h1 {
  line-height: 1.3;
}

.title-lg {
  font-size: 26px;
}

.badge {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-ok {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-muted {
  background: #e2e8f0;
  color: #334155;
}

.lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #475569;
}

.small {
  margin: 0;
  font-size: 14px;
  color: #475569;
}

.review-button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  border: 2px solid #2563eb;
  font-size: 16px;
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
  background: #ffffff;
  cursor: pointer;
}

/* Computer and tablet */
@container (min-width: 768px) {
  .page {
    max-width: none;
    background: #eef2f7;
  }

  .brand {
    justify-content: center;
    padding: 18px 24px;
  }

  .brand-logo {
    height: 52px;
  }

  .survey,
  .center {
    width: calc(100% - 48px);
    max-width: 640px;
    margin: 40px auto 56px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  }

  .survey {
    gap: 24px;
    padding: 40px 48px 44px;
  }

  .center {
    flex-grow: 0;
    min-height: 440px;
    padding: 48px 56px;
  }

  h1 {
    font-size: 28px;
  }

  .title-lg {
    font-size: 30px;
  }

  .card {
    padding: 22px 24px;
    background: #f8fafc;
  }

  .card h2 {
    font-size: 18px;
  }

  /* All eleven NPS answers fit in one row on a wide screen. */
  .scale-rows {
    display: grid;
    grid-template-columns: 6fr 5fr;
  }

  .review-button {
    max-width: 360px;
  }

  .send-button {
    align-self: center;
    width: 100%;
    max-width: 360px;
  }
}
