/**
 * Estilos CSS para el Módulo Geográfico DocuJuegos
 * 
 * INTEGRACIÓN COMPLETA desde DocuCensus-Temporal con base en estilos bíblicos
 * Compatible con la arquitectura DocuJuegos manteniendo consistencia visual
 * 
 * @package DocuJuegos
 * @subpackage Modules\Geograficos
 * @version 1.0.0
 */

/* ==========================================================================
   CORRECCIONES DE SCROLL PARA USUARIOS LOGUEADOS
   ========================================================================== */

/* Asegurar que el scroll de la página funcione correctamente cuando hay usuarios logueados */
body.logged-in .docucensus-container {
  position: relative !important;
  z-index: auto !important;
}

/* Prevenir interferencia de elementos fixed cuando el usuario está logueado */
body.logged-in .docubible-confetti-container {
  pointer-events: none !important;
  z-index: 1000 !important;
}

/* Asegurar que elementos sticky no interfieran con el scroll */
body.logged-in .docubible-global-score {
  position: relative !important;
}

/* Corregir posibles problemas con admin bar de WordPress */
body.admin-bar .docucensus-container {
  margin-top: 10px;
}

/* Evitar overflow hidden en containers principales cuando usuario está logueado */
body.logged-in .docucensus-container,
body.logged-in .docucensus-location-selector {
  overflow: visible !important;
}

/* Asegurar scroll suave al botón Start Quiz */
#docucensus-start-quiz-btn {
  scroll-margin-top: 50px;
}

body.logged-in #docucensus-start-quiz-btn {
  scroll-margin-top: 80px; /* Más espacio si hay admin bar */
}

/* ==========================================================================
   ESTILOS BASE INSPIRADOS EN DOCUBIBLE
   ========================================================================== */

/* General DocuCensus Container - Usando base de docubible-trivia */
.docucensus-container {
  max-width: 1000px;
  margin: 0 auto 30px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  position: relative;
}

/* Puntuación acumulada - Inspirado en docubible-time-bar */
.docucensus-score-display {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #fff;
  padding: 12px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 1em;
  border-bottom: 3px solid #3498db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.docucensus-score-label {
  color: #ecf0f1;
  font-size: 1em;
  font-weight: 500;
  margin-right: 12px;
}

.docucensus-score-value {
  background-color: #e74c3c;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.1em;
  min-width: 45px;
  text-align: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
}

.docujuegos-limits-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.docujuegos-limits-display h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.1em;
}

.docujuegos-limits-display ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.docujuegos-limits-display li {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    text-align: center;
    font-size: 0.9em;
}

/* ==========================================================================
   MENSAJES DE ERROR
   ========================================================================== */

.docujuegos-error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.docujuegos-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 10px 0;
}

/* ==========================================================================
   SELECTOR DE UBICACIÓN MEJORADO Y RESPONSIVE
   ========================================================================== */

/* Contenedor principal de selección de ubicación */
.docucensus-location-selector {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.docucensus-location-selector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: -200% 0; }
  50% { background-position: 200% 0; }
}

.docucensus-location-selector:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  border-color: #667eea;
}

/* Selector de año mejorado */
.docucensus-year-selector {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.docucensus-year-selector label {
  font-weight: 700;
  color: #495057;
  font-size: 1em;
  margin-right: 12px;
  display: inline-block;
}

.docucensus-year-selector select {
  padding: 10px 15px;
  border: 2px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  color: #495057;
  font-weight: 500;
  min-width: 120px;
  transition: all 0.2s ease;
}

.docucensus-year-selector select:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ==========================================================================
   LAYOUT HORIZONTAL FORZADO - TODAS LAS OPCIONES EN UNA LÍNEA
   ========================================================================== */

/* Contenedor horizontal principal - FORZAR FLEX EN UNA LÍNEA */
.docucensus-toponym-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  margin-top: 20px !important;
  width: 100% !important;
  justify-content: space-between !important;
  align-items: stretch !important;
  overflow-x: auto !important; /* Scroll horizontal si es necesario */
  min-height: 120px !important;
  box-sizing: border-box !important;
  padding: 0 !important;
}

