/* 1.19.0 · Reservados (salas de vídeo privadas): bloque de la pestaña Vídeo, ventana de crear/invitar,
   temporizador y botones del anfitrión en la sala. Mismo estilo «noche habanera» que app.css. */

/* ---------- Pestaña Vídeo ---------- */
.reservados { width: min(1180px, 100%); margin-top: 22px; display: grid; gap: 12px; }
.res-cabeza { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.res-cabeza h2 { display: flex; align-items: center; gap: 10px; font-size: 1.45rem; margin: 0 0 4px; }
.res-cabeza h2 .ico { width: 24px; height: 24px; color: var(--mango); }
.res-cabeza .sub { margin: 0; font-size: .92rem; max-width: 62ch; }
.res-cabeza .boton { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.res-plazas { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--texto-suave); font-size: .9rem; }
.res-punto { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgb(52 231 166 / .16); animation: latidoRes 2.4s ease-in-out infinite; }
.res-punto.agotado { background: var(--peligro); box-shadow: 0 0 0 4px rgb(255 92 116 / .16); }
@keyframes latidoRes { 50% { box-shadow: 0 0 0 7px rgb(52 231 166 / .05); } }
.res-nota { align-items: center; flex-wrap: wrap; }
.res-nota .boton.enlace { padding: 0 4px; }
.res-subtitulo { margin: 10px 0 0; font-size: 1rem; color: var(--texto-suave); font-weight: 650; }
.res-lista { display: grid; gap: 10px; }
.res-tarjeta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radio); }
.res-tarjeta.mia { background: linear-gradient(135deg, rgb(255 61 139 / .14), rgb(255 166 61 / .08)); border-color: rgb(255 166 61 / .3); }
.res-icono { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--grad); color: #fff; flex: none; }
.res-icono .ico { width: 22px; height: 22px; }
.res-icono.mini { width: 34px; height: 34px; border-radius: 11px; }
.res-icono.mini .ico { width: 17px; height: 17px; }
.res-info { min-width: 0; display: grid; gap: 2px; }
.res-info b { font: 700 1.05rem/1.25 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-info small { color: var(--texto-suave); font-size: .82rem; }
.res-info .res-motivo { color: var(--aviso); }
.res-acciones { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.res-acciones .boton { display: inline-flex; align-items: center; gap: 6px; }
.res-acciones .boton .ico { width: 16px; height: 16px; }

/* ---------- 1.21.1 · Arriba de la pestaña Vídeo: banda de invitaciones y botón «Crear reservado» ---------- */
.res-banda { width: min(1180px, 100%); display: grid; gap: 8px; margin-bottom: 18px; align-self: start; }
.res-banda[hidden] { display: none; }
.res-invitacion {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 12px 10px 10px; border-radius: var(--radio);
  background: linear-gradient(110deg, rgb(255 61 139 / .2), rgb(255 166 61 / .12)); border: 1px solid rgb(255 166 61 / .45);
  box-shadow: 0 14px 36px -18px rgb(255 61 139 / .7); animation: entraRes .45s var(--muelle);
}
@keyframes entraRes { from { opacity: 0; transform: translateY(-8px); } }
.res-inv-texto { margin: 0; font-size: .95rem; line-height: 1.4; color: var(--texto); min-width: 0; }
.res-inv-texto b { font-weight: 750; }
.res-inv-texto [data-tiempo] { color: var(--mango); font-weight: 650; white-space: nowrap; }
.res-inv-texto .res-motivo { display: block; color: var(--aviso); font-size: .8rem; margin-top: 2px; }
.res-crear { display: grid; gap: 8px; }
.res-crear[hidden] { display: none; }
.solicitud .res-crear { margin-top: 18px; text-align: left; }
.res-boton { width: 100%; }
.res-boton:not(.primario) { background: linear-gradient(110deg, rgb(255 166 61 / .16), rgb(255 61 139 / .14)); border-color: rgb(255 166 61 / .5); color: var(--texto); }
.res-boton:not(.primario):hover { background: linear-gradient(110deg, rgb(255 166 61 / .26), rgb(255 61 139 / .22)); }
.res-boton .ico { width: 20px; height: 20px; color: var(--mango); flex: none; }
.res-boton.primario .ico { color: #fff; }
.res-boton [data-tiempo] { font-weight: 600; opacity: .9; }
.res-crear .res-nota { margin: 0; display: flex; flex-wrap: nowrap; gap: 8px; align-items: flex-start; font-size: .86rem; color: var(--texto-suave); }
.res-crear .res-nota .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--mango); }

/* Tostadas que explican algo (por qué no se puede crear, invitado sin vídeo): el texto se lee entero, sin cortar,
   y una frase larga no ensancha la columna de tostadas (sin desplazamiento lateral a 390 px). */
.tostadas { grid-template-columns: minmax(0, 1fr); }
.tostada.larga small { white-space: normal; overflow: visible; line-height: 1.35; margin-top: 2px; }

/* ---------- Ventana: crear o invitar ---------- */
.dlg-reservado { width: min(520px, calc(100% - 24px)); overflow-y: auto; }
.dlg-reservado .formulario { gap: 14px; }
.res-vista .crear-icono { font-size: 1.6rem; }
.res-tamano { display: flex; flex-wrap: wrap; gap: 6px; }
.res-tamano button { min-width: 42px; height: 42px; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--borde-2); background: var(--cristal); color: var(--texto); font-weight: 700; cursor: pointer; transition: transform .2s var(--muelle), background .2s, border-color .2s; }
.res-tamano button:hover:not(:disabled) { background: var(--cristal-3); transform: translateY(-1px); }
.res-tamano button[aria-checked="true"] { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -8px rgb(255 61 139 / .8); }
.res-tamano button:disabled { opacity: .3; cursor: not-allowed; text-decoration: line-through; }
.res-libres { color: var(--texto-tenue); font-size: .8rem; }
.res-elegidos { display: flex; flex-wrap: wrap; gap: 6px; }
.res-elegidos:empty { display: none; }
.res-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 3px 3px 4px; border-radius: 99px; background: var(--cristal-2); border: 1px solid var(--borde-2); max-width: 100%; }
.res-chip .avatar { width: 24px; height: 24px; font-size: .62rem; }
.res-chip b { font-size: .84rem; font-weight: 650; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-chip .icono-boton { width: 24px; height: 24px; }
.res-chip .icono-boton .ico { width: 14px; height: 14px; }
.dlg-reservado .buscador-tabla { margin-bottom: 0; }
.res-resultados { padding: 0; max-height: 220px; }
.res-resultados .persona > .ico { color: var(--turquesa); }
.res-resultados .persona:disabled { opacity: .45; cursor: not-allowed; }
.dlg-reservado .nota .ico { width: 16px; height: 16px; margin-top: 2px; }

/* ---------- Sala ---------- */
/* 1.27.0: el nombre del reservado y lo que queda van en la cabecera de la sala (#sala-reloj, ver app.css), e invitar
   y cerrar, en «⋯». Aquí solo el latido del último minuto. */
#sala-reloj.ultimo { animation: latidoTiempo 1s ease-in-out infinite; }
@keyframes latidoTiempo { 50% { opacity: .55; } }
body.en-sala .avisos { top: 56px; }
.tile.bloqueado::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgb(0 0 0 / .55) 0 10px, rgb(0 0 0 / .4) 10px 20px); }

@media (max-width: 860px) {
  .reservados { margin-top: 16px; }
  .res-cabeza { flex-direction: column; align-items: stretch; }
  .res-cabeza .boton { justify-content: center; }
  .res-tarjeta { grid-template-columns: auto minmax(0, 1fr); padding: 12px; gap: 12px; }
  .res-acciones { grid-column: 1 / -1; justify-content: stretch; }
  .res-acciones .boton { flex: 1; justify-content: center; }
  .res-banda { margin-bottom: 12px; }
  .res-invitacion { grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .res-punto, #sala-reloj.ultimo, .res-invitacion { animation: none; }
}
