/* Reset básico - los estilos temáticos se manejan en los archivos de tema */
body {
  margin: 0;
  padding: 0;
  min-width: 320px;
  min-height: 100vh;
}

/* Fuente base - los temas pueden sobrescribir esto */
:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Global styles only for admin/backend */
.app {
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#root {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Frontend styles are handled by theme.css */

/* Base Button Styles */
.btn {
  border: solid;
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Button Color Variants */
.btn-primary {
  background-color: #4CAF50;
  color: white;
}

.btn-primary:hover {
  background-color: #45a049;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-secondary {
  background-color: #2196F3;
  color: white;
}

.btn-secondary:hover {
  background-color: #0b7dda;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-tertiary {
  background-color: #9C27B0;
  color: white;
}

.btn-tertiary:hover {
  background-color: #7b1fa2;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.header-container {
  background-color: #eb512a;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 48px;
  padding: 8px 16px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.app-title {
  font-size: 18px;
  color: #ffffff;
  margin: 0;
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
  padding: 0 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .header-container {
    min-height: 42px;
    padding: 8px 12px;
    justify-content: center;
  }

  .app-title {
    font-size: 16px;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  .header-container {
    min-height: 38px;
    padding: 6px 10px;
  }

  .app-title {
    font-size: 14px;
    line-height: 1.3;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  .header-container {
    min-height: 36px;
    padding: 6px 8px;
  }

  .app-title {
    font-size: 13px;
    line-height: 1.3;
  }
}

/* About button styles */
.about-btn {
  position: absolute;
  right: 12px;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 6px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .about-btn {
    right: 10px;
    padding: 4px 10px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .about-btn {
    right: 8px;
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
  }
}

.buttons-container {
  display: flex;
  gap: 16px;
  margin: 0 16px 16px 16px;
  align-items: flex-start;
}

.buttons-container > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.buttons-container .btn-danger {
  margin-left: auto;
  align-self: flex-start;
}

/* Admin buttons container specific styles */
.admin-buttons-container {
  margin-bottom: 8px !important;
}

.loading {
  text-align: center;
  padding: 20px;
  font-size: 1.2rem;
  color: #666;
}

.time-container {
  display: inline-block;
}

.blinking-colon {
  animation: blink 1s infinite;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: auto;              /* Se ajusta al contenido */
  min-width: 300px;         /* Ancho mínimo para que no se vea muy estrecho */
  max-width: 400px;         /* Ancho máximo para que no ocupe toda la pantalla */
}

.btn-active {
  background-color: #007bff;
  color: white;
  border-bottom: 4px solid #0056b3;
  text-decoration: underline;
}
