/* ====================================================
   Watson UI — Hoja de estilos limpia y estructurada
   ==================================================== */

/* ----------------------------------------------------
   1. Fuentes
---------------------------------------------------- */
@font-face {
  font-family: "MyriadPro";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("./assets/fonts/MyriadPro-Semibold.woff2") format("woff2"),
    url("./assets/fonts/MyriadPro-Semibold.woff") format("woff");
}

@font-face {
  font-family: "MyriadPro";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("./assets/fonts/MyriadPro-Regular.woff2") format("woff2"),
    url("./assets/fonts/MyriadPro-Regular.woff") format("woff");
}

@font-face {
  font-family: "MyriadPro";
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  src: url("./assets/fonts/MyriadPro-Bold.woff2") format("woff2"),
    url("./assets/fonts/MyriadPro-Bold.woff") format("woff");
}

@font-face {
  font-family: "MyriadPro-Cond";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-05FF;
  src: url("./assets/fonts/MyriadPro-Cond.woff2") format("woff2"),
    url("./assets/fonts/MyriadPro-Cond.woff") format("woff");
}

/* ----------------------------------------------------
   2. Variables globales
---------------------------------------------------- */
:root {
  --brand: #fe3f00;
  --ok: #14a76c;
  --ok-dark: #0c6e47;
  --ink: #ffffff;
  --bg: #000000;

  --headerH: 3.5vh;
  --liveH: 24vh;
  --padX: 1vw;

  --liveFont: clamp(1.76rem, 4.4vw, 3.52rem);
  --liveLH: 1.3;

  --tile: 22vh;
  --gap: 3vh;
}

/* ----------------------------------------------------
   3. Reset y base
---------------------------------------------------- */
html {
  font-family: "MyriadPro", system-ui, -apple-system, Segoe UI, Roboto,
    sans-serif;
  font-weight: 400;
  height: 100%;
}

body {
  background-color: var(--bg);
  color: #747474;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#linkhome {
  position: fixed;
  top: 0;
  left: 0;
  padding: 1vh 2vh;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 2rem;
  z-index: 10;
  font-family: "MyriadPro", sans-serif;
}

/* ----------------------------------------------------
   4. Títulos
---------------------------------------------------- */
.titleText {
  font-weight: 900;
  color: var(--ink);
  font-size: 2em;
  letter-spacing: 5px;
  margin: 0;
}

.header__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.subtitleText {
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.3;
}

.containerText {
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.1;
  color: #bbb;
}

