/******************
    User custom CSS
    ---------------

    In this file you can add your own custom CSS
    It will be loaded last, so you can override any other property.
    Also, it will never be updated. So if you inheritate a core template and just add here some CSS, you'll still benefit of all the updates
*/

/* Color ref: https://whitestack.atlassian.net/wiki/spaces/PYP/pages/2715287606/Colores+de+marca+y+su+uso */

/* ==========================================================================
   1. CONTROL DE ESPACIOS GENERALES (DESKTOP Y MOBILE)
   ========================================================================== */

/* Fondo general de la página en blanco puro */
body {
  background-color: #ffffff !important;
}

/* Reducción del margen de la barra de progreso */
.top-container {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Espaciado del contenedor principal (sube un 20-25% en PC para emparejar alturas) */
#outerframeContainer {
  margin: 0 auto;
  padding-top: 2rem !important;
}

/* Elimina la acumulación de márgenes por las clases .space-col de LimeSurvey */
#main-col.space-col,
.group-outer-container.space-col,
.group-container.space-col {
  margin-top: 0 !important;
  margin-bottom: 0.5rem !important;
}

/* Título de la sección (General, Proyectos, etc.) */
.group-title {
  margin-top: 0.25rem !important;
  margin-bottom: 0.75rem !important;
  font-size: 2rem !important;
  line-height: 1.25 !important;
  color: var(--bs-dark) !important;
}

/* Tarjeta contenedora de la pregunta (Celeste pastel super claro) */
body .question-container {
  background-color: #f3f7fd !important;
  border: 1px solid #dce7f9 !important;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(46, 98, 255, 0.05);
  padding: 34px 38px !important;
  margin-bottom: 2rem;
  opacity: 0;
  animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

/* --- AJUSTES ESPECÍFICOS PARA DISPOSITIVOS MÓVILES --- */
@media (max-width: 768px) {
  #outerframeContainer {
    padding-top: 0.2rem !important;
  }

  .group-title {
    margin-top: 0.15rem !important;
    margin-bottom: 0.4rem !important;
    font-size: 1.45rem !important;
  }

  body .question-container {
    padding: 22px 18px !important;
    margin-top: 0.35rem !important;
    margin-bottom: 1.5rem !important;
    border-radius: 14px;
  }
}


/* ==========================================================================
   2. OPCIONES VERTICALES (CHECKBOXES Y RADIOS EN LISTA)
   ========================================================================== */

body .ls-answers:not(.list-group-horizontal):not(table) .checkbox-item,
body .ls-answers:not(.list-group-horizontal):not(table) .radio-item {
  padding-left: 0 !important;
  margin: 0 0 10px 0 !important;
}

/* Tarjeta de cada opción */
body .ls-answers:not(.list-group-horizontal):not(table) .answer-item {
  background-color: #ffffff !important;
  border: 1.5px solid #dce7f9 !important;
  border-radius: 10px !important;
  transition: all 0.2s ease-in-out;
  position: relative !important;
  margin-bottom: 10px !important;
}

body .ls-answers:not(.list-group-horizontal):not(table) .answer-item:hover {
  border-color: #b9d0fa !important;
  box-shadow: 0 2px 8px rgba(46, 98, 255, 0.05);
}

/* Label: centrado vertical exacto */
body .ls-answers:not(.list-group-horizontal):not(table) .answer-item label {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 54px;
  padding: 12px 20px 12px 54px !important;
  margin: 0 !important;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--bs-dark) !important;
}

/* Neutraliza el margen inferior del <p> generado por LimeSurvey */
body .ls-answers:not(.list-group-horizontal):not(table) .answer-item label p,
body .ls-answers:not(.list-group-horizontal):not(table) .answer-item label span {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  display: inline-block !important;
}

/* Posición y centrado vertical del marco del checkbox / radio */
body .ls-answers:not(.list-group-horizontal):not(table) .checkbox-item label::before,
body .ls-answers:not(.list-group-horizontal):not(table) .radio-item label::before {
  position: absolute !important;
  left: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  width: 20px !important;
  height: 20px !important;
  border: 2px solid #9094A7 !important;
  background-color: #ffffff !important;
}

body .ls-answers:not(.list-group-horizontal):not(table) .checkbox-item label::before {
  border-radius: 4px !important;
}

body .ls-answers:not(.list-group-horizontal):not(table) .radio-item label::before {
  border-radius: 50% !important;
}

