/* =========================
   CONFIGURACIÓN GLOBAL
========================= */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Quita el flash azul */
}

html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  margin: 0 auto;
  padding: 12px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #ffffff;
  user-select: none;

}

/* =========================
   INPUTS Y BOTONES
========================= */
input,
button,
select,
textarea {
  font-size: 16px; /* Evita zoom en iOS */
  border-radius: 8px;
  touch-action: manipulation;
  -webkit-appearance: none;
}

/* Área táctil mínima recomendada */
button,
.save-button,
.button-group button {
  min-width: 44px;
  min-height: 44px;
}

/* Botones principales */
button[type="button"],
.save-button {
  background: #007BFF;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s ease, background 0.2s ease;
}

/* Feedback táctil */
button:active {
  transform: scale(0.96);
}

button:hover {
  background: #0056b3;
}

/* Botones +/- */
.button-group button {
  width: 52px;
  height: 52px;
  padding: 0;
  font-size: 16px;
  font-weight: bold;
}

/* Inputs numéricos */
input[type="number"],
input[type="text"],
input[type="date"],
input[type="time"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #ccc;
}

#resetAuditorio {
  background: #fd7e14; color: white; border: none;
  border-radius: 8px; padding: 8px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; min-height: 44px;
  transition: background 0.2s ease, transform 0.1s ease;
}
#resetAuditorio:hover { background: #e06b00; }
#resetAuditorio:active { transform: scale(0.96); }

.auditorio-header {
  display: flex; align-items: center;
  justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px;
}

/* =========================
   TABLAS
========================= */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: white;
  overflow: hidden;
}

th,
td {
  border: 1px solid #ddd;
  padding: 4px;
  text-align: center;
}

th {
  background: #3496ff;
  color: white;
}

/* Scroll horizontal en móviles */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* =========================
   SECCIONES
========================= */
/* Encabezado del parqueadero */
.park-header {
  text-align: center;
  margin-bottom: 15px;
}

.park-icon {
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto 10px auto;
}

.content {
  display: none;
  padding: 10px 0;
}

.content.active {
  display: block;
}

/* =========================
   MENÚ
========================= */
.menu {
  position: sticky;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px;
  border-top: 1px solid #ddd;
  z-index: 999;
}

.inicio {
  margin: 3%;
  background: #28a745;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s ease, background 0.2s ease;
}

.menu button {
  padding: 10px 4px;
  font-size: 12px;
  background: #007BFF;
  color: white;
  border: none;
}

/* Botón de la pestaña seleccionada */
.menu button.active {
  background: #28a745;   /* Verde */
  color: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
}

/* Feedback táctil */
.menu button:active {
  transform: scale(0.96);
}

/* =========================
   MODAL
========================= */
#infoModal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
}

.modal-content {
  width: 100%;
  max-width: 400px;
  background: #007BFF;
  color: white;
  border: none;
  border-radius: 16px;
  padding: 20px;
}

/* =========================
   RESUMEN EN COLUMNAS
========================= */
.containerSumary {
  display: flex;  
  gap: 12px;
}

.details {
  flex: 1;
}

/* =========================
   MÓVILES
========================= */
@media (max-width: 768px) {
  body {
    margin-bottom: 14%;
    padding: 6%;
    margin: 6%;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }

  .menu {
    position: fixed;
    grid-template-columns: repeat(5, 1fr);
  }

  .menu button {
    font-size: 14px;
    min-height: 48px;
  }

  .button-group button {
    width: 56px;
    height: 56px;
    font-size: 16px;
  }

  table {
    font-size: 14px;
  }
    .park-icon {
    width: 200px;
  }

  .park-header h2 {
    font-size: 1.3rem;
  }
}

/* =========================
   AUDITORIO
========================= */
.auditorioTable td {
  padding: 2px;
  min-width: 28px;
  min-height: 28px;
}

.auditorioTable td svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .auditorioTable td svg {
    width: 20px;
    height: 20px;
  }
}
/* Iconos de la leyenda */
.legend-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  vertical-align: middle;
}

.legend-icon svg {
  width: 100%;
  height: 100%;
}

/* Usa los mismos colores que las butacas */
.legend-icon.available svg {
  fill: #28a745; /* Verde */
}

.legend-icon.occupied svg {
  fill: #dc3545; /* Rojo */
}

/* Alineación del contador */
.counter p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 6px 0;
}
/* Estados */
.available svg { fill: #28a745; }
.occupied svg { fill: #dc3545; }
.unavailable svg { fill: #6c757d; }