
/* Estilos para la visualización de disponibilidad de salas */
.disponibilidad-salas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.sala {
    flex: 1 1 260px;
    max-width: 150px;
    border: 2px solid #048066;
    padding: 10px;
    border-radius: 8px;
    background: #f6fefc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sala h3 {
    margin-top: 0;
    font-size: 18px;
    color: #048066;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.tramo {
    padding: 0px;
    margin: -2px 0;
    border-radius: 4px;
    text-align: center;
}

.tramo-separador {
    font-weight: bold;
    color: #333;
    margin: -2px 0 5px;
    padding: 0px;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    background: #f7f7f7;
    text-align: center;
}

.tramo.libre {
    font-weight: bold;
    background-color: #d7f5ec;
    color: #048066;
    border: 1px solid #a9e7d4;
}

.tramo.ocupado {
    color: #999;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
}

.btn-reservar {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #048066;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-align: center;
    display: block;
    cursor: pointer;
    text-decoration: none;
}

.btn-reservar:hover {
    background-color: #036854;
}

.btn-cancelar {
  background-color: #048066 !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 12px !important;
  border-radius: 4px !important;
  text-align: center !important;
  display: inline-block !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease !important;
}

.btn-cancelar:hover {
  background-color: #036854 !important;
}

body {
  outline: 5px solid red !important;
}

#vista-diaria th {
    text-align: center;
}

#vista-diaria th.centrado {
    text-align: center;
}
#vista-diaria td, #vista-diaria th {
    padding: 4px;
    font-size: 12px;
}
#vista-diaria td.ocupado {
    background-color: #fdd;
    text-align: center;
}
#vista-diaria td.libre {
    background-color: #dfd;
    text-align: center;
}
.selector-disponibilidad-form {
    max-width: 600px;
    margin: 40px auto;
    background: #f6fefc;
    border: 2px solid #048066;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    font-family: sans-serif;
}

.selector-disponibilidad-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.selector-disponibilidad-form select,
.selector-disponibilidad-form input[type="date"] {
    width: 260px;
    padding: 6px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.selector-disponibilidad-form button {
    background-color: #048066;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

.selector-disponibilidad-form button:hover {
    background-color: #036854;
}



.vista-diaria-reservas {
    font-family: Arial, sans-serif;
    font-size: 13px;
}
.vista-diaria-reservas table.compacta {
    border-collapse: collapse;
    width: 100%;
}
.vista-diaria-reservas th, .vista-diaria-reservas td {
    border: 1px solid #ccc;
    padding: 2px 3px;
    line-height: 1.1;
    height: 20px;
}
.vista-diaria-reservas th {
    background: #f4f4f4;
    font-size: 12px;
}
.vista-diaria-reservas td {
    font-size: 12px;
    vertical-align: middle;
}
.vista-diaria-reservas .separador-turno {
    background: #ccc;
    height: 4px;
}
.vista-diaria-reservas a {
    color: #b30000;
    text-decoration: none;
    font-weight: bold;
}
.vista-diaria-reservas a:hover { text-decoration: underline; }
.vista-diaria-reservas .navegacion-dias {
    margin-bottom: 5px;
}
.vista-diaria-reservas .tooltip {
    position: relative;
    display: inline-block;
}
.vista-diaria-reservas .tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 12px;
    line-height: 1.3;
    white-space: pre-line;
}
.vista-diaria-reservas .tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
.vista-diaria-reservas .tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}
/* ===========================
   FORMULARIO DE RESERVA (ajustado)
   =========================== */
.reserva-formulario {
  max-width: 600px;
  margin: 40px auto;
  background: #f6fefc;
  border: 2px solid #048066;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-family: "Segoe UI", Roboto, sans-serif;
}

.reserva-formulario label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  color: #024f3f;
}

.reserva-formulario select,
.reserva-formulario input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: border-color 0.2s ease;
  font-size: 15px;
}

.reserva-formulario select:focus,
.reserva-formulario input[type="text"]:focus {
  border-color: #048066;
  outline: none;
}