/* Icono interior de tilde */
body .ls-answers:not(.list-group-horizontal):not(table) .checkbox-item label::after {
  position: absolute !important;
  left: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: "remixicon" !important;
  font-size: 16px !important;
  color: transparent !important;
  background-color: transparent !important;
}

/* Punto interior del radio */
body .ls-answers:not(.list-group-horizontal):not(table) .radio-item label::after {
  position: absolute !important;
  left: 23px !important;
  top: 50% !important;
  transform: translateY(-50%) scale(0) !important;
  margin: 0 !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background-color: #FF8A50 !important;
  transition: transform 0.15s ease-in-out;
}

/* Estados seleccionados */
body .ls-answers:not(.list-group-horizontal):not(table) .answer-item:has(input:checked) {
  border-color: #FF8A50 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 1px #FF8A50 !important;
}

body .ls-answers:not(.list-group-horizontal):not(table) .checkbox-item input[type=checkbox]:checked + label::before {
  border-color: #FF8A50 !important;
}

body .ls-answers:not(.list-group-horizontal):not(table) .checkbox-item input[type=checkbox]:checked + label::after {
  color: #FF8A50 !important;
}

body .ls-answers:not(.list-group-horizontal):not(table) .radio-item input[type=radio]:checked + label::before {
  border-color: #FF8A50 !important;
}

body .ls-answers:not(.list-group-horizontal):not(table) .radio-item input[type=radio]:checked + label::after {
  transform: translateY(-50%) scale(1) !important;
}


/* ==========================================================================
   3. ESCALA HORIZONTAL 1-5 (BOTONES EN FILA + 'SIN RESPUESTA' ABAJO EN MÓVIL)
   ========================================================================== */

