/* styles.css */

/* =========================
   HERO (AJUSTES HOME)
   ========================= */

.hero h2 {
  font-size: 30px;
}

/* Glow naranja */

.glow-text-orange {
  position: relative;
  display: inline-block;
  color: #fff;
}

.glow-text-orange::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  text-shadow:
    0 0 5px rgb(232, 135, 0),
    0 0 10px rgb(232, 135, 0),
    0 0 20px rgb(232, 73, 0),
    0 0 40px rgb(232, 73, 0);
  z-index: -1;
}

/* =========================
   LAYOUT PRINCIPAL (HOME)
   ========================= */

.layout {
  display: grid;
  grid-template-columns: 1.2fr 2.6fr 1.2fr;
  gap: 40px;
  padding: 0 4% 60px;
  align-items: start;
}

/* =========================
   ZONA EN VIVO (CHAT + AGENDA)
   ========================= */

.live-zone {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 40px;
  padding: 60px 4%;
  align-items: start;
}

/* Columnas genéricas */
.live-col {
  min-width: 0; /* evita overflow en grid */
}

/* =========================
   ESTADO: NO HAY CHAT EN VIVO
   ========================= */

/* ocultamos columnas laterales */
.live-zone:not(.chat-activo) .live-left,
.live-zone:not(.chat-activo) .live-right {
  display: none;
}

/* la columna central ocupa todo */
.live-zone:not(.chat-activo) .live-center {
  grid-column: 1 / -1;
}

/* solo se ve la agenda central */
.live-zone:not(.chat-activo) .agenda-sola {
  display: block;
  margin: 0 auto;
  max-width: 1100px;
}

.live-zone:not(.chat-activo) .agenda-lateral,
.live-zone:not(.chat-activo) .chat {
  display: none;
}

/* =========================
   ESTADO: HAY CHAT EN VIVO
   ========================= */

.live-zone.chat-activo .live-left {
  display: none; /* no la usamos visualmente */
}

/* el centro se estira a 2 columnas */
.live-zone.chat-activo .live-center {
  grid-column: 1 / span 2;
}

/* la derecha queda para la agenda */
.live-zone.chat-activo .live-right {
  display: block;
}

/* visibilidades */
.live-zone.chat-activo .chat {
  display: flex;
}

.live-zone.chat-activo .agenda-sola {
  display: none;
}

.live-zone.chat-activo .agenda-lateral {
  display: block;
}

/* =========================
   AGENDA SIN CHAT (centrada)
   ========================= */

.live-zone:not(.chat-activo) .agenda-sola {
  max-width: 520px;
  margin: 0 auto; /* 🔥 centra horizontalmente */
}
/* =========================
   CHAT EN VIVO
   ========================= */

.chat {
  display: flex;
  flex-direction: column;

  height: 100%;
  max-height: 600px;

  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  padding: 20px;

  box-shadow: 0 0 20px rgba(232, 73, 0, 0.15);
}

/* Header del chat */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 12px;
}

.chat-title {
  font-family: "Big Shoulders", sans-serif;
  font-size: 22px;
  color: rgb(232, 73, 0);
}

.chat-status {
  font-size: 13px;
  opacity: 0.8;
}

/* =========================
   MENSAJES DEL CHAT
   ========================= */

