/* COT — Voz del Cliente · Form de encuesta
   Diseño tomado del mockup oficial. Primario: naranja COT #E85D1F.
   Estrellas ámbar, escala de atributos con colores semáforo (rojo→verde). */
:root {
  --cot:       #E85D1F;   /* naranja COT */
  --cot-dark:  #c94e15;
  --amber:     #ffa726;   /* estrellas */
  --ok:        #66bb6a;   /* éxito */
  --tinta:     #1a1a2e;
  --gris:      #888;
  --gris2:     #aaa;
  --linea:     #ddd;
  --bg:        #eef0f2;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: var(--bg);
  color: var(--tinta);
  line-height: 1.45;
  padding: 16px;
  display: flex;
  justify-content: center;
}

.survey-preview {
  max-width: 540px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
@media (max-width: 520px) { .survey-preview { padding: 22px; } }

/* Encabezado */
.survey-head { text-align: center; }
.survey-logo { width: 90px; margin-bottom: 12px; }
.viaje-ruta { font-size: 15px; font-weight: 700; color: var(--tinta); margin-bottom: 6px; }
.viaje-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 8px; }
.viaje-chip { background: #f5f5f5; border-radius: 6px; padding: 3px 10px; font-size: 11px; font-weight: 600; color: #555; }
.survey-sub { font-size: 12px; color: var(--gris); margin-bottom: 22px; text-align: center; }

.survey-q { margin-bottom: 22px; }
.survey-q > label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 10px; }
.opt { font-weight: 400; color: var(--gris2); }
.req { color: var(--cot); }

/* Experiencia general (estrellas) */
.bloque-general {
  text-align: center; background: #fff8f6; border-radius: 12px;
  padding: 20px; margin-bottom: 24px;
}
.bloque-general label { font-size: 15px; font-weight: 600; display: block; margin-bottom: 14px; }
.rating-stars { display: flex; justify-content: center; gap: 10px; }
.star { font-size: 34px; cursor: pointer; color: var(--linea); transition: color .1s, transform .08s; line-height: 1; }
.star:active { transform: scale(.9); }
.star.filled { color: var(--amber); }
.star-label { font-size: 12px; color: var(--gris2); margin-top: 8px; height: 16px; }
.err { color: var(--cot); font-size: 12px; margin-top: 8px; height: 14px; }

/* Atributos */
.bloque-attrs { background: #f8f8f8; border-radius: 10px; padding: 16px; margin-bottom: 20px; }
.attrs-titulo { font-size: 12px; font-weight: 700; color: #666; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 16px; }
/* Escala 1-5: botones numerados (entran siempre en mobile) + anclas en extremos */
.scale-row { display: flex; gap: 6px; }
.scale-num {
  flex: 1 1 0; min-width: 0; min-height: 44px; border-radius: 8px;
  border: 1.5px solid var(--linea); background: #fff; font-size: 15px;
  font-weight: 700; cursor: pointer; color: var(--gris);
  transition: all .12s; font-family: inherit;
}
.scale-num:hover { border-color: var(--cot); color: var(--cot); }
.scale-num.sel-1 { background: #ffebee; border-color: #ef5350; color: #c62828; }
.scale-num.sel-2 { background: #fff3e0; border-color: #ffa726; color: #e65100; }
.scale-num.sel-3 { background: #fffde7; border-color: #ffd54f; color: #f57f17; }
.scale-num.sel-4 { background: #f1f8e9; border-color: #aed581; color: #558b2f; }
.scale-num.sel-5 { background: #e8f5e9; border-color: #66bb6a; color: #2e7d32; }
.scale-ends {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--gris2); margin-top: 6px;
}
.scale-sel { font-size: 11px; font-weight: 700; color: var(--cot); }

/* Motivo */
.motivo-row { display: flex; gap: 6px; flex-wrap: wrap; }
.motivo-opt {
  flex: 1 1 auto; min-width: 60px; min-height: 44px; padding: 9px 6px; border-radius: 8px;
  border: 1.5px solid var(--linea); background: #fff; font-size: 12px;
  font-weight: 600; cursor: pointer; text-align: center; color: var(--gris);
  transition: all .12s; display: flex; align-items: center; justify-content: center;
}
.motivo-opt:hover { border-color: var(--cot); color: var(--cot); }
.motivo-opt.selected { background: var(--cot); border-color: var(--cot); color: #fff; }

/* Abierta */
textarea.survey-input {
  width: 100%; border: 1.5px solid var(--linea); border-radius: 8px;
  padding: 10px 12px; font-size: 13px; resize: none; height: 80px;
  font-family: inherit;
}
textarea.survey-input:focus { outline: none; border-color: var(--cot); }

/* Enviar */
.submit-btn {
  width: 100%; min-height: 48px; padding: 14px; background: var(--cot); color: #fff;
  border: none; border-radius: 10px; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 8px; transition: background .2s, opacity .12s;
}
.submit-btn:disabled { opacity: .6; cursor: default; }
.submit-btn.ok { background: var(--ok); }

.legal { text-align: center; color: var(--gris2); font-size: 11px; margin: 14px 0 0; }

/* ---------- MOBILE ---------- */
@media (max-width: 520px) {
  body { padding: 0; background: #fff; }            /* card a pantalla completa */
  .survey-preview { border-radius: 0; box-shadow: none; padding: 20px 16px 28px; max-width: 100%; }
  textarea.survey-input { font-size: 16px; }        /* evita auto-zoom en iOS */
}