/* Fila horizontal */
body .list-group-horizontal,
body .choice-5-pt-radio .list-group-horizontal,
body .ls-answers.list-group-horizontal {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Cada columna de opción (se expanden y encogen por igual) */
body .list-group-horizontal .radio-item,
body .choice-5-pt-radio .list-group-horizontal .radio-item {
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
}

/* Casilla contenedora individual */
body .list-group-horizontal .answer-item {
  background-color: #ffffff !important;
  border: 1.5px solid #dce7f9 !important;
  border-radius: 10px !important;
  transition: all 0.2s ease-in-out;
  margin: 0 !important;
  height: 100% !important;
}

body .list-group-horizontal .answer-item:hover {
  border-color: #b9d0fa !important;
  box-shadow: 0 2px 6px rgba(46, 98, 255, 0.05);
}

/* Ocultar el círculo nativo de radio */
body .list-group-horizontal .radio-item label::before,
body .list-group-horizontal .radio-item label::after {
  display: none !important;
}

/* Número centrado y área táctil cómoda */
body .list-group-horizontal .radio-item label {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 48px !important;
  padding: 8px 4px !important;
  margin: 0 !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  color: var(--bs-dark) !important;
  cursor: pointer;
  text-align: center !important;
}

/* Estilo más sutil para la opción 'Sin respuesta' en escritorio */
body .list-group-horizontal .noanswer-item label {
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  color: #64748b !important;
}

/* Estado seleccionado: borde y texto naranja (aplica tanto a 1-5 como a Sin respuesta) */
body .list-group-horizontal .answer-item:has(input:checked) {
  border-color: #FF8A50 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 1px #FF8A50 !important;
}

body .list-group-horizontal .answer-item:has(input:checked) label {
  color: #FF8A50 !important;
}

/* --- COMPORTAMIENTO EN MÓVILES: 1-5 ARRIBA Y 'SIN RESPUESTA' DEBAJO --- */
@media (max-width: 768px) {
  body .list-group-horizontal,
  body .choice-5-pt-radio .list-group-horizontal,
  body .ls-answers.list-group-horizontal {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* Fuerza a '.noanswer-item' a bajar y ocupar el 100% del ancho como un botón completo */
  body .list-group-horizontal .radio-item.noanswer-item,
  body .choice-5-pt-radio .list-group-horizontal .radio-item.noanswer-item {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 4px !important;
  }

  body .list-group-horizontal .radio-item label {
    min-height: 44px !important;
    font-size: 1.05rem !important;
  }

  body .list-group-horizontal .radio-item.noanswer-item label {
    min-height: 42px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
  }
}

/* ==========================================================================
   4. MATRIZ COMPACTA CON CHECK NARANJA (ESTÉTICA WHITESTACK)
   ========================================================================== */

/* Compactar título y ayuda para igualar a las demás preguntas */
body .question-title-container p,
body .ls-label-question p {
  margin-bottom: 0.25rem !important;
}

body .question-help-container,
body .ls-questionhelp {
  margin-bottom: 0.35rem !important;
  padding-bottom: 0 !important;
}

/* Ocultar el contenedor de validación si está vacío para evitar espacio fantasma */
body .question-valid-container:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Tarjeta contenedora blanca (sube la tabla reduciendo el margin-top) */
body .ls-table-wrapper {
  background-color: #ffffff !important;
  border: 1.5px solid #dce7f9 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 14px rgba(46, 98, 255, 0.03) !important;
  overflow: hidden !important;
  margin-top: 0.35rem !important; /* Reducido de 1.25rem a 0.35rem (~6px) */
  margin-bottom: 0.5rem !important;
}

/* Restaurar estructura de tabla nativa (anula .no-tables-general) */
body .no-tables-general table.ls-answers,
body table.ls-answers.radio-array {
  display: table !important;
  width: 100% !important;
  border-collapse: collapse !important;
  border: none !important;
  background-color: transparent !important;
  margin-bottom: 0 !important;
}

body .no-tables-general table.ls-answers colgroup,
body table.ls-answers.radio-array colgroup {
  display: table-column-group !important;
}

body .no-tables-general table.ls-answers col,
body table.ls-answers.radio-array col {
  display: table-column !important;
}

body .no-tables-general table.ls-answers thead,
body table.ls-answers.radio-array thead {
  display: table-header-group !important;
}

body .no-tables-general table.ls-answers tbody,
body table.ls-answers.radio-array tbody {
  display: table-row-group !important;
}

body .no-tables-general table.ls-answers tr,
body table.ls-answers.radio-array tr {
  display: table-row !important;
}

body .no-tables-general table.ls-answers th,
body table.ls-answers.radio-array th,
body .no-tables-general table.ls-answers td,
body table.ls-answers.radio-array td {
  display: table-cell !important;
}

/* Neutralizar variables de Bootstrap */
body table.ls-answers.radio-array,
body table.ls-answers.radio-array * {
  --bs-table-bg: transparent !important;
  --bs-table-accent-bg: transparent !important;
  --bs-table-hover-bg: transparent !important;
  --bs-table-active-bg: transparent !important;
}

/* Encabezados superiores (1 al 5 y Sin respuesta) */
body table.ls-answers.radio-array thead tr {
  background-color: #f8fafc !important;
  border-bottom: 2px solid #dce7f9 !important;
}

body table.ls-answers.radio-array thead th {
  text-align: center !important;
  vertical-align: middle !important;
  padding: 14px 4px !important;
  border: none !important;
  color: var(--bs-dark) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
}

body table.ls-answers.radio-array thead th p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  display: inline-block !important;
}

body table.ls-answers.radio-array thead th.noanswer-text {
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  color: #64748b !important;
}

body table.ls-answers.radio-array thead td:first-child {
  border: none !important;
  background-color: transparent !important;
}

/* Filas de productos */
body table.ls-answers.radio-array tbody tr {
  border-bottom: 1px solid #edf2f7 !important;
  transition: background-color 0.15s ease-in-out !important;
}

body table.ls-answers.radio-array tbody tr:last-child {
  border-bottom: none !important;
}

body table.ls-answers.radio-array tbody tr:nth-child(even) {
  background-color: #fbfdff !important;
}

body table.ls-answers.radio-array tbody tr:hover {
  background-color: #f0f6ff !important;
}

/* Texto del producto */
body table.ls-answers.radio-array tbody th.answertext {
  text-align: left !important;
  vertical-align: middle !important;
  padding: 12px 20px !important;
  font-size: 0.98rem !important;
  font-weight: 600 !important;
  color: var(--bs-dark) !important;
  border: none !important;
}

body table.ls-answers.radio-array tbody th.answertext p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}

/* Celdas de respuesta */
body table.ls-answers.radio-array tbody td.answer-item {
  text-align: center !important;
  vertical-align: middle !important;
  padding: 10px 4px !important;
  border: none !important;
  background-color: transparent !important;
  cursor: pointer !important;
}

/* Ocultar etiquetas de texto duplicadas dentro de la celda */
body table.ls-answers.radio-array tbody td.answer-item label {
  display: none !important;
}

