/* =========================================================
   ESTILO CUSTOM — UNIMAYOR / Google Forms Style (Responsive ancho)
   ========================================================= */

/* =========== Variables básicas ============ */
:root {
  --azul-institucional: #004884;
  --gris-suave: #e0e0e0;
  --texto-principal: #202124;
  --texto-secundario: #444;
  --borde-claro: #eee;
  --fondo-footer: #fafafa;
  --resalte: #1a73e8;
}

/* ==================== CONTENEDOR PRINCIPAL ==================== */
.outerframe-container,
.outer-frame,
#outerframeContainer {
  max-width: 1200px !important; /* más ancho para matrices */
  margin: 0 auto !important;
  padding: 2rem 2.5rem !important;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

/* =================== Título encuesta ==================== */
h1#survey-name,
h1.survey-name,
.survey-name,
.large-heading {
  font-size: 1.15rem !important;
  font-weight: 600;
  color: var(--azul-institucional);
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.25;
  letter-spacing: 0.2px;
}

/* Descripción de la encuesta */
#survey-description,
.survey-description {
  font-size: 1rem;
  color: var(--texto-secundario);
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* =================== Grupo de preguntas ==================== */
.group-title,
div.group-title,
h2.group-title,
.group-name {
  font-size: 1.15rem !important;
  font-weight: 500;
  color: var(--azul-institucional);
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--gris-suave);
  line-height: 1.3;
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.group-title::before {
  content: "▰";
  font-size: 0.9rem;
  color: var(--azul-institucional);
}

.group-description {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* =================== Preguntas y etiquetas ==================== */
.question-container {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--borde-claro);
}

label.ls-label-question,
.question-title {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.35rem;
  display: block;
  color: var(--texto-principal);
}

/* =================== Tablas tipo matriz ==================== */
.question-container table,
.ls-answers table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
  overflow-x: auto;
  display: block;
}

.ls-answers thead th {
  background-color: var(--azul-institucional);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem;
  text-align: center;
  white-space: nowrap;
}

.ls-answers td,
.ls-answers th {
  border: 1px solid #d0d7e2;
  padding: 0.6rem 0.5rem;
  text-align: center;
  font-size: 0.95rem;
}

.ls-answers tr:nth-child(even) {
  background-color: #f8f9fb;
}

/* Scroll horizontal suave */
.question-container::-webkit-scrollbar {
  height: 8px;
}
.question-container::-webkit-scrollbar-thumb {
  background: #b5c4d8;
  border-radius: 4px;
}
.question-container::-webkit-scrollbar-thumb:hover {
  background: #99afc8;
}

/* =================== Radios y checkboxes ==================== */
.form-check {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.form-check input[type="radio"],
.form-check input[type="checkbox"] {
  margin-right: 0.6rem;
  transform: scale(1.2);
}

/* =================== Campos de entrada ==================== */
.form-control,
input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
  border-radius: 6px;
  border: 1px solid #ccc;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--azul-institucional);
  box-shadow: 0 0 0 2px rgba(0, 72, 132, 0.2);
  outline: none;
}

/* =================== Botones ==================== */
.btn-primary,
.btn-default,
.btn,
.ls-button {
  background-color: var(--azul-institucional);
  border-color: var(--azul-institucional);
  color: #fff;
  padding: 0.6rem 1.3rem;
  font-size: 0.95rem;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn:hover,
.btn:focus,
.btn:active {
  background-color: #003766;
  border-color: #00335c;
  color: #fff;
}

/* =================== Checkbox institucional ==================== */
label.datasecurity-checkbox-label {
  color: var(--azul-institucional) !important;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

input[type="checkbox"]#datasecurity_accepted {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--azul-institucional);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  background-color: #fff;
}

input[type="checkbox"]#datasecurity_accepted:checked {
  background-color: var(--azul-institucional);
  border-color: var(--azul-institucional);
}

input[type="checkbox"]#datasecurity_accepted:checked::after {
  content: '✔';
  position: absolute;
  color: white;
  font-size: 14px;
  left: 4px;
  top: 0;
  font-weight: bold;
}

/* =================== Footer institucional ==================== */
footer {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
  border-top: 1px solid #ddd;
  background: var(--fondo-footer);
}

/* =================== Barra de progreso ==================== */
.progress-bar {
  background-color: var(--azul-institucional) !important;
  transition: width 0.4s ease;
}

/* =================== Responsividad ==================== */
@media (max-width: 992px) {
  .outerframe-container,
  .outer-frame,
  #outerframeContainer {
    max-width: 95%;
    padding: 1.5rem;
  }
  .ls-answers table {
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  th, td {
    font-size: 0.85rem;
    padding: 0.4rem;
  }
  .outerframe-container {
    padding: 1rem;
  }
  h1#survey-name {
    font-size: 1rem !important;
  }
}

/* =================== Encuesta expirada (versión GOV.CO) =================== */
.survey-closed {
  background-color: #f4f7fb;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.survey-closed-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 1100px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 40px;
}
.survey-closed-text {
  flex: 1 1 520px;
  padding-right: 24px;
}
.survey-closed-text h1 {
  color: #004884;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0 0 12px;
}
.survey-closed-text p {
  color: #202124;
  font-size: 1rem;
  line-height: 1.6;
}
.survey-closed-contact {
  margin-top: 1.2rem;
  padding: 12px 16px;
  background: #eeeff7;
  border-left: 5px solid #004884;
  border-radius: 6px;
}
.survey-closed-contact a {
  color: #004884;
  text-decoration: none;
  font-weight: 500;
}
.survey-closed-img {
  flex: 1 1 360px;
  text-align: center;
}
.survey-closed-img img {
  max-width: 340px;
  height: auto;
}
@media (max-width: 768px) {
  .survey-closed-card {
    flex-direction: column;
    text-align: center;
    padding: 30px 24px;
  }
  .survey-closed-text {
    padding: 0;
  }
  .survey-closed-img img {
    margin-top: 24px;
    max-width: 260px;
  }
}