/* Cada celda de topónimo - TAMAÑOS OPTIMIZADOS Y LEGIBLES */
.docucensus-toponym-cell {
  flex: 0 0 auto !important; /* No flex, tamaño fijo */
  min-width: 140px !important; /* Tamaño base */
  max-width: 160px !important;
  background: white !important;
  border: 2px solid #e9ecef !important;
  border-radius: 8px !important;
  padding: 12px 8px !important;
  text-align: center !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: visible !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  height: auto !important;
}

/* COUNTRY - MÁS ESTRECHO */
.docucensus-toponym-cell:nth-child(1) {
  min-width: 100px !important;
  max-width: 110px !important;
  flex: 0 0 100px !important;
}

/* STATE - Tamaño medio */
.docucensus-toponym-cell:nth-child(2) {
  min-width: 140px !important;
  max-width: 150px !important;
  flex: 0 0 140px !important;
}

/* COUNTY - Tamaño medio */
.docucensus-toponym-cell:nth-child(3) {
  min-width: 140px !important;
  max-width: 150px !important;
  flex: 0 0 140px !important;
}

/* PLACE - Tamaño medio */
.docucensus-toponym-cell:nth-child(4) {
  min-width: 140px !important;
  max-width: 150px !important;
  flex: 0 0 140px !important;
}

/* ZIP - MÁS ESTRECHO */
.docucensus-toponym-cell:nth-child(5) {
  min-width: 90px !important;
  max-width: 100px !important;
  flex: 0 0 90px !important;
}

.docucensus-toponym-cell:hover {
  transform: translateY(-2px) !important;
  border-color: #667eea !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15) !important;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%) !important;
}

/* Labels legibles y bien espaciados */
.docucensus-toponym-cell label {
  font-weight: 600 !important;
  color: #495057 !important;
  cursor: pointer !important;
  display: block !important;
  margin-bottom: 8px !important;
  font-size: 0.9em !important; /* Tamaño legible */
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  transition: color 0.2s ease !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Selectores con tamaño adecuado */
.docucensus-toponym-cell select {
  width: 100% !important;
  padding: 6px 8px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  background: white !important;
  color: #495057 !important;
  font-size: 0.85em !important; /* Tamaño legible */
  font-weight: 400 !important;
  margin-top: 4px !important;
  transition: all 0.2s ease !important;
  min-height: 32px !important;
  box-sizing: border-box !important;
  appearance: menulist !important; /* Mantener estilo nativo */
}

.docucensus-toponym-cell select:focus {
  border-color: #667eea !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.docucensus-toponym-cell select:disabled {
  background-color: #f8f9fa !important;
  color: #6c757d !important;
  cursor: not-allowed !important;
}

/* Contador de docupiezas legible */
.docucensus-remaining-docupiezas {
  font-size: 0.75em !important;
  color: #6c757d !important;
  margin-top: 6px !important;
  font-style: italic !important;
  padding: 4px 6px !important;
  background: #f8f9fa !important;
  border-radius: 12px !important;
  display: inline-block !important;
  border: 1px solid #e9ecef !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

/* Radio buttons mejorados */
.docucensus-toponym-cell input[type="radio"] {
  margin-right: 6px !important;
  transform: scale(1.2) !important;
  accent-color: #667eea !important;
}

/* Country y ZIP MICROSCÓPICOS */
.docucensus-toponym-cell:first-child .docucensus-remaining-docupiezas,
.docucensus-toponym-cell:last-child .docucensus-remaining-docupiezas {
  font-size: 0.35em !important; /* Aún más pequeño */
  padding: 0px !important;
  height: 8px !important;
}

/* Botón Start Quiz mejorado */
#docucensus-start-quiz-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 15px 35px;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  display: block;
  margin: 25px auto 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
  position: relative;
  overflow: hidden;
}

#docucensus-start-quiz-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.5s ease;
}

#docucensus-start-quiz-btn:hover::before {
  width: 300px;
  height: 300px;
}

#docucensus-start-quiz-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
  background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