/* ========== Botones ========== */
.reserva-formulario button {
  background-color: #048066;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-right: 10px;
}

.reserva-formulario button:hover {
  background-color: #036854;
}

/* ========== Mensajes ========== */
.reserva-ok {
  background: #d1e7dd;
  border: 1px solid #badbcc;
  color: #0f5132;
  padding: 15px;
  border-radius: 8px;
  margin: 20px auto;
  max-width: 600px;
  font-size: 15px;
  line-height: 1.4em;
}

.reserva-error {
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  color: #842029;
  padding: 15px;
  border-radius: 8px;
  margin: 20px auto;
  max-width: 600px;
  font-size: 15px;
  line-height: 1.4em;
}

/* ========== Botón Volver ========== */
.boton-volver {
  background-color: #ccc;
  color: #333 !important;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 6px;
  display: inline-block;
  transition: background-color 0.2s ease;
  font-weight: 500;
}

.boton-volver:hover {
  background-color: #bbb;
}

/* ========== Autocompletado (ajustado) ========== */
.usuarios-multiples {
  position: relative;
}

.campo-usuario {
  display: block;
  position: relative;
  z-index: 1;
}

/* Cada campo tiene su propio contenedor relativo */
.usuarios-multiples > div {
  position: relative;
}

/* Menú de sugerencias */
.suggestions {
  border: 1px solid #ccc;
  max-height: 150px;
  overflow-y: auto;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: white;
  z-index: 10;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border-radius: 0 0 6px 6px;
}

.suggestions div {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4em;
}

.suggestions div:hover {
  background-color: #f0f0f0;
}

/* ========== Título ========== */
h2 {
  text-align: center;
  color: #024f3f;
  font-weight: 600;
  margin-top: 20px;
}

/* Animación sutil */
.reserva-ok, .reserva-error {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================
   EFECTO VISUAL AL LIMPIAR CAMPOS
   ===================================== */
.campo-usuario.limpio-error {
  animation: parpadeoError 0.8s ease;
  border-color: #dc3545 !important;
  background-color: #ffe8e8;
}

/* Animación de parpadeo */
@keyframes parpadeoError {
  0%   { background-color: #ffe8e8; }
  50%  { background-color: #ffffff; }
  100% { background-color: #ffe8e8; }
}

.tabla-reservas table {
    table-layout: fixed;
    width: 100%;
}

.tabla-reservas th,
.tabla-reservas td {
    text-align: center;
}

.tabla-reservas th {
    width: 90px;
}

.vista-diaria-reservas td.celda-reserva {
    overflow: visible;
    position: relative;
}

.vista-diaria-reservas .tooltip {
    position: relative;
    display: block;
    width: 100%;
}

.vista-diaria-reservas .tooltip a,
.vista-diaria-reservas .tooltip .texto-reserva {
    display: block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.boton-deshabilitado {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===========================
   MODAL DATOS TUNEL
   =========================== */
.vista-diaria-reservas .sep-abrir-modal {
    color: #b30000;
    font-weight: bold;
    cursor: pointer;
}

#sep-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
}

#sep-modal-contenido {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 24px 20px 20px;
    width: 420px;
    max-width: 92vw;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    position: fixed;
}

#sep-modal-contenido h3 {
    margin: 0 0 14px;
    color: #024f3f;
    font-size: 15px;
}

#sep-modal-contenido label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 13px;
}

#sep-modal-contenido textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px;
    font-size: 13px;
    resize: vertical;
    font-family: inherit;
}

#sep-modal-contenido input[type="number"] {
    width: 80px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px;
    font-size: 13px;
}

#sep-modal-cerrar {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

#sep-modal-cerrar:hover {
    color: #000;
}

#sep-modal-guardar {
    background-color: #048066;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 4px;
}

#sep-modal-guardar:hover {
    background-color: #036854;
}

#sep-modal-guardar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#sep-modal-error {
    color: #b30000;
    font-size: 13px;
    margin-bottom: 8px;
}