/* ----------------------------------------------------
   5. Contenedores principales
---------------------------------------------------- */
.container {
  height: 100vh;
  max-height: 100vh;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.containerCenter {
  align-items: center;
}

.main-container {
  min-width: 100%;
}

.background {
  background-color: var(--bg);
  color: #747474;
}

/* ----------------------------------------------------
   6. Cabecera y botones
---------------------------------------------------- */
.header__container {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: var(--headerH);
  margin: 5px 10px;
  gap: 0.5vw;
}

.header__container-home {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  height: var(--headerH);
  margin: 20px 10px 5px 10px;
  gap: 0.5vw;
}

.header__logo {
  height: 6vh;
  align-self: center;
}

.header-buttons {
  display: flex;
  gap: 0.5vw;
}

.header-buttons__container {
  align-self: center;
}

.refresh__button,
.stop__button,
.resolution__button,
.mute__button {
  font-family: "MyriadPro", sans-serif;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  color: #fff;
  background-color: var(--brand);
  border: none;
  border-radius: 5px;
  transition: filter 0.2s ease;
}

.refresh__button {
  font-size: 0.8rem;
  line-height: 3vh;
  height: 3.5vh;
  padding: 0 0.5vw;
}

.stop__button {
  font-size: 0.8rem;
  line-height: 3vh;
  height: 3.5vh;
  padding: 0 0.5vw;
}

.resolution__button {
  font-size: 1.5rem;
  line-height: 3vh;
  height: 3.5vh;
  width: 4vw;
  min-width: 4vw;
  padding: 0;
}

.mute__button {
  font-size: 0.8rem;
  line-height: 3vh;
  height: 3.5vh;
  padding: 0 0.5vw;
}

.refresh__button:hover,
.stop__button:hover,
.resolution__button:hover,
.mute__button:hover {
  filter: brightness(0.9);
}

/* ----------------------------------------------------
   7. Iconos
---------------------------------------------------- */
.fas,
.fa {
  cursor: pointer;
}

.fa-microphone {
  color: var(--ok);
}

.fa-microphone:hover {
  color: var(--ok-dark);
}

.fa-file-audio {
  color: #ff652f;
}

.fa-file-audio:hover {
  color: #d44916;
}

/* ----------------------------------------------------
   8. Pantalla Home
---------------------------------------------------- */
.home {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  max-height: 100vh;
  max-width: 100vw;
  overflow: hidden;
}

.home-forbidden .titleText {
  height: auto;
}

.titleText--big {
  font-size: 4em;
}

.titleText--center {
  text-align: center;
}

.titleText--center span {
  font-size: 0.7em;
}

/*Home */

.class-menu {
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
  margin-top: 8vh;
}

.class-menu__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;

  /* 4 columnas que reparten todo el ancho */
  grid-template-columns: repeat(4, 1fr);

  /* cada fila reparte todo el alto disponible */
  grid-auto-rows: 1fr;

  gap: var(--gap);
  width: 85%;
  /* height: 100%; */
  align-content: stretch; /* que las filas rellenen */
  justify-content: center;
  aspect-ratio: 4 / 2; /* mantiene cuadrado el grid */
  align-items: center;
}

.class-menu__list > li {
  /* overflow: hidden; */
  aspect-ratio: 1 / 1;
}

.class-menu__list > li > a.class-menu__link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: start;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 2rem 1.2rem;
  overflow: hidden;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.3;
  font-size: clamp(1.3rem, min(13vw, 16vh), 7rem);
  transition: filter 0.15s ease;
  font-family: "MyriadPro-Cond", sans-serif;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.class-menu__list > li > a.class-menu__link:hover {
  filter: brightness(0.9);
}

.class-menu__list .course-code {
  display: block;
  line-height: 1;
}

.class-menu__list .call-code {
  display: block;
  margin-top: 0.3rem; /* GAP entre course-code y call-code */
  font-size: clamp(5rem, 5.2vw, 7.4rem);
  font-weight: 400;
  line-height: 1.3;
  opacity: 0.9;
  position: static; /* IMPORTANTE: quitar posición absoluta */
}

/*Sesión label*/

.class-menu--session {
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
  margin-top: 8vh;
}

/* GRID de cards: ahora rectangulares, auto-fit */
.class-menu__list--session {
  list-style: none;
  margin: 0 auto;
  padding: 0;

  /* Columna */
  display: flex;
  flex-direction: column;
  gap: var(--gap);

  /* Centrar verticalmente dentro del contenedor */
  justify-content: center;

  /* Centrar horizontalmente */
  align-items: center;

  /* Que no se estiren demasiado */
  width: 100%;
}

/* ya NO queremos cards cuadradas */
.class-menu__list--session > li {
  width: 100%;
  display: flex;
  justify-content: center; /* para centrar el <a> si tiene max-width */
}

/* Card */
.class-menu__link--session {
  /* La card se limita a un ancho máximo, pero ocupa todo ese ancho */
  width: 100%;
  max-width: 700px; /* <--- AJUSTA este valor como quieras */
  min-width: 320px; /* <--- mínimo que pides */
  box-sizing: border-box;

  /* Mantengo tu layout interno en fila */
  display: flex;
  justify-content: space-between;
  align-items: stretch;
}

/* enlace = card */
.class-menu__list--session > li > a.class-menu__link--session {
  position: relative;
  display: flex; /* fila: info + aula */
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  min-height: 110px; /* alto mínimo rectangular */
  box-sizing: border-box;
  padding: 1.2rem 1.5rem;
  text-decoration: none;
  text-transform: uppercase;
  font-family: "MyriadPro-Cond", sans-serif;
  transition: filter 0.15s ease;
  color: inherit;
}