/* CHECKBOX / RADIO VISIBLE (Anula la opacidad y posición oculta de theme_apple) */
body table.ls-answers.radio-array tbody td.answer-item input[type="radio"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;             /* Obliga a mostrar el selector */
  position: static !important;        /* Lo coloca centrado en la celda */
  clip: auto !important;
  clip-path: none !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 6px !important;     /* Formato check suave */
  background-color: #ffffff !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  cursor: pointer !important;
  outline: none !important;
  vertical-align: middle !important;
  box-shadow: none !important;
  transition: all 0.15s ease-in-out !important;
}

/* Hover sobre la casilla */
body table.ls-answers.radio-array tbody td.answer-item input[type="radio"]:hover {
  border-color: #FF8A50 !important;
  box-shadow: 0 0 0 3px rgba(255, 138, 80, 0.18) !important;
}

/* ESTADO SELECCIONADO: Borde naranja y tilde naranja (sin rellenar la celda) */
body table.ls-answers.radio-array tbody td.answer-item input[type="radio"]:checked {
  border-color: #FF8A50 !important;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FF8A50'%3E%3Cpath d='M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z'/%3E%3C/svg%3E") !important;
  background-size: 15px 15px !important;
  box-shadow: 0 0 0 3px rgba(255, 138, 80, 0.22) !important;
}

/* Anular cualquier relleno de fondo en la celda al marcar */
body table.ls-answers.radio-array tbody td.answer-item:has(input:checked),
body table.ls-answers.radio-array tbody td.answer-item:active,
body table.ls-answers.radio-array tbody td.answer-item:focus-within {
  background-color: transparent !important;
}

/* Adaptación móvil: cada producto se convierte en una tarjeta táctil sin scroll horizontal */
@media (max-width: 768px) {
  /* Quitar el marco exterior de tabla para que luzcan las tarjetas individuales */
  body .ls-table-wrapper {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    margin-top: 0.5rem !important;
  }

  body .no-tables-general table.ls-answers,
  body table.ls-answers.radio-array,
  body .no-tables-general table.ls-answers tbody,
  body table.ls-answers.radio-array tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Ocultar encabezados de columna y colgroup */
  body .no-tables-general table.ls-answers thead,
  body table.ls-answers.radio-array thead,
  body .no-tables-general table.ls-answers colgroup,
  body table.ls-answers.radio-array colgroup {
    display: none !important;
  }

  /* Cada fila de producto (WhiteCloud, WhiteCruiser, etc.) es una tarjeta blanca */
  body .no-tables-general table.ls-answers tbody tr,
  body table.ls-answers.radio-array tbody tr {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    background-color: #ffffff !important;
    border: 1.5px solid #dce7f9 !important;
    border-radius: 12px !important;
    padding: 14px 12px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 2px 6px rgba(46, 98, 255, 0.03) !important;
  }

  body .no-tables-general table.ls-answers tbody tr:last-child,
  body table.ls-answers.radio-array tbody tr:last-child {
    margin-bottom: 0 !important;
  }

  /* Nombre del producto ocupando todo el ancho superior de la tarjeta */
  body .no-tables-general table.ls-answers tbody th.answertext,
  body table.ls-answers.radio-array tbody th.answertext {
    display: block !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    padding: 0 0 6px 2px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--bs-dark, #131B4D) !important;
    text-align: left !important;
  }

  /* Celdas 1 al 5 repartidas en una sola fila */
  body .no-tables-general table.ls-answers tbody td.answer-item,
  body table.ls-answers.radio-array tbody td.answer-item {
    display: flex !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  /* Opción 'Sin respuesta' como botón ancho debajo del 1 al 5 (sin afectar matrices obligatorias) */
  body .no-tables-general table.ls-answers tbody td.answer-item.noanswer-item,
  body table.ls-answers.radio-array tbody td.answer-item.noanswer-item,
  body table.ls-answers.radio-array tbody td[class^="answer_cell_ "] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 2px !important;
  }

  /* Ocultar el cuadrado de radio de escritorio */
  body table.ls-answers.radio-array tbody td.answer-item input[type="radio"] {
    display: none !important;
  }

  /* Ocultar los círculos (::before y ::after) que inyecta theme_apple en móvil */
  body .no-tables-general table.ls-answers .radio-item label::before,
  body .no-tables-general table.ls-answers .radio-item label::after,
  body .no-tables-general table.ls-answers .radio-item label.ls-label-xs-visibility::before,
  body .no-tables-general table.ls-answers .radio-item label.ls-label-xs-visibility::after,
  body table.ls-answers.radio-array tbody td.answer-item label::before,
  body table.ls-answers.radio-array tbody td.answer-item label::after {
    display: none !important;
    content: none !important;
  }

  /* Mostrar la etiqueta interna como botón táctil */
  body table.ls-answers.radio-array tbody td.answer-item label {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 40px !important;
    padding: 6px 4px !important;
    margin: 0 !important;
    background-color: #f8fafc !important;
    border: 1.5px solid #dce7f9 !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--bs-dark, #131B4D) !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
  }

  /* Hacer visible el texto interno (1..5 y Sin respuesta) */
  body table.ls-answers.radio-array tbody td.answer-item label * {
    display: inline !important;
    visibility: visible !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    clip-path: none !important;
    overflow: visible !important;
    margin: 0 !important;
  }

  /* Estilo más discreto para 'Sin respuesta' */
  body table.ls-answers.radio-array tbody td.answer-item.noanswer-item label,
  body table.ls-answers.radio-array tbody td[class^="answer_cell_ "] label {
    min-height: 36px !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    background-color: #ffffff !important;
  }

  /* Estado seleccionado en naranja corporativo (#FF8A50) */
  body table.ls-answers.radio-array tbody td.answer-item:has(input:checked) label {
    border-color: #FF8A50 !important;
    background-color: #ffffff !important;
    color: #FF8A50 !important;
    box-shadow: 0 0 0 1px #FF8A50 !important;
  }
}

