/* style-calendario.css
======== Estilos generales ======== */
html, body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
}
body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background-color: #f2f2f2;
  color: #333;
  line-height: 1.6;
}
.calendar{
    max-width:720px;
    min-width:300px;
}

.layout{
    max-width:1200px;
    margin:auto;
}
/* ======== HEADER ======== */
.header {
  background: #08163b;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 100px;
  height: auto;
  background: white;
  border: 4px solid #efefef;
  border-radius: 10px;
}

.logo h1 {
  font-size: 1.2rem;
  font-weight: 600;
}

/* ======== Menú principal ======== */
.menu {
  display: flex;
  gap: 20px;
}
.menu-auth {
  display: flex;
  gap: 20px;
}
.menu a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.menu a:hover {
  color: #00c3ff;
}

.menu-btn {
  display: none;
  font-size: 28px;
  background: transparent !important;
  border: none;
  color: white;
  cursor: pointer;
}
.btn {
  display: inline-block;
  background-color: #0a1a44;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #142b70;
}
/* ======== CALENDARIO ======== */
.calendar-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10px 10px;
}

.calendar {
  background: white;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  max-width: 700px;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #0a1a44;
  color: white;
  border-radius: 10px;
  padding: 10px;
}

.calendar-header button {
  background: white; /*#00c3ff;*/
  border: none;
  color: #0a1a44;
  font-size: 1.2rem;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.3s;
  box-sizing: border-box;
}

.calendar-header button:hover {
  background: #636A82;
}
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: #0a1a44;
}
.weekdays div {
    padding: 6px 0;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(30px, 1fr);   
  text-align: center;
  margin-top: 15px;
  gap: 5px;
  box-sizing: border-box;
}

.calendar-grid div {
  box-sizing: border-box;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio:auto;
  width:100%;
  height:auto;
  border: 1px solid transparent;
}

.calendar-grid div:hover {
  /*background: #8CD3FF;*/
  border-color: #0a1a44;
}

.calendar-grid .today {
 /* background: #007bff; #00c3ff;
  color: white;*/
  font-weight: bold;
  border: 3px solid #8094AC;
  border-radius: 8px;
    box-shadow: 0 0 12px rgba(111, 132, 192, 0.7);
}
.selected-day{
    box-sizing: border-box;
    border: 4px solid #8094AC;
    box-shadow: inset 0 0 0 3px #8094AC ;
}
/* =====================
   EVENTOS DEL DÍA
===================== */
#eventosDiaPanel{
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin-top: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,.08);
}
.eventos-dia-panel{
    margin-top: 20px;
    background: #f7faff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

.eventos-dia-panel h3{
    margin: 0 0 10px;
    color: #0a1a44;
}

.evento-dia-item{
    position: relative;
    background: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    overflow: hidden;
    border-left: 6px solid #0a1a44;
    transition: transform .25s ease, box-shadow .25s ease;
}

.evento-dia-item > *{
    position: relative;
    z-index: 2;
}

/* BORDE */
.evento-dia-item::before{
    content: "";
    position: absolute;

    top: 0;
    bottom: 0;
    left: -6px;
    right: 0;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            transparent 40%,
            var(--color-led) 50%,
            transparent 60%
        ) 0 0 / 300% 100%;

    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);

    -webkit-mask-composite: xor;
            mask-composite: exclude;

    padding: 3px;

    animation: led-recorrer 2.5s linear infinite;

    pointer-events: none;
}

@keyframes led-recorrer{
    from{
        background-position:   0% 0%;
    }
    to{
        background-position: -300% 0%;
    }
}

.evento-dia-item:hover{
    transform: scale(1.02);
    box-shadow: 0 0 6px rgba(0,0,0,.12);
    background: #E8E8E8;
}

.evento-dia-item strong{
    font-size: .95rem;
    display: block;
}
.evento-dia-item small{
    color: gray;
}
.sin-evento {
    border-left: 5px solid #777;
}

/* Quitar la luz animada en “sin evento” */
.sin-evento::before {
    display: none;
}

/* =====================
   LAYOUT PRINCIPAL
===================== */
.layout{
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 20px;
    padding: 20px;
}

/* Responsive */
@media(max-width: 1024px){
    .layout{
        grid-template-columns: 1fr;
    }
}

/* =====================
   PRÓXIMOS EVENTOS
===================== */

.side-panel{
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 0 7px rgba(0,0,0,0.1);
}

.side-panel h3{
    margin-top: 0;
    color: #0a1a44;
}

.prox-card {
    transition: transform .25s ease, box-shadow .25s ease;
    border-left: 5px solid;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    background: white;
}

.prox-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
}


.prox-card strong{
    display:block;
}

.prox-card small{
    color: gray;
}

/*VENTANA EMERGENTE PARA LOS EVENTOS*/
/* Contenedor del modal (centrado sobre overlay) */