#docucensus-start-quiz-btn:active {
  transform: translateY(-1px);
}

#docucensus-start-quiz-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   RESPONSIVE DESIGN - MÓVILES (VERTICAL)
   ========================================================================== */

/* ==========================================================================
   RESPONSIVE DESIGN - MANTENER LAYOUT HORIZONTAL EN TODAS LAS PANTALLAS
   ========================================================================== */

/* Pantallas grandes */
@media (min-width: 1200px) {
  /* Country - mantener estrecho */
  .docucensus-toponym-cell:nth-child(1) {
    min-width: 110px !important;
    max-width: 120px !important;
    flex: 0 0 110px !important;
  }
  
  /* State, County, Place - un poco más anchos */
  .docucensus-toponym-cell:nth-child(2),
  .docucensus-toponym-cell:nth-child(3),
  .docucensus-toponym-cell:nth-child(4) {
    min-width: 150px !important;
    max-width: 160px !important;
    flex: 0 0 150px !important;
  }
  
  /* ZIP - mantener estrecho */
  .docucensus-toponym-cell:nth-child(5) {
    min-width: 100px !important;
    max-width: 110px !important;
    flex: 0 0 100px !important;
  }
  
  .docucensus-toponym-cell label {
    font-size: 1em !important;
  }
  
  .docucensus-toponym-cell select {
    font-size: 0.9em !important;
    padding: 8px 10px !important;
  }
}

/* Tablets grandes - mantener anchos específicos */
@media (max-width: 1199px) and (min-width: 992px) {
  /* Country */
  .docucensus-toponym-cell:nth-child(1) {
    min-width: 100px !important;
    max-width: 110px !important;
    flex: 0 0 100px !important;
  }
  
  /* State, County, Place */
  .docucensus-toponym-cell:nth-child(2),
  .docucensus-toponym-cell:nth-child(3),
  .docucensus-toponym-cell:nth-child(4) {
    min-width: 130px !important;
    max-width: 140px !important;
    flex: 0 0 130px !important;
  }
  
  /* ZIP */
  .docucensus-toponym-cell:nth-child(5) {
    min-width: 90px !important;
    max-width: 100px !important;
    flex: 0 0 90px !important;
  }
}

/* Tablets - mantener anchos específicos con scroll */
@media (max-width: 991px) and (min-width: 768px) {
  .docucensus-toponym-row {
    overflow-x: auto !important;
    gap: 6px !important;
  }
  
  /* Country */
  .docucensus-toponym-cell:nth-child(1) {
    min-width: 90px !important;
    max-width: 100px !important;
    flex: 0 0 90px !important;
  }
  
  /* State, County, Place */
  .docucensus-toponym-cell:nth-child(2),
  .docucensus-toponym-cell:nth-child(3),
  .docucensus-toponym-cell:nth-child(4) {
    min-width: 120px !important;
    max-width: 130px !important;
    flex: 0 0 120px !important;
  }
  
  /* ZIP */
  .docucensus-toponym-cell:nth-child(5) {
    min-width: 80px !important;
    max-width: 90px !important;
    flex: 0 0 80px !important;
  }
}

/* Móviles - anchos muy específicos y compactos */
@media (max-width: 767px) {
  .docucensus-location-selector {
    padding: 15px 10px !important;
    margin: 10px 5px !important;
  }
  
  .docucensus-toponym-row {
    /* MANTENER HORIZONTAL INCLUSO EN MÓVILES */
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 4px !important;
    padding: 0 5px !important;
  }
  
  /* Country - muy estrecho en móviles */
  .docucensus-toponym-cell:nth-child(1) {
    min-width: 70px !important;
    max-width: 80px !important;
    flex: 0 0 70px !important;
    padding: 8px 4px !important;
  }
  
  /* State, County, Place - compactos */
  .docucensus-toponym-cell:nth-child(2),
  .docucensus-toponym-cell:nth-child(3),
  .docucensus-toponym-cell:nth-child(4) {
    min-width: 100px !important;
    max-width: 110px !important;
    flex: 0 0 100px !important;
    padding: 8px 4px !important;
  }
  
  /* ZIP - muy estrecho en móviles */
  .docucensus-toponym-cell:nth-child(5) {
    min-width: 65px !important;
    max-width: 75px !important;
    flex: 0 0 65px !important;
    padding: 8px 4px !important;
  }
  
  .docucensus-toponym-cell label {
    font-size: 0.7em !important;
  }
  
  .docucensus-toponym-cell select {
    font-size: 0.7em !important;
    padding: 2px 4px !important;
  }
  
  .docucensus-remaining-docupiezas {
    font-size: 0.6em !important;
  }
}