/* ==========================================================================
   5. TITULOS GRANDES
   ========================================================================== */

h1.large-heading,
.large-heading {
  font-family: var(--bs-body-font-family) !important;
  font-weight: 600 !important;
  color: var(--bs-dark) !important;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  /* Logo de Whitestack al 50% del tamaño actual (84px -> 42px) */
  body #survey-nav .logo-container img,
  body .logo-container img {
    max-height: 42px !important;
    padding: 4px 0 !important;
    width: auto !important;
  }

  /* Título principal de la encuesta más compacto (anula 2.85rem y 52px de line-height) */
  body h1.survey-name,
  body .survey-name.large-heading,
  body #welcome-container h1.large-heading {
    font-size: 1.75rem !important;
    line-height: 1.25 !important;
    margin-bottom: 12px !important;
  }
}

/* ==========================================================================
   6. PANTALLA DE CIERRE / CONFIRMACIÓN CENTRADA
   ========================================================================== */

/* Contenedor exterior centrado horizontal y verticalmente */
body .completed-wrapper {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 2.5rem 1rem !important;
  margin: 1.5rem auto !important;
  max-width: 640px !important;
  width: 100% !important;
}

/* Tarjeta flotante con la misma estética de las preguntas */
body .completed-text {
  background-color: #f3f7fd !important;
  border: 1px solid #dce7f9 !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(46, 98, 255, 0.06) !important;
  padding: 44px 40px !important;
  text-align: center !important;
  width: 100% !important;
  
  /* Animación de entrada suave */
  opacity: 0;
  animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Icono de éxito superior automático (usa Remixicon cargado por el tema) */
body .completed-text::before {
  font-family: "remixicon" !important;
  content: "\eb80" !important; /* Círculo con checkmark */
  font-size: 52px !important;
  line-height: 1 !important;
  color: var(--bs-primary) !important; /* Azul Whitestack */
  display: block !important;
  margin-bottom: 20px !important;
}

/* Título de éxito */
body .completed-text h3 {
  font-size: 1.85rem !important;
  font-weight: 700 !important;
  color: var(--bs-dark) !important;
  margin-top: 0 !important;
  margin-bottom: 14px !important;
  line-height: 1.3 !important;
}

/* Párrafo explicativo */
body .completed-text p {
  font-size: 1.1rem !important;
  color: var(--bs-dark) !important;
  line-height: 1.55 !important;
  margin-bottom: 16px !important;
}

/* Instrucción de salida (último párrafo en cursiva) */
body .completed-text p:last-child {
  margin-bottom: 0 !important;
  font-size: 0.98rem !important;
  color: #64748b !important;
}

/* Ajustes para pantallas móviles */
@media (max-width: 768px) {
  body .completed-wrapper {
    padding: 1.5rem 0.5rem !important;
    margin: 0.5rem auto !important;
  }

  body .completed-text {
    padding: 32px 22px !important;
    border-radius: 14px !important;
  }

  body .completed-text::before {
    font-size: 44px !important;
    margin-bottom: 16px !important;
  }

  body .completed-text h3 {
    font-size: 1.5rem !important;
  }

  body .completed-text p {
    font-size: 1rem !important;
  }
}

/* ==========================================================================
   7. ANIMACIONES
   ========================================================================== */

@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardExit {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-35px) scale(0.95);
  }
}