#modal-descripcion{
  max-height: none;
  padding-right: 6px;
  overflow-y: auto;
  border-top: 4px;
  border-radius: 0 0 10px 10px;
}

#modal-titulo{
    margin: 0;
    font-size: 1.1rem;
}
/* ===== MODAL NUEVO UNIFICADO ===== */

.modal {
  display: none; /* lo controlas por JS */
  position: fixed;
  inset: 0;
  margin: auto;
  width: 94%;
  max-width: 560px;
  max-height: 90vh;
  height: auto;
  z-index: 1950;

  background: white;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0,0,0,.25);

  /* fundamental: usar flex-col para que .modal-body pueda flex:1 */
  flex-direction: column;
}
.modal.open {
  display: flex;
  animation: aparecerModal .25s ease;
}
/* Header fijo (siempre visible) */
.modal-header {
  border-top: 4px;
  border-radius: 10px 10px 0 0;
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #0a1a44;
  color: white;
  z-index: 2;
}
/* Body ocupa el espacio restante y hace el scroll interno */
.modal-body {
  max-height: 70vh; 
  flex: 1 1 auto;          /* ← important: let it grow/shrink */
  overflow-y: auto;        /* scroll interno (no cuerpo) */
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  box-sizing: border-box;
}


/* Botón cerrar */

.cerrar-modal{
    background: transparent !important;
    font-size: 1.3rem;
    padding: 4px 8px;
}

.cerrar-modal:hover{
    background: transparent;
}

/* Animación */

@keyframes aparecerModal{
    from{
        transform: scale(.92);
        opacity: 0;
    }
    to{
        transform: scale(1);
        opacity: 1;
    }
}


/* ------- DATOS DEL EVENTO ------- */