/* anulamos el estilo anterior de session-label a nivel de <a> */
.class-menu__list .session-label {
  font-size: inherit;
  font-weight: inherit;
  padding: 0;
}

/* Contenido principal (izquierda) */
.session-card__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  text-align: left;
}

.session-card__time {
  font-size: clamp(1.1rem, 1.4vw, 1.4rem);
  font-weight: 600;
}

.session-card__name {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 700;
}

.session-card__extra {
  font-size: clamp(1.21rem, 1.573vw, 1.452rem);
  font-weight: 500;
  text-transform: none;
}

/* Cajita de Aula (derecha) */
.session-card__room {
  display: flex;
  flex-direction: column;

  /* Separa visualmente del texto de la izq */
  border-left: 2px solid currentColor;
  padding-left: 1rem;
  margin-left: 1rem;

  min-width: 110px; /* Ajusta si lo quieres más ancho */
  height: auto;
}

.session-card__room-label {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 1.3rem;
  text-align: left; /* <-- arriba alineado a la izquierda */
}

.session-card__room-value {
  margin-top: 0.3em;
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center; /* <-- abajo alineado a la derecha */
}

/* hover opcional (como tenías) */
.class-menu__list .session-label:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.03);
}

@media (max-width: 1400px) {
  .class-menu__list {
    grid-template-columns: repeat(2, var(--tile));
  }
}

@media (max-width: 900px) {
  .class-menu__list {
    grid-template-columns: var(--tile);
  }
}

.spaceSession {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.course-pcac {
  --accent: #c00000;
}
.course-pecd1 {
  --accent: #5d452b;
}
.course-pecd2 {
  --accent: #5d452b;
}
.course-pect {
  --accent: #ff7f40;
}
.course-pech {
  --accent: #92d050;
}
.course-ecd {
  --accent: #00b0f0;
}
.course-dcs {
  --accent: #00b0f0;
}
.course-gdc {
  --accent: #262626;
}

/* Icono especial de clase mundial */
.class-menu__link--world {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-decoration: none;
  padding: 1.2rem;
  border-radius: 1rem;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.15);
}

.class-menu__link--world:hover {
  filter: brightness(1.1);
}

/* Icono de bola del mundo */
.world-icon {
  font-size: 2.4rem;
  margin-bottom: 0.35rem;
}

/* Texto debajo del icono */
.world-label {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ----------------------------------------------------
   9. Pantalla de transcripción
---------------------------------------------------- */
.displayTranslation__container {
  display: grid;
  height: calc(100vh - var(--headerH));
  max-height: calc(100vh - var(--headerH));
  grid-template-rows: 1fr var(--liveH);
  grid-template-columns: 1fr;
  overflow: hidden;
}

.displayTranslation__container .messageListContainer {
  /* Evita overflow horizontal y respeta el 1fr de la grid */
  width: 100%;
  max-width: 100%;
  min-width: 0; /* clave en hijos de grid/flex */

  min-height: 0;
  height: auto !important;
  max-height: none !important;
  position: static !important;

  margin: 0;
  padding: 0 var(--padX); /* 🔹 padding lateral*/
  box-sizing: border-box;

  overflow-y: auto; /* scroll vertical */
  overflow-x: hidden; /* no desbordar a la derecha */
  -webkit-overflow-scrolling: touch;
}

.previous__messageItem {
  display: flex;
  margin: 10px 0;
  border: 2px solid #dedede;
  background-color: #000;
  color: #fff;
  border-radius: 5px;
  padding: 10px;
  justify-content: space-between;

  transition: transform 120ms linear, opacity 120ms linear, filter 120ms linear;
  transform-origin: top left;
  will-change: transform, opacity, filter;
}

.previous__messageItemText {
  font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 4.4rem);
  line-height: var(--liveLH);
}