.card-exit-active {
  animation: cardExit 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* ==========================================================================
   8. PANTALLA DE AVISOS Y ERRORES (ESTÉTICA UNIFICADA CON CIERRE)
   ========================================================================== */

body.error-page {
  background-color: #ffffff !important;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, sans-serif !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 80px 0 0 0 !important;
}

/* Alineación superior (flex-start) para igualar altura con 'Respuestas enviadas' */
body.error-page main.error-main {
  flex: 1 0 auto !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  width: 100% !important;
}

/* Mismo ancho (624px interiores) y márgenes que .completed-wrapper */
body.error-page .error-wrapper {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  padding: 2rem 0.5rem !important;
  margin: 1rem auto !important;
  max-width: 640px !important;
  width: 100% !important;
}

/* Tarjeta flotante celeste idéntica a .completed-text */
body.error-page .error-card {
  background-color: #f3f7fd !important;
  border: 1px solid #dce7f9 !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(46, 98, 255, 0.06) !important;
  padding: 40px 36px !important;
  text-align: center !important;
  width: 100% !important;
  opacity: 0;
  animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Icono superior centrado */
body.error-page .error-icon {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 18px !important;
}

/* Título 'Aviso' */
body.error-page h2.error-title {
  font-family: "Source Sans Pro", sans-serif !important;
  font-size: 1.85rem !important;
  font-weight: 700 !important;
  color: var(--bs-dark, #131B4D) !important;
  margin-top: 0 !important;
  margin-bottom: 14px !important;
  line-height: 1.3 !important;
}

/* Mensaje principal */
body.error-page .error-content,
body.error-page .error-content p {
  font-family: "Source Sans Pro", sans-serif !important;
  font-size: 1.1rem !important;
  color: var(--bs-dark, #131B4D) !important;
  line-height: 1.55 !important;
  margin-bottom: 14px !important;
}

/* Bloque inferior de contacto discreto */
body.error-page .error-contact {
  border-top: 1px solid #dce7f9 !important;
  padding-top: 16px !important;
  margin-top: 20px !important;
}

body.error-page .error-contact p,
body.error-page .error-contact-text {
  font-family: "Source Sans Pro", sans-serif !important;
  font-size: 0.92rem !important;
  color: #64748b !important;
  line-height: 1.5 !important;
  margin-bottom: 4px !important;
}

body.error-page a.error-link {
  font-family: "Source Sans Pro", sans-serif !important;
  color: #2E62FF !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  text-decoration: none !important;
  display: inline-block !important;
}

body.error-page a.error-link:hover {
  text-decoration: underline !important;
}

/* Anula reglas de theme_apple sobre el container del footer */
body.error-page footer#whitestack-footer .container {
  display: block !important;
  height: auto !important;
}

/* Trazas técnicas */
body.error-page .error-trace {
  text-align: left !important;
  margin-top: 20px !important;
  font-size: 0.78rem !important;
  background-color: #ffffff !important;
  padding: 10px !important;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  overflow-x: auto !important;
}

/* Ajuste móvil */
@media (max-width: 768px) {
  body.error-page {
    padding-top: 62px !important;
  }
  
  body.error-page .error-wrapper {
    padding: 1.5rem 0.5rem !important;
    margin: 0.5rem auto !important;
  }

  body.error-page .error-card {
    padding: 32px 22px !important;
    border-radius: 14px !important;
  }

  body.error-page .error-icon svg {
    width: 38px !important;
    height: 38px !important;
  }

  body.error-page h2.error-title {
    font-size: 1.5rem !important;
  }

  body.error-page .error-content,
  body.error-page .error-content p {
    font-size: 1rem !important;
  }
}

/* ==========================================================================
   9. MENÚ DESPLEGABLE SUPERIOR (DROPDOWN WHITESTACK)
   ========================================================================== */

/* Hover y focus en las opciones del menú (anula el verde #14A25C de theme_apple) */
body #survey-nav .dropdown-menu > li > a:hover,
body #survey-nav .dropdown-menu > li > a:focus,
body .dropdown-menu:not(.inner) > li > a:hover,
body .dropdown-menu:not(.inner) > li > a:focus,
body .dropdown-menu .dropdown-item:hover,
body .dropdown-menu .dropdown-item:focus {
  background-color: #FF8A50 !important;
  color: #ffffff !important;
}

/* Opciones activas o seleccionadas */
body #survey-nav .dropdown-menu > li.active > a,
body .dropdown-menu:not(.inner) > li.active > a,
body .dropdown-menu .dropdown-item.active {
  background-color: #FF8A50 !important;
  color: #ffffff !important;
}

/* Detalle visual: bordes redondeados suaves para las opciones al pasar el cursor */
body #survey-nav .dropdown-menu > li > a,
body .dropdown-menu:not(.inner) > li > a {
  border-radius: 6px !important;
  margin: 2px 6px !important;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out !important;
}

/* ==========================================================================
   10. FOOTER CORPORATIVO (STICKY FOOTER DISCRETO Y ADAPTABLE A MÓVILES)
   ========================================================================== */

body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;  /* Fallback para navegadores antiguos */
  min-height: 100dvh !important; /* Altura real visible descontando barra de navegación móvil */
  padding-bottom: 0 !important;
}

body > article,
body:has(#surveys-list-container) > div:not([id]) {
  flex: 1 0 auto !important;
  width: 100% !important;
}

body.error-page {
  min-height: 100vh !important;
  min-height: 100dvh !important;
  padding-bottom: 0 !important;
}

footer.whitestack-footer,
#whitestack-footer {
  flex-shrink: 0 !important;
  width: 100% !important;
  padding: 1.5rem 1rem 28px 1rem !important;
  margin-top: auto !important;
  text-align: center !important;
  background-color: transparent !important;
}

footer.whitestack-footer .whitestack-footer-text,
#whitestack-footer p {
  margin: 0 !important;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.8rem !important;
  font-weight: 400 !important;
  color: var(--bs-gray, #6c757d) !important;
  letter-spacing: 0.01em !important;
  line-height: 1.4 !important;
}

/* Ajuste móvil para que el footer entre sin necesidad de scroll */
@media (max-width: 768px) {
  footer.whitestack-footer,
  #whitestack-footer {
    padding: 0.75rem 1rem 16px 1rem !important;
  }
}