.docucensus-year-selector {
    padding: 12px;
    text-align: center;
  }
  
  .docucensus-year-selector label {
    display: block;
    margin-bottom: 8px;
    margin-right: 0;
  }
  
  .docucensus-year-selector select {
    width: 100%;
    max-width: 200px;
  }
  
  #docucensus-start-quiz-btn {
    padding: 12px 25px;
    font-size: 1em;
    margin: 20px auto 0;
  }
}

/* Móviles muy pequeños */
@media (max-width: 480px) {
  .docucensus-location-selector {
    padding: 15px 10px;
    margin: 10px 5px;
  }
  
  .docucensus-toponym-cell {
    padding: 12px;
  }
  
  .docucensus-toponym-cell label {
    font-size: 0.9em;
  }
  
  .docucensus-remaining-docupiezas {
    font-size: 0.7em;
  }
}

/* ==========================================================================
   ANIMACIONES Y EFECTOS ADICIONALES
   ========================================================================== */

/* Efecto de carga para selectores */
.docucensus-toponym-cell select.loading {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23667eea"><circle cx="12" cy="12" r="10" stroke="%23667eea" stroke-width="2" fill="none" stroke-dasharray="31.416" stroke-dashoffset="31.416"><animate attributeName="stroke-dasharray" dur="2s" values="0 31.416;15.708 15.708;0 31.416" repeatCount="indefinite"/><animate attributeName="stroke-dashoffset" dur="2s" values="0;-15.708;-31.416" repeatCount="indefinite"/></circle></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

/* Efecto de pulsación para elementos activos */
.docucensus-toponym-cell input[type="radio"]:checked + span {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Efecto de deslizamiento suave */
.docucensus-location-selector * {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   FORMULARIO DE SELECCIÓN DE UBICACIÓN
   ========================================================================== */

.docujuegos-location-form {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.docujuegos-location-form h3 {
    margin: 0 0 20px 0;
    color: #495057;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.form-group select,
.form-group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group select:focus,
.form-group input[type="text"]:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* ==========================================================================
   BOTONES
   ========================================================================== */

.docujuegos-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    margin: 20px auto 0;
}

.docujuegos-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.docujuegos-btn-primary:active {
    transform: translateY(0);
}

/* ==========================================================================
   QUIZ ACTIVO
   ========================================================================== */

.docujuegos-active-quiz {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.docujuegos-active-quiz h3 {
    margin: 0 0 20px 0;
    color: #495057;
    text-align: center;
    font-size: 1.4em;
}

.docujuegos-question h4 {
    color: #343a40;
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.question-text {
    font-size: 1.1em;
    color: #495057;
    margin-bottom: 20px;
    font-weight: 500;
}

.answer-input {
    margin-bottom: 15px;
}

.answer-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.answer-input input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.answer-input input[type="text"]:focus {
    border-color: #667eea;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.quiz-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.quiz-footer small {
    color: #6c757d;
    font-style: italic;
}

/* ==========================================================================
   RESULTADOS DEL QUIZ
   ========================================================================== */

.quiz-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
}

.quiz-result.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.quiz-result.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.quiz-result h4 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
}

.quiz-result p {
    margin: 5px 0;
    font-size: 1.1em;
}

/* ==========================================================================
   PATROCINADORES
   ========================================================================== */

.docujuegos-sponsors-display {
    margin: 30px 0 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.sponsors-title {
    text-align: center;
    margin-bottom: 20px;
    color: #495057;
    font-size: 1.3em;
    font-weight: 600;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.sponsor-item {
    background: white;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.sponsor-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sponsor-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.sponsor-logo {
    margin-bottom: 10px;
}

.sponsor-image {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

.sponsor-name {
    margin: 10px 0 5px 0;
    font-size: 1em;
    color: #495057;
    font-weight: 600;
}

.location-info {
    color: #6c757d;
    font-style: italic;
    font-size: 0.85em;
}

.sponsors-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.no-sponsors {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
    font-style: italic;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .docujuegos-census-quiz {
        margin: 10px;
        padding: 15px;
    }
    
    .docujuegos-limits-display ul {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sponsors-grid {
        grid-template-columns: 1fr;
    }
    
    .docujuegos-btn-primary {
        width: 100%;
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .docujuegos-limits-display ul {
        grid-template-columns: 1fr;
    }
    
    .docujuegos-points-display h3 {
        font-size: 1.1em;
    }
    
    .docujuegos-active-quiz {
        padding: 15px;
    }
}

/* ==========================================================================
   LOADING Y ESTADOS
   ========================================================================== */

.docujuegos-loading {
    text-align: center;
    padding: 20px;
}

.docujuegos-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   COMPATIBILIDAD CON TEMAS DE WORDPRESS
   ========================================================================== */

.docujuegos-census-quiz * {
    box-sizing: border-box;
}

.docujuegos-census-quiz .form-group select,
.docujuegos-census-quiz .form-group input {
    max-width: 100%;
}

/* Prevenir conflictos con temas */
.docujuegos-census-quiz h1,
.docujuegos-census-quiz h2,
.docujuegos-census-quiz h3,
.docujuegos-census-quiz h4,
.docujuegos-census-quiz h5,
.docujuegos-census-quiz h6 {
    line-height: 1.4;
}

.docujuegos-census-quiz p {
    line-height: 1.6;
}

.docujuegos-census-quiz ul {
    list-style: none;
}

.docujuegos-census-quiz a {
    text-decoration: none;
}

.docujuegos-census-quiz a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   FORZAR LAYOUT HORIZONTAL DEFINITIVO - REGLA SUPREMA
   ========================================================================== */

/* REGLA SUPREMA - ANULA CUALQUIER OTRA REGLA CSS */
.docucensus-location-selector .docucensus-toponym-row,
.docucensus-container .docucensus-toponym-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  margin: 15px 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* CADA CELDA DEBE MANTENER PROPORCIONES HORIZONTALES */
.docucensus-location-selector .docucensus-toponym-cell,
.docucensus-container .docucensus-toponym-cell {
  flex: 1 1 auto !important;
  min-width: 150px !important;
  max-width: none !important;
  width: auto !important;
  height: auto !important;
  flex-shrink: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
}

/* NUNCA PERMITIR GRID O COLUMN LAYOUT */
.docucensus-toponym-row {
  display: flex !important; /* SIEMPRE FLEX */
  grid-template-columns: none !important; /* NUNCA GRID */
  columns: none !important; /* NUNCA COLUMNS */
}

/* SCROLL HORIZONTAL VISIBLE EN DISPOSITIVOS PEQUEÑOS */
@media (max-width: 800px) {
  .docucensus-toponym-row {
    gap: 6px !important;
  }
  
  .docucensus-toponym-row::-webkit-scrollbar {
    height: 8px !important;
  }
  
  .docucensus-toponym-row::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 4px !important;
  }
  
  .docucensus-toponym-row::-webkit-scrollbar-thumb {
    background: #c1c1c1 !important;
    border-radius: 4px !important;
  }
  
  .docucensus-toponym-row::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8 !important;
  }
}

/* ==========================================================================
   ESTILOS COMPLETOS DE LA DOCUPIEZA - RESTAURADOS
   ========================================================================== */

/* Quiz container */
.docucensus-quiz-container {
  margin-top: 30px;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background-color: #f0f8ff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Timer bar con colores apropiados */
.docucensus-timer-bar {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #fff;
  padding: 12px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 1em;
  border-bottom: 3px solid #3498db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.docucensus-timer {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

#docucensus-timer-value {
  background-color: #e74c3c;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.1em;
  min-width: 45px;
  text-align: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Quiz info */
.docucensus-quiz-info {
  padding: 15px 20px;
  background-color: #e8f4fd;
  border-bottom: 1px solid #ddd;
}

.docucensus-info-row {
  margin-bottom: 8px;
  color: #1976d2;
  font-weight: 500;
}

/* Quiz content */
.docucensus-quiz-content {
  display: flex;
  min-height: 400px;
}

.docucensus-question-column {
  flex: 1;
  padding: 30px;
  background-color: #f8f9fa;
  border-right: 3px solid #ddd;
}

.docucensus-solution-column {
  flex: 1;
  padding: 30px;
  background-color: white;
}

.docucensus-question-column h3,
.docucensus-solution-column h3 {
  color: #3f51b5;
  font-size: 1.5em;
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
}

.docucensus-question-text {
  font-size: 1.3em;
  color: #333;
  text-align: center;
  margin-top: 50px;
  font-weight: 500;
  line-height: 1.4;
}

/* Quiz options */
.docucensus-option {
  display: block;
  padding: 15px;
  margin: 10px 0;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #fff;
}

.docucensus-option:hover {
  background-color: #f0f8ff;
  border-color: #3f51b5;
  transform: translateX(5px);
}

.docucensus-option input[type="radio"] {
  margin-right: 10px;
  transform: scale(1.2);
}

.docucensus-option-text {
  font-size: 1.1em;
  font-weight: 500;
}

.docucensus-correct {
  background-color: #90ee90 !important;
  border-color: #4caf50 !important;
  animation: pulse-success 0.6s ease;
}

.docucensus-incorrect {
  background-color: #ffb6c1 !important;
  border-color: #f44336 !important;
  animation: shake 0.5s ease;
}

@keyframes pulse-success {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Navigation buttons */
.docucensus-nav-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #ddd;
  flex-wrap: wrap;
}

.docucensus-nav-buttons button {
  padding: 12px 20px;
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.docucensus-nav-buttons button:hover {
  background: linear-gradient(135deg, #5a6268, #495057);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#docucensus-evaluate-btn {
  background: linear-gradient(135deg, #28a745, #20c997) !important;
}

#docucensus-evaluate-btn:hover {
  background: linear-gradient(135deg, #20c997, #17a2b8) !important;
}

/* Footer */
.docucensus-footer {
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #ddd;
  text-align: center;
}

.docucensus-footer a {
  color: #1976d2;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9em;
}

.docucensus-footer a:hover {
  text-decoration: underline;
}

/* Sponsors section */
.docucensus-sponsors {
  padding: 20px;
  background-color: white;
  border-top: 1px solid #ddd;
}

.docucensus-sponsors h3 {
  color: #3f51b5;
  text-align: center;
  margin-bottom: 15px;
  font-size: 1.3em;
}

.docucensus-sponsors-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.docucensus-sponsor {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
}

.docucensus-sponsor:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.docucensus-sponsor-logo {
  width: 60px;
  height: 60px;
  margin-right: 15px;
  object-fit: contain;
}

.docucensus-sponsor-info h4 {
  margin: 0 0 5px 0;
  color: #333;
  font-size: 1.1em;
}

.docucensus-sponsor-info p {
  margin: 0 0 8px 0;
  color: #666;
  font-size: 0.9em;
}

.docucensus-sponsor-info a {
  color: #1976d2;
  text-decoration: none;
  font-size: 0.85em;
}

/* Responsive para docupieza */
@media (max-width: 768px) {
  .docucensus-quiz-content {
    flex-direction: column;
  }
  
  .docucensus-question-column {
    border-right: none;
    border-bottom: 3px solid #ddd;
  }
  
  .docucensus-nav-buttons {
    flex-direction: column;
  }
  
  .docucensus-nav-buttons button {
    width: 100%;
    margin: 5px 0;
  }
  
  .docucensus-sponsors-list {
    grid-template-columns: 1fr;
  }
}