.toTranslateContainer {
  width: 100%;
  height: 100%;
  padding-left: var(--padX);
  padding-right: var(--padX);
  padding-bottom: var(--padX);
  box-sizing: border-box;
}

.displayTranslation__container .toTranslateContainer {
  position: static !important;
}

.messageItem {
  display: flex;
  margin: 0;
  border: 2px solid #dedede;
  background-color: #f1f1f1;
  color: #000;
  border-radius: 8px;
  padding: 10px 14px;
  justify-content: space-between;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 100% !important;
}

.messageItemText {
  font-weight: 400;
  font-size: var(--liveFont);
  line-height: var(--liveLH);
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}

.messageItemTime {
  font-size: 10px;
  align-self: flex-end;
}

/* LIVE +10% */
.displayTranslation__container--big {
  --liveFont: clamp(1.76rem, 4.4vw, 3.52rem);
}

.displayTranslation__container--small {
  --liveFont: clamp(1.54rem, 3.74vw, 2.86rem);
}

.displayTranslation__container--cib {
  --liveFont: clamp(1.32rem, 3.3vw, 2.42rem);
}

/* ----------------------------------------------------
   10. Botones de inicio / estados
---------------------------------------------------- */
.start__button {
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  text-align: center;
  background-color: var(--brand);
  font-size: 1.1rem;
  width: 100%;
  padding: 30px;
  border-radius: 5px;
  border: none;
  margin-top: 30px;
}

.start__button--es-en {
  background-color: var(--brand);
}

.start__button--en-es {
  background-color: var(--brand);
}

.start__button.is-active {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.start__button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ----------------------------------------------------
   11. Utilidades y animaciones
---------------------------------------------------- */
.output-display {
  background-color: #000;
  height: 700px;
}

.fadeIn {
  opacity: 1;
  width: 100px;
  height: 100px;
  transition: width 0.5s, height 0.5s, opacity 0.5s 0.5s;
}

@media (max-width: 1100px) {
  .displayTranslation__container--cib .messageItemText {
    font-size: clamp(2rem, 3.8vw, 3.4rem);
    line-height: 1.2;
  }
}

/* ----------------------------------------------------
   12. Hotfix: overflow horizontal en messageListContainer
   - Evita desbordes por padding/bordes/anchos mínimos
   - Asegura que los hijos no rompan el layout
---------------------------------------------------- */
.messageListContainer {
  display: flex;
  flex-direction: column; /* conservamos tu orden inverso */
  align-items: stretch; /* los hijos ocupan todo el ancho */
  list-style: none;
  margin: 0; /* resetea márgenes implícitos */
  padding: 0; /* sin padding que sume ancho */
  position: relative;

  width: 100%; /* ocupa todo el contenedor */
  max-width: 100%;
  min-width: 0; /* clave para evitar overflow en flex/grid */
}

/* Los ítems internos se ajustan al texto y no ocupan todo el ancho */
.messageListContainer > li,
.messageListContainer > .previous__messageItem {
  display: inline-flex; /* permite ajustar al contenido */
  align-self: flex-start; /* se alinean al inicio del contenedor */
  width: auto; /* ancho según el contenido */
  max-width: 100%; /* no más del ancho del contenedor */
  box-sizing: border-box;
  margin: 0.2vh 0; /* pequeño margen vertical */
  padding-right: 1vw; /* deja aire después del texto */
}

/* Los textos largos se parten correctamente y no fuerzan expansión */
.messageListContainer .previous__messageItemText,
.messageListContainer .messageItemText,
.messageListContainer .previous__messageItem {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal; /* permite múltiples líneas */
}

/* Si llevas padding lateral en el wrapper principal, evita min-width que sume */
.displayTranslation__container .messageListContainer {
  min-width: 0; /* en grid/flex evita overflow */
}

.displayTranslation__container .main-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 1vh;
}

/* Pista interna que desplazaremos hacia arriba */
.messageListContainer .mlc-track {
  display: flex;
  flex-direction: column; /* el último queda abajo */
  align-items: flex-start;
  gap: 0.8vh;
  will-change: transform;
}