/* ==========================================================================
   11. PÁGINA PRINCIPAL (ÍNDICE DE ENCUESTAS - ESTÉTICA UNIFICADA)
   ========================================================================== */

/* Ocultar logotipo SVG de LimeSurvey y footer comercial */
#surveys-list-jumbotron > div[role="img"],
#surveys-list-jumbotron svg.ls-logo,
footer#surveyListFooter {
  display: none !important;
}

/* Contenedor exterior con el mismo ancho (640px) y alineación superior que el cierre */
body:has(#surveys-list-container) .container-md {
  max-width: 640px !important;
  width: 100% !important;
  padding: 2rem 0.5rem !important;
  margin: 1rem auto !important;
}

/* Anular el margen superior de 50px y el estiramiento vertical de survey-list.css */
#surveys-list-container {
  display: block !important;
  min-height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Tarjeta flotante celeste idéntica a .completed-text y .error-card */
#surveys-list-container > .col-12 {
  background-color: #f3f7fd !important;
  border: 1px solid #dce7f9 !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(46, 98, 255, 0.06) !important;
  padding: 40px 36px !important;
  text-align: center !important;
  width: 100% !important;
  opacity: 0;
  animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Reset del jumbotron interno */
#surveys-list-jumbotron {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center !important;
}

/* Icono circular azul de 42px (mismo diámetro visual que el check y la 'i') */
#surveys-list-jumbotron::before {
  content: "" !important;
  display: block !important;
  width: 42px !important;
  height: 42px !important;
  margin: 0 auto 18px auto !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  background-image: url("data:image/svg+xml,%3Csvg width='42' height='42' viewBox='0 0 42 42' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='21' cy='21' r='21' fill='%232E62FF'/%3E%3Crect x='15' y='14' width='12' height='14' rx='2' stroke='white' stroke-width='2'/%3E%3Cline x1='18' y1='18.5' x2='24' y2='18.5' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='18' y1='21.5' x2='24' y2='21.5' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='18' y1='24.5' x2='21.5' y2='24.5' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

/* Título principal 'Whitestack Surveys' (mismo tamaño que el cierre: 1.85rem) */
#surveys-list-jumbotron span.text-center.h3 {
  font-family: "Source Sans Pro", sans-serif !important;
  font-size: 1.85rem !important;
  font-weight: 700 !important;
  color: var(--bs-dark, #131B4D) !important;
  margin-top: 0 !important;
  margin-bottom: 14px !important;
  line-height: 1.3 !important;
  display: block !important;
}

/* Subtítulo 'Los siguientes formularios están disponibles:' */
#surveys-list-container .survey-list-heading h2 {
  font-family: "Source Sans Pro", sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 400 !important;
  color: var(--bs-dark, #131B4D) !important;
  line-height: 1.55 !important;
  margin-bottom: 14px !important;
}

/* Listado de encuestas públicas (si se habilita alguna en el futuro) */
#surveys-list-container .survey-list {
  margin-top: 8px !important;
}