.chat-messages {
  flex: 1;
  overflow-y: auto;

  padding-right: 12px;
  margin-bottom: 12px;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Mensaje genérico */
.chat-message {
  font-size: 14px;
  line-height: 1.4;
}

/* Autor */
.chat-author {
  font-weight: bold;
  margin-right: 6px;
}

/* Mensaje del admin */
.chat-message.admin {
  color: rgb(232, 162, 124);
}

/* =========================
   INPUT DEL CHAT
   ========================= */

.chat-input {
  display: flex;
  gap: 8px;
}

.chat-input input {
  flex: 1;
  padding: 8px 10px;

  background-color: #000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;

  color: #fff;
  font-family: inherit;
  font-size: 14px;
}

.chat-input input::placeholder {
  opacity: 0.6;
}

.chat-enviar {
  padding: 8px 14px;

  background-color: rgb(232, 73, 0);
  color: #000;
  border: none;
  border-radius: 6px;

  font-weight: bold;
  cursor: pointer;
}

.chat-enviar:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* =========================
   EMISORAS (IZQUIERDA)
   ========================= */

.emisoras {
  padding-top: 10px;
}

.emisoras-titulo {
  font-family: "Big Shoulders", sans-serif;
  font-size: 26px;
  margin-bottom: 25px;
  color: rgb(232, 73, 0);
}

.lista-emisoras {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.emisora {
  display: flex;
  gap: 14px;
  align-items: flex-start;

  /* Fallbacks */
  --glow-color: rgba(255, 255, 255, 0.5);
  --text-color: #ffffff;
}

.emisora img {
  width: 55px;
  height: auto;
}

.emisora-info h4 {
  font-size: 16px;
  color: var(--text-color);
  text-shadow:
    0 0 4px var(--glow-color),
    0 0 8px var(--glow-color);
}

.emisora-info p {
  font-size: 14px;
  line-height: 1.4;
}

.emisora-info a {
  font-size: 13px;
  color: #4c9ed9;
}

.emisora-info a:hover {
  color: #fff;
}

/* =========================
   EMISORA AL AIRE
   ========================= */

.emisora {
  position: relative;
}

/* recuadro */
.emisora.al-aire {
  padding: 12px;
  border-radius: 10px;
  background-color: rgba(232, 73, 0, 0.08);
  box-shadow: 0 0 12px rgba(232, 73, 0, 0.35);
}

/* badge */
.emisora-al-aire {
  position: absolute;
  top: -8px;
  right: -8px;

  background-color: rgb(232, 73, 0);
  color: #000;

  padding: 4px 8px;
  border-radius: 6px;

  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;

  box-shadow: 0 0 8px rgba(232, 73, 0, 0.6);
}

/* =========================
   HORARIOS
   ========================= */

.horario {
  color: var(--text-color);
}

.horario-local {
  text-shadow:
    0 0 3px var(--glow-color),
    0 0 6px var(--glow-color);
}

.doble-huso .horario-arg {
  font-size: 0.8em;
  opacity: 0.85;
}

/* =========================
   TIPOGRAFÍAS DE EMISORAS
   ========================= */

/* Radio Spectro */
.emisora-info h4.spectro {
  font-family: "Big Shoulders", sans-serif;
  font-size: 18px;
  letter-spacing: 1px;
}

/* Radio de Cultura */
.emisora-info h4.cultura {
  font-family: Helvetica, Arial, sans-serif;
  letter-spacing: -0.5px;
  font-weight: normal;
}

/* Tu vía musical */
.emisora-info h4.tuvia {
  font-family: "CooperBlack-Std", Arial, sans-serif;
  font-weight: 900;
}

/* =========================
   FACEBOOK
   ========================= */

.face-separator {
  width: 140px;
  height: 1px;
  margin-left: 30px;
  margin-top: 30px;

  background: linear-gradient(
    to right,
    transparent,
    rgba(232, 73, 0, 0.6),
    transparent
  );
}

.facebook {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.facebook span {
  letter-spacing: 2%;
  line-height: 1.3;
  padding-left: 5px;
}

.facebook-icon {
  width: 55px;
  height: 55px;
  fill: rgb(59, 89, 152);
  transition:
    transform 0.2s ease,
    fill 0.2s ease;
  border-radius: 30%;
}

.facebook a:hover .facebook-icon {
  fill: #fff;
  transform: scale(1.15);
}

/* =========================
   CONTENIDO CENTRAL
   ========================= */

.contenido-central {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#next_musician_text {
  margin-bottom: 15px;
  font-size: 20px;
}

/* =========================
   IMAGEN HOME – CONTROLADA
   ========================= */

.next-music-image-wrapper {
  width: 420px;
  max-width: 100%;
  height: 420px; /* 🔒 límite vertical real */

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  margin: 0 auto;
}

.next-music-image-wrapper img {
  max-width: 100%;
  max-height: 100%;

  width: auto;
  height: auto;

  object-fit: contain;
  display: block;
}

/* =========================
   INFO INVITADO HOME
   ========================= */

.home-invitado {
  margin-top: 12px;
  text-align: center;
  line-height: 1.2;
}

.home-invitado-linea {
  display: block;
  font-size: 1rem;
  opacity: 0.85;
}

.home-invitado-nombre {
  display: block;
  margin-top: 5px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: rgb(232, 73, 0);
}

/* =========================
   PLAYER IVOOX (DERECHA)
   ========================= */

.reproductor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* título de la sección */
.reproductor-titulo {
  font-family: "Big Shoulders", sans-serif;
  font-size: 26px;
  letter-spacing: 1px;
  color: rgb(232, 73, 0);
}

/* subtítulo */
.reproductor-subtitulo {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.75;
  margin-bottom: 6px;
}

/* iframe ivoox */
.reproductor iframe {
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(232, 73, 0, 0.15);
}

/* =========================
   AGENDA – CARRUSEL HOME
   ========================= */

.agenda-home {
  margin: 40px auto 60px;
  padding: 0 4%;
  max-width: 1100px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.agenda-home h2 {
  font-family: "Big Shoulders", sans-serif;
  font-size: 26px;
  margin-bottom: 20px;
  color: rgb(232, 73, 0);
  text-align: center;
}

/* === CONTENEDOR GENERAL === */

.agenda-carrusel {
  width: 100%;
  max-width: 420px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === VIEWPORT FIJO === */

.agenda-carrusel-viewport {
  width: 420px;
  height: 420px;

  background-color: #000;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  border-radius: 10px;
  padding: 20px;
  box-sizing: border-box;
}

/* === TRACK === */

.agenda-carrusel-track {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* === IMAGEN === */

.agenda-carrusel-track img {
  max-width: 100%;
  max-height: 100%;

  width: auto;
  height: auto;

  object-fit: contain;
  display: block;
  flex-shrink: 0;

  transition: opacity 0.4s ease;
}

/* === CONTROLES === */

.agenda-controls {
  margin-top: 14px;
  display: flex;
  gap: 18px;
}

.agenda-control {
  background: none;
  border: none;
  color: rgb(238, 162, 124);
  font-size: 22px;
  cursor: pointer;

  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.agenda-control:hover {
  transform: scale(1.2);
  color: rgb(222, 123, 73);
}

/* =========================
   AGENDA DENTRO DE ZONA EN VIVO
   ========================= */

/* Reset solo cuando HAY chat */
.live-zone.chat-activo .agenda-home {
  margin: 0;
  padding: 0;
}

/* Cuando NO hay chat, la agenda se centra */
.live-zone:not(.chat-activo) .agenda-home {
  margin: 0 auto;
}

.live-zone .agenda-home-contenido {
  flex-direction: column;
  align-items: center;
}

.live-zone .live-right {
  overflow: hidden;
}

/* =========================
   SCROLLBAR DEL CHAT
   ========================= */

/* Chrome, Edge, Safari */
.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgb(232, 135, 0), rgb(232, 73, 0));
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgb(255, 160, 60);
}

/* Firefox */
.chat-messages {
  scrollbar-width: thin;
  scrollbar-color: rgb(232, 73, 0) rgba(0, 0, 0, 0.4);
}

.chat-input {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-mensaje-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-cambiar-nombre {
  padding: 8px 12px;

  background-color: transparent;
  color: rgb(232, 73, 0);

  border: 1px solid rgb(232, 73, 0);
  border-radius: 6px;

  font-size: 13px;
  font-weight: bold;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.chat-cambiar-nombre:hover {
  background-color: rgb(232, 73, 0);
  color: #000;
}

.chat-nombre:disabled {
  opacity: 0.85;
  cursor: default;
}

/* =========================
   IDENTIDAD DEL CHAT
   ========================= */

.chat-input {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* fila nombre */
.chat-identidad {
  display: flex;
  gap: 10px;
}

.chat-nombre {
  flex: 0 0 260px;
  max-width: 260px;
}

/* botón aceptar / cambiar nombre */
.chat-nombre-btn {
  padding: 8px 14px;
  background-color: transparent;
  color: rgb(232, 73, 0);
  border: 1px solid rgb(232, 73, 0);
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.chat-nombre-btn:hover {
  background-color: rgb(232, 73, 0);
  color: #000;
}

/* fila mensaje */
.chat-mensaje {
  display: flex;
  gap: 8px;
}

/* input nombre bloqueado */
.chat-nombre:disabled {
  opacity: 0.85;
  cursor: default;
  background-color: rgba(255, 255, 255, 0.05);
  font-style: italic;
}

/* =========================
   CHAT – BORRADO CON CONFIRMACIÓN (ADMIN)
   ========================= */

/* contenedor de acciones */
.chat-delete-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
}

/* estado normal (❌) */
.chat-delete {
  background: none;
  border: none;

  font-family: inherit;
  font-size: 13px;

  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;

  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.chat-message:hover .chat-delete {
  color: rgb(232, 162, 124);
}

/* confirmación ✔ */
.chat-confirm-delete {
  background: none;
  border: none;

  font-family: inherit;
  font-size: 13px;
  font-weight: bold;

  color: rgba(160, 220, 180, 0.9);
  cursor: pointer;

  transition: color 0.2s ease;
}

.chat-confirm-delete:hover {
  color: rgb(120, 255, 170);
}

/* cancelar ✖ */
.chat-cancel-delete {
  background: none;
  border: none;

  font-family: inherit;
  font-size: 13px;

  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;

  transition: color 0.2s ease;
}

.chat-cancel-delete:hover {
  color: #fff;
}

/* ===============================
   ADMIN – VACIAR CHAT
   =============================== */

.admin-clear-confirm {
  margin-top: 8px;
  padding: 10px 14px;

  border-top: 1px solid rgba(232, 73, 0, 0.3);

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-clear-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  text-align: right;
}

.admin-clear-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-clear-confirm-btn {
  background-color: rgba(232, 73, 0, 0.9);
  color: #000;

  border: none;
  border-radius: 4px;

  padding: 4px 10px;

  font-family: "Inconsolata", monospace;
  font-size: 12px;
  font-weight: bold;

  cursor: pointer;
}

.admin-clear-confirm-btn:hover {
  background-color: rgb(232, 73, 0);
}

.admin-clear-cancel-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);

  border: none;
  font-size: 12px;
  cursor: pointer;
}

.admin-clear-cancel-btn:hover {
  color: #fff;
}

/* ===============================
   ADMIN – MODAL VACIAR CHAT
   =============================== */

.admin-modal-overlay {
  position: fixed;
  inset: 0;

  background-color: rgba(0, 0, 0, 0.75);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 2000;
}

.admin-modal {
  background-color: #000;
  border: 2px solid rgb(232, 73, 0);
  border-radius: 12px;

  padding: 24px 26px;
  width: 360px;
  max-width: 90%;

  display: flex;
  flex-direction: column;
  gap: 16px;

  text-align: center;
  box-shadow: 0 0 30px rgba(232, 73, 0, 0.4);
}

.admin-modal-title {
  font-size: 18px;
  color: rgb(232, 73, 0);
}

.admin-modal-text {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.admin-modal-text strong {
  color: #fff;
}

.admin-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* botón destructivo */
.admin-modal-confirm-btn {
  background-color: rgb(232, 73, 0);
  color: #000;

  border: none;
  border-radius: 8px;

  padding: 10px 14px;

  font-family: "Inconsolata", monospace;
  font-size: 14px;
  font-weight: bold;

  cursor: pointer;
  transition: background-color 0.2s ease;
}

.admin-modal-confirm-btn:hover {
  background-color: rgb(255, 120, 40);
}

/* cancelar */
.admin-modal-cancel-btn {
  background: transparent;
  border: none;

  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
}

.admin-modal-cancel-btn:hover {
  color: #fff;
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 600px) {
  .layout {
    grid-template-columns: 1fr;
    padding-bottom: 0;
  }

  .emisoras,
  .reproductor {
    order: 2;
    padding-top: 40px;
  }

  .contenido-central {
    order: 1;
  }

  .hero h1 {
    font-size: 70px;
  }

  header {
    justify-content: center;
  }

  /* =========================
   ZONA EN VIVO – MOBILE
   ========================= */

  .live-zone {
    margin-top: 0;
    gap: 20px;
    grid-template-columns: 1fr;
  }

  .live-zone:not(.chat-activo) .agenda-sola {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }

  .live-zone.chat-activo .live-left,
  .live-zone.chat-activo .live-center,
  .live-zone.chat-activo .live-right {
    display: block;
  }

  .live-zone.chat-activo .agenda-lateral {
    margin-top: 40px;
  }

  .agenda-lateral {
    margin-left: 0;
    margin-right: 0;
  }

  .live-zone .chat {
    max-height: none;
    z-index: 2;
  }

  .chat-nombre {
    flex: 1 1 auto;
    max-width: 100%;
  }

  .agenda-carrusel-viewport {
    width: 320px;
    height: 320px;
    padding: 16px;
  }

  .agenda-home,
  .live-zone .agenda-home-contenido {
    align-items: stretch;
    text-align: left;
  }

  .agenda-home-titulo {
    text-align: left;
  }

  .agenda-home h2 {
    font-size: 22px;
    text-align: left;
    width: 100%;
  }

  .emisoras-titulo,
  .reproductor-titulo,
  .chat-title,
  .agenda-home-titulo {
    font-size: 22px;
    line-height: 1.1;
  }

  .live-zone:not(.chat-activo) .agenda-sola {
    margin: 0;
    max-width: none;
  }

  .chat {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .next-music-image-wrapper {
    width: 100%;
    height: auto;
    max-height: none; /* proporcional al ancho del celular */
    aspect-ratio: auto;
  }

    .next-music-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 70vh;
  }
}