/* Tus items, ancho al texto */
.messageListContainer .previous__messageItem {
  display: inline-flex;
  align-self: flex-start;
  border: 2px solid #dedede;
  background: #000;
  color: #fff;
  border-radius: 5px;
  padding: 8px 12px;
  margin: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Live box: fuerza contraste y bloque visible */
.toTranslateContainer .messageItem {
  background-color: #f1f1f1; /* ya lo tienes, lo reafirmamos */
  color: #111; /* color base para el texto */
}

/* === Neutraliza #prevList para que no rompa el live === */
#prevList {
  position: static !important;
  margin: 0 !important;
  padding: 0 var(--padX) !important;
  list-style: none !important;

  /* deja que la grid mande: alto flexible y scroll nativo */
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;

  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;

  background: transparent !important;
  z-index: 1 !important;
}

/* Asegura stacking: la caja live por encima */
.displayTranslation__container {
  position: relative;
}
.displayTranslation__container > .main-container:first-child {
  position: relative;
  z-index: 1;
}
.displayTranslation__container .toTranslateContainer {
  position: relative;
  z-index: 2;
}

/* Contraste del texto live, por si heredaba color claro */
.toTranslateContainer .messageItemText {
  color: #111 !important;
  display: block;
}

/* ===== FIX MAQUETADO – Lista arriba, live abajo, sin solapes ===== */

/* Grid de 2 filas estable: lista (1fr) + live (var(--liveH)) */
.displayTranslation__container {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) var(--liveH) !important;
  grid-template-columns: 1fr !important;
  overflow: hidden !important;
}

/* La “fila lista” puede encoger; no empuja al live */
.displayTranslation__container > .main-container:first-child {
  min-height: 0 !important;
  overflow: hidden !important;
}

/* La UL de históricos funciona como viewport nativo (scroll) */
#prevList {
  position: static !important;
  z-index: 0 !important;
  margin: 0 !important;
  padding: 0 var(--padX) !important;
  list-style: none !important;

  height: auto !important; /* deja que la grid marque el alto */
  max-height: none !important;
  min-height: 0 !important;

  overflow-y: auto !important; /* el recorte por píxel ocurre aquí */
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  background: transparent !important;

  display: flex !important;
  gap: 1vh !important;
}

/* La caja live SIEMPRE en la fila 2, con su propio stacking */
.displayTranslation__container .toTranslateContainer {
  grid-row: 2 / 3 !important;
  grid-column: 1 / 2 !important;
  position: relative !important;
  z-index: 2 !important;
  isolation: isolate !important;
}

/* Asegura visibilidad del texto live ante herencias agresivas */
.toTranslateContainer .messageItemText {
  color: #111 !important;
  display: block;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  white-space: normal !important;
}

/* Evita reglas antiguas que “maten” el scroll de la lista */
.messageListContainer {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* IMPORTANTÍSIMO: NO meter contenedores “track” ni transforms en la UL */

/* ----------------------------------------------------
   13. Breakpoint 2560px (2K QHD)
---------------------------------------------------- */
/* ----------------------------------------------------
   14. Efectos Premium y Estados
---------------------------------------------------- */
/* Animación de entrada para nuevos mensajes - Optimizado para suavidad */
.previous__messageItem {
  will-change: transform, opacity;
  animation: slide-in-bottom 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slide-in-bottom {
  0% { 
    transform: translateY(15px); 
    opacity: 0; 
  }
  100% { 
    transform: translateY(0); 
    opacity: 1; 
  }
}

/* Ajustes de scroll */
#prevList {
  scroll-behavior: auto;
}

/* Scrollbar personalizada */
#prevList::-webkit-scrollbar {
  width: 6px;
}
#prevList::-webkit-scrollbar-track {
  background: transparent;
}
#prevList::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
#prevList::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (min-width: 2560px) {
  html {
    /* Scale up base font size from 16px to ~21.33px (133.33%) */
    font-size: 21.33px;
  }
}