#surveys-list-container ul.surveys-list {
  margin: 0 !important;
  padding: 0 !important;
}

#surveys-list-container ul.surveys-list:empty {
  display: none !important;
}

#surveys-list-container ul.surveys-list li {
  margin-bottom: 10px !important;
}

#surveys-list-container ul.surveys-list li a {
  display: block !important;
  background-color: #ffffff !important;
  border: 1.5px solid #dce7f9 !important;
  border-radius: 10px !important;
  padding: 12px 20px !important;
  color: #2E62FF !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.2s ease-in-out !important;
}

#surveys-list-container ul.surveys-list li a:hover {
  border-color: #FF8A50 !important;
  color: #FF8A50 !important;
  box-shadow: 0 2px 8px rgba(46, 98, 255, 0.06) !important;
}

/* Bloque inferior de contacto discreto separado por línea sutil */
#surveys-list-container .survey-contact {
  border-top: 1px solid #dce7f9 !important;
  padding-top: 16px !important;
  margin-top: 20px !important;
  font-family: "Source Sans Pro", sans-serif !important;
  font-size: 0.92rem !important;
  color: #64748b !important;
  line-height: 1.5 !important;
}

/* Ajuste móvil */
@media (max-width: 768px) {
  body:has(#surveys-list-container) .container-md {
    padding: 1.5rem 0.5rem !important;
    margin: 0.5rem auto !important;
  }

  #surveys-list-container > .col-12 {
    padding: 32px 22px !important;
    border-radius: 14px !important;
  }

  #surveys-list-jumbotron::before {
    width: 38px !important;
    height: 38px !important;
  }

  #surveys-list-jumbotron span.text-center.h3 {
    font-size: 1.5rem !important;
  }

  #surveys-list-container .survey-list-heading h2 {
    font-size: 1rem !important;
  }
}

/* ==========================================================================
   12. BOTONES DE NAVEGACIÓN (ANULAR DESTELLO VERDE EN CLICK / ACTIVE)
   ========================================================================== */

/* Botón Siguiente / Enviar en azul Whitestack para todos sus estados */
body .btn-primary,
body #ls-button-submit,
body .ls-move-next-btn,
body .ls-move-submit-btn {
  --bs-btn-bg: #2E62FF !important;
  --bs-btn-border-color: #2E62FF !important;
  --bs-btn-hover-bg: #2451D6 !important;
  --bs-btn-hover-border-color: #2451D6 !important;
  --bs-btn-active-bg: #1D44B8 !important;
  --bs-btn-active-border-color: #1D44B8 !important;
  --bs-btn-focus-shadow-rgb: 46, 98, 255 !important;
  background-color: #2E62FF !important;
  border-color: #2E62FF !important;
  color: #ffffff !important;
}

body .btn-primary:hover,
body #ls-button-submit:hover,
body .ls-move-next-btn:hover,
body .ls-move-submit-btn:hover {
  background-color: #2451D6 !important;
  border-color: #2451D6 !important;
  color: #ffffff !important;
}

body .btn-primary:active,
body .btn-primary:focus,
body .btn-primary:focus-visible,
body .btn-primary.active,
body :not(.btn-check) + .btn-primary:active,
body #ls-button-submit:active,
body #ls-button-submit:focus,
body .ls-move-next-btn:active,
body .ls-move-next-btn:focus,
body .ls-move-submit-btn:active,
body .ls-move-submit-btn:focus {
  background-color: #1D44B8 !important;
  border-color: #1D44B8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 0.2rem rgba(46, 98, 255, 0.25) !important;
}

/* Botón Anterior (evitar destello verde al tocar en pantalla táctil) */
body #ls-button-previous:hover,
body #ls-button-previous:active,
body #ls-button-previous:focus,
body .ls-move-previous-btn:hover,
body .ls-move-previous-btn:active,
body .ls-move-previous-btn:focus {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: var(--bs-dark, #131B4D) !important;
  box-shadow: none !important;
}
