/* Titiriteros – Calendario de espectáculos
 * Estilos basados en css/main.css del sitio original (sección CALENDARIO). */

@font-face {
  font-family: "Neutra Display";
  src:
    url("fonts/NeutraDisp-Titling.woff") format("woff"),
    url("fonts/NeutraDisp-Titling.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Neutra Display Bold";
  src: url("fonts/Neutra-Display-Bold.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

.tcal-wrap {
  background: #f1f0eb;
  padding: 20px;
  color: #5a5748;
  box-sizing: border-box;
}
.tcal-wrap *,
.tcal-wrap *::before,
.tcal-wrap *::after {
  box-sizing: border-box;
}

/* Cabecera (mes y navegación) */
.tcal-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;

  color: #fff;
  padding: 8px 0;
  margin-bottom: 20px;
  font-family: "Neutra Display";
  font-size: 22px;
  font-weight: lighter;
  text-transform: uppercase;
}
.tcal-mes {
  flex: 1;
  text-align: center;
  background: #5a5748;
  padding: 10px;
  max-width: 400px;
}
.tcal-nav {
  background: none;
  border: 0;
  color: #5a5748;
  font-size: 50px;
  line-height: 1;
  padding: 0 14px;
  cursor: pointer;
}
.tcal-nav:hover,
.tcal-nav:focus {
  color: #d2021c;
  outline: none;
}

/* Tabla */
.tcal-tabla {
  width: 100%;
  border: 1px solid #5a5748;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}
.tcal-tabla th {
  background: #5a5748;
  color: #fff;
  text-transform: uppercase;
  font-weight: normal;
  text-align: center;
  padding: 3px 0;
  border: 1px solid #5a5748;
  font-family: "Neutra Display";
}
.tcal-tabla td {
  border: 1px solid #5a5748;
  text-align: right;
  height: 100px;
  width: 14.27%;
  padding: 2px 4px;
  vertical-align: top;
  font-family: "Neutra Display";
  position: relative;
  overflow: hidden;
  background: #f1f0eb;
}

.tcal-num {
  display: block;
  font-size: 14px;
  color: #5a5748;
}

/* Evento dentro de la celda: imagen + ciudad */
.tcal-evento {
  display: block;
  width: 100%;
  margin: 2px 0 0;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.tcal-evento:focus {
  outline: 2px solid #d2021c;
  outline-offset: -2px;
}
.tcal-descripcion {
  display: flex;
  align-items: center;
  width: 100%;
  color: #d2021c;
  text-transform: uppercase;
  font-size: 16px;
  line-height: 1.2;
  background: none !important;
}
.tcal-descripcion:hover {
  background: none !important;
}
.tcal-descripcion .tcal-img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  margin-right: 5px;
  flex-shrink: 0;
}
.tcal-ciudad {
  overflow-wrap: anywhere;
}

/* Lista de eventos (solo móvil, bajo el calendario) */
.tcal-lista {
  display: none;
}
.tcal-lista-dia {
  margin-top: 12px;
}
.tcal-lista-fecha {
  background: #5a5748;
  font-size: 18px;
  color: #fff;
  text-transform: uppercase;
  padding: 5px;
  text-align: center;
  font-family: "Neutra Display";
}
.tcal-lista .tcal-evento {
  padding: 6px 4px;
  border-bottom: 1px solid #ddd;
}
.tcal-lista .tcal-titulo {
  display: block;
  color: #d2021c;
  text-transform: uppercase;
  font-size: 16px;
  font-family: "Neutra Display";
}
.tcal-lista .tcal-hora,
.tcal-lista .tcal-ciudad-lista {
  display: block;
  text-transform: uppercase;
  font-size: 15px;
  color: #000;
}
.tcal-sin-eventos {
  text-align: center;
  padding: 20px 0;
}

/* Móvil: como el original, celdas sin imagen y con un punto rojo en los días con evento */
@media (max-width: 767px) {
  .tcal-wrap {
    padding: 0;
    background: none;
  }
  .tcal-cabecera {
    font-size: 14px;
    padding: 5px 10px;
    margin-bottom: 10px;
  }
  .tcal-nav {
    font-size: 26px;
  }

  .tcal-tabla {
    border: 0;
    border-collapse: separate;
    border-spacing: 6px;
    background: none;
  }
  .tcal-tabla th {
    background: none;
    color: #5a5748;
    font-size: 0;
    border: 0;
  }
  .tcal-tabla td {
    width: auto;
    height: auto;
    background: #f1f0eb;
    border: none;
    text-align: center;
    font-size: 16px;
    color: #000;
    padding: 6px 2px;
  }
  .tcal-tabla td .tcal-evento {
    display: none;
  }
  .tcal-tabla td.tcal-tiene-evento::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: #d2021c;
    bottom: -4px;
    right: 0;
  }
  .tcal-tabla td.tcal-vacio::after {
    content: none;
  }

  .tcal-lista {
    display: block;
    padding: 0 6px;
  }
}

/* Modal de detalle (estilos del .modal-calendario original) */
.tcal-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 99999;
}
.tcal-modal[hidden] {
  display: none;
}
.tcal-modal-caja {
  position: relative;
  background: #fff;
  width: 18%;
  min-width: 260px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 20px 20px;
  border-radius: 0;
}
.tcal-modal-cerrar {
  position: absolute;
  top: 4px;
  right: 8px;
  background: none;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: #5a5748 !important;
  background: none !important;
  cursor: pointer;
}
.tcal-detalle[hidden] {
  display: none;
}
.tcal-detalle img {
  margin: 10px 0;
  display: block;
  max-width: 100%;
  height: auto;
}
.tcal-detalle h1 {
  color: #d2021c;
  font-weight: bold;
  font-size: 19px;
  font-family: "Neutra Display";
  line-height: normal;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.tcal-detalle .tcal-etiqueta {
  display: block;
  text-transform: uppercase;
  color: #5a5748;
  font-weight: bold;
  margin-top: 15px;
  font-size: 12px;
}
.tcal-detalle .texto {
  display: block;
  margin-bottom: 4px;
  color: #000;
  font-size: 18px;
  font-family: "Neutra Display";
  text-transform: uppercase;
}
.tcal-detalle-enlace {
  display: inline-block;
  margin-top: 12px;
  color: #d2021c;
  font-weight: bold;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .tcal-modal-caja {
    width: 17%;
    min-width: 260px;
  }
}