/* ----------------------------------------------------
   13. Botón flotante Sala Libre (Refinado)
   - Bottom right
   - Big, Black BG, White Icon
---------------------------------------------------- */
.home-world-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
}

.home-world-btn:hover {
  transform: scale(1.1);
}

.home-world-btn:active {
  transform: scale(0.95);
}

/* ----------------------------------------------------
   13. Worldroom (Sala libre)
---------------------------------------------------- */
body.worldroom-page {
  /* 🔹 SUBSTITUYE ESTA URL POR TU IMAGEN */
  background-image: url('assets/img/CIB_hashtag_logo_white.png');
  background-size: contain; /* Ajusta al máximo sin cortar nada */
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  background-attachment: fixed; /* Evita que se mueva al hacer scroll */
}

/* Capa oscura (Overlay) */
body.worldroom-page::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: -1;
  pointer-events: none;
}

.worldroom {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.worldroom__card {
  max-width: 420px;
  width: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  border-radius: 1.5rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}

.worldroom__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.worldroom__title h1 {
  font-size: 2rem;
  margin: 0;
  color: var(--ink); /* Uso de variable */
  font-family: "MyriadPro", sans-serif;
}

.worldroom__intro {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--ink); /* Uso de variable */
  font-family: "MyriadPro", sans-serif;
}

.worldroom__row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.worldroom__field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.worldroom__field label {
  font-size: 0.85rem;
  color: #ccc;
}

.worldroom__field select {
  padding: 0.5rem 0.6rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 0.95rem;
  font-family: "MyriadPro", sans-serif;
}

.worldroom__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.worldroom__error {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #ff7675;
  min-height: 1.1em;
}

/* ----------------------------------------------------
   14. Botones Genéricos (reusables)
---------------------------------------------------- */
.btn {
  border: none;
  border-radius: 5px;
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: 900;
  text-align: center;
  transition: filter 0.2s ease;
  font-family: "MyriadPro", sans-serif;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
}

.btn--secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}

.btn--primary {
  background: var(--brand);
  color: white;
}

.btn--primary:hover {
  filter: brightness(0.9);
}

/* ----------------------------------------------------
   15. Modo Web (Navegador en wattson.cib.education / MODE=web)
   - 3 líneas en la parte blanca que ocupan el 100% del alto
   - Las de arriba siempre un poco más grande el tamaño de la letra (25% mayor)
---------------------------------------------------- */
html.is-web body,
body.is-web {
  --liveLH: 1.25;
  --livePadY: 12px;
  --livePadX: 18px;
  --liveFont: clamp(1.75rem, 2.7vw, 2.85rem);
  --liveH: calc(3 * var(--liveLH) * var(--liveFont) + (2 * var(--livePadY)) + var(--padX));
}

html.is-web.displayTranslation__container--big,
html.is-web .displayTranslation__container--big,
body.is-web.displayTranslation__container--big,
body.is-web .displayTranslation__container--big {
  --liveFont: clamp(1.75rem, 2.7vw, 2.85rem);
}

html.is-web.displayTranslation__container--small,
html.is-web .displayTranslation__container--small,
body.is-web.displayTranslation__container--small,
body.is-web .displayTranslation__container--small {
  --liveFont: clamp(1.4rem, 2.1vw, 2.2rem);
}

html.is-web .toTranslateContainer,
body.is-web .toTranslateContainer {
  height: 100%;
  box-sizing: border-box;
}

html.is-web .messageItem,
body.is-web .messageItem {
  box-sizing: border-box;
  padding: var(--livePadY) var(--livePadX);
  height: 100% !important;
  max-height: 100% !important;
  display: block;
  overflow: hidden;
}

html.is-web .messageItemText,
body.is-web .messageItemText {
  font-size: var(--liveFont);
  line-height: var(--liveLH);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Las de arriba SIEMPRE un poco más grande el tamaño de la letra (25% mayor que el live) */
html.is-web .previous__messageItemText,
body.is-web .previous__messageItemText {
  font-size: calc(var(--liveFont) * 1.25);
  line-height: var(--liveLH);
}


