/* ===================================
   BARRA DE PROGRESO Y TIMER
   =================================== */

.question-timer-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  /* Fijo en la esquina superior derecha */
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9900;
  min-width: 220px;
  max-width: 280px;
  user-select: none;
}

/* Barra de arrastre */
.timer-drag-handle {
  width: 100%;
  padding: 5px 0 4px;
  background: #c1272d;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #c1272d;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.timer-drag-handle:hover {
  background: #c1272d;
  opacity: 0.9;
}

.question-timer-container.is-dragging .timer-drag-handle {
  cursor: grabbing;
  background: #c1272d;
}

.timer-drag-grip {
  font-size: 16px;
  color: #FFF;
  line-height: 1;
}

/* Fila interna: label + reloj */
.question-timer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  gap: 16px;
}
.question-timer-label {
  font-weight: 600;
  color: #495057;
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.question-timer {
  font-size: 28px;
  font-weight: bold;
  color: #495057;
  font-family: 'Courier New', monospace;
  display: inline-block;
}

.question-timer.timer-warning {
  color: #ff9800;
  animation: timer-blink 1s infinite;
}

.question-timer.timer-expired {
  color: #dc3545;
  animation: timer-blink 0.5s infinite;
}

@keyframes timer-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.timer-expired-message {
  background: linear-gradient(135deg, #fff3cd 0%, #fffbea 100%);
  border-left: 4px solid #ff9800;
  border-radius: 4px;
  color: #856404;
  padding: 16px 20px;
  margin-bottom: 25px;
  text-align: center;
  font-weight: 500;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
  .question-timer-container {
    top: auto;
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
    min-width: 0;
    flex-direction: row;
    gap: 0;
  }
}

@media (max-width: 480px) {
  .question-timer-container {
    padding: 10px 14px;
  }
}