.evento-datos{
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.dato{
    display: flex;
    align-items: center;
    gap: 10px;
}

.dato img{
    width: 15px;
    height: 15px;
    padding: 6px;
    background: #f2f4f9;
    border-radius: 8px;
    border: 1px solid #ddd;
    object-fit: contain;
}

.dato div{
    display: flex;
    flex-direction: column;
}

.dato small{
    font-size: .65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.dato span{
    font-size: .9rem;
    font-weight: 500;
}
/* Mini info (panel inferior + lateral) */

.evento-mini-datos{
    margin-top:6px;
    display:flex;
    flex-direction:column;
    gap:6px;
}

.dato-mini{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:13px;
    color:#555;
}

.dato-mini img{
    width:16px;
    height:16px;
    opacity:.85;
}
.categoria-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 2px solid white;
  color: white;          /* texto blanco */
  font-size: 0.9rem;
  margin-bottom: 2px;   /* espacio debajo */
}

.categoria-badge img {
  width: 16px;
  height: 16px;
}

/* ======================= COMENTARIOS ======================= */
/* CAJA DE COMENTARIOS FIJA */
.coment-box-fija {
  position: sticky;
  bottom: -16px;
  left: 0;
  right: 0;
  box-sizing: border-box;
  padding: 10px;
  background: inherit;
  border-top: 1px solid rgba(0,0,0,0.08);
  z-index: 3;               /* encima del contenido para que siempre sea visible */
}
.comentario-item{
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f3f5fb;
}

.comentario-avatar{
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #11245a;
}

.comentario-contenido{
    flex: 1;
}
.comentario-contenido p{
    max-width:100%;
    word-break:break-word;
    overflow-wrap:anywhere;
    white-space:pre-wrap;
}

.comentario-contenido b{
    display: block;
    font-size: 14px;
}

.comentario-contenido small{
    margin-left: 3px;
    color: #666;
    font-size: 11px;
}

.comentario-item.reply{
    margin-left: 16px;
    border-left:2px solid #4f6db9;
    padding-left:10px;
}

.comentario-acciones{
    margin-top:6px;
}

.comentario-acciones button{
    background:none;
    color:#4f6db9;
    border:none;
    cursor:pointer;
    font-size:13px;
}
.reply-banner {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:8px;
  border-left:4px solid #ffc107;
  background:#fff4d8;
  color:#333;
  box-sizing:border-box;
}

/* botón de cerrar dentro del reply-banner: pequeño y sin margin que desplace */
.reply-banner button {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
}
.delete-btn{
    color:#d14646;
}
.confirm-modal{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index: 3000;
}

.confirm-card{
    background: white;
    padding:20px;
    border-radius:12px;
    max-width:300px;
    width:90%;
    text-align:center;
}

.confirm-actions{
    display:flex;
    justify-content:space-around;
    margin-top:12px;
}

.confirm-actions button{
    min-width:100px;
}

button.danger{
    background:#d14646;
}
button.danger:hover{
    background:#b13030;
}
.comment-input-row{
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;

}

.comment-input-row textarea,
textarea[id^="coment-"] {
  width: 100% !important;
  max-width: 100%;
  min-height: 56px;
  max-height: 200px;       /* limita altura para evitar empujar todo */
  overflow-y: auto;
  resize: vertical;        /* el usuario puede aumentar, pero hasta max-height */
  box-sizing: border-box;
  margin:0;
  padding:8px;
}


/* botón icono */
.btn-enviar{
    flex: 0 0 42px;
    width:42px;
    height:42px;
    border-radius:50%;
    background:#f2f4f9;
    border:1px solid #ccc;
    padding:6px;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.2s;
}

.btn-enviar:hover{
    background:#00c3ff;
}

.btn-enviar img{
    width:18px;
    height:18px;
}

.load-more{
    display:block;
    margin:10px auto;
}
.mention{
  color:#2da2ff;
  font-weight:bold;
}

.replies{
  margin-left:30px;
  border-left:2px solid #ccc;
  padding-left:12px;
}

.hidden{
  display:none;
}

.toggle-replies{
  margin:4px 0 10px 80px;
  background:none;
  border:none;
  color:#2da2ff;
  cursor:pointer;
  font-size:.8em;
}

textarea:focus {
    border-color: #00c3ff;
    box-shadow: 0 0 0 2px rgba(0,195,255,.25);
}

button {
    background: #0d0f18;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    margin-top: 6px;
    cursor: pointer;
}

button:hover {
    background: #2b3357;
}
.no-scroll, .no-scroll body {
  height: 100%;
  overflow: hidden !important;
}
/* Día con evento HOY: parpadeo usando el color del evento */
.blink-today {
  animation: parpadeo 0.5s infinite alternate;
  color: white;
  font-weight: bold;
  border-radius: 8px;
}
/*ESTILO PARA EL TITULO EN CASO DE HABER MAS DE 1 EVENTO*/
/* Título clickeable */
.evento-titulo {
  margin: 0;
  padding: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  background: #0a1a44;
  color: white;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.evento-titulo:hover {
  background: #092037;
}
/* Descripción con animación tipo acordeón */
.evento-desc {
  padding-left: 10px;
  color: #333;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
  opacity: 0;
  margin-top: 5px;
}
/* Contenedor de cada evento */
.evento-item {
  padding: 10px;
  margin-bottom: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  border-radius: 8px;
  background: #f7f7f7;
  transition: 0.3s ease;
}

/* Cuando está expandido */
.evento-desc.activo {
    opacity: 1;
    max-height: 500px;
}
/* ============================
      USUARIO SILENCIADO
============================ */

.silenciado-box{
    background: #F1C6C6;
    border-left: 6px solid #d14646;
    padding: 15px 18px;
    border-radius: 10px;
    margin: 15px 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.silenciado-box strong{
    color: #b13030;
}
.silenciado-box p{
    color: #380F0F !important; 
}
.silenciado-box span{
    color: #380F0F !important; 
}
.silenciado-contador{
    background: #ffecec;
    padding: 10px;
    margin-top: 10px;
    border-radius: 8px;
    font-weight: bold;
    color: #912b2b;
    text-align: center;
    border: 1px solid #ffbaba;
}

.silenciado-fin{
    display: none;
    background: #e7ffe8;
    padding: 10px;
    border-left: 5px solid #44c765;
    border-radius: 8px;
    margin-top: 10px;
    color: #2e8b41;
    font-weight: bold;
    text-align: center;
}
/* Overlay general*/
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 998;
}

/* Cuando está activo */
.overlay.active {
    opacity: 1;
    pointer-events: all;
}
#overlay-modal { z-index: 1008; }
#overlay-menu  { z-index: 997; }

#modal-evento { 
    z-index: 1009;
    max-height: 80vh;       /* limita la altura al 80% de la ventana */
    overflow-y: auto;       /* activa scroll vertical dentro del modal */
    padding-right: 10px; 
  }
#menu-movil   { z-index: 996; }

@keyframes parpadeo {
  from { filter: brightness(1); }
  to { filter: brightness(0.5); }
}
/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
  .menu-btn {
    display: block;
    position: relative;
    z-index: 1100;
  }

  .menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 250px;
    background: #0a1a44;
    flex-direction: column;
    display: flex;
    align-items: flex-start;
    padding: 80px 20px;
    gap: 25px;
    transition: right 0.4s ease;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    height: 84vh;
  }

  .menu.show {
    right: -60px;
  }
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 900;
  }

  .overlay.active {
    opacity: 1;
    pointer-events: all;
    
  }

  .menu a {
    width: 100%;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 10px 0;
  }
  .layout{
    grid-template-columns: 1fr; /* ya lo tienes */
    padding: 10px;
  }

  .calendar-container{
    width: 100%;
    padding: 0;
  }

  .calendar{
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);   
    grid-auto-rows: 40px; 
    row-gap: 10px;
  }
  .calendar-grid div {
    padding: 5px;
    font-size: 0.8rem;
  }

  .menu-auth {
    margin-top: auto;     /* ← AHORA funciona */
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .menu-auth a {
    width: 100%;
    font-size: 1.1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 10px;
  }
}
