/*
 * Madrid Teatro: valoración del público.
 * Toma los colores del tema (--main-accent, --gold) si existen; si no, usa los mismos valores.
 * Todo va dentro de .mtv para no tocar el resto de la página.
 */
.mtv {
  --mtv-acento: var(--main-accent, #c13b18);
  --mtv-oro: var(--gold, #bd9a2b);
  --mtv-texto: var(--text-color, #333);
  --mtv-suave: #6b6458;
  --mtv-borde: #e3dccb;
  --mtv-fondo: #fffdf8;
  --mtv-radio: var(--border-radius, 8px);
  box-sizing: border-box;
  margin: 2.5rem 0 1rem;
  padding: 1.25rem;
  border: 1px solid var(--mtv-borde);
  border-radius: var(--mtv-radio);
  background: var(--mtv-fondo);
  color: var(--mtv-texto);
  font-size: 1rem;
  line-height: 1.5;
}
.mtv *, .mtv *::before, .mtv *::after { box-sizing: inherit; }
.mtv[hidden] { display: none; }

.mtv-titulo {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  line-height: 1.3;
}
.mtv h3 { margin: 1.5rem 0 .75rem; font-size: 1.05rem; }
.mtv p { margin: 0 0 .75rem; }

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

/* ---------- Resumen ---------- */
.mtv-resumen { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; }
.mtv-media { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .75rem; align-items: center; }
.mtv-numero { grid-row: 1 / 3; font-size: 2.75rem; font-weight: 700; line-height: 1; }
.mtv-votos { color: var(--mtv-suave); font-size: .9rem; }
.mtv-sin-votos { color: var(--mtv-suave); }

.mtv-estrellas { display: inline-flex; gap: 1px; color: #d8d1c0; letter-spacing: 0; white-space: nowrap; }
.mtv-estrellas .llena { color: var(--mtv-oro); }
.mtv-estrellas.grandes { font-size: 1.35rem; }

.mtv-reparto { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; max-width: 22rem; }
.mtv-reparto li { display: grid; grid-template-columns: 2.6rem 1fr 2rem; align-items: center; gap: .5rem; margin: 0; font-size: .85rem; }
.mtv-reparto-n { color: var(--mtv-suave); white-space: nowrap; }
.mtv-reparto-c { text-align: right; color: var(--mtv-suave); }
.mtv-barra { height: .5rem; border-radius: 999px; background: #eee7d8; overflow: hidden; }
.mtv-barra span { display: block; height: 100%; border-radius: inherit; background: var(--mtv-oro); }

@media (min-width: 600px) {
  .mtv { padding: 1.5rem 1.75rem; }
  .mtv-resumen { flex-direction: row; align-items: center; gap: 2.5rem; }
  .mtv-reparto { flex: 1; }
}

/* ---------- Botones ---------- */
.mtv button { font: inherit; cursor: pointer; }
.mtv-boton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .55rem 1.2rem;
  border: 1px solid var(--mtv-acento); border-radius: 999px;
  background: var(--mtv-acento); color: #fff; font-weight: 600;
}
.mtv-boton:hover { filter: brightness(.92); }
.mtv-boton:disabled { opacity: .6; cursor: progress; }
.mtv-boton-secundario {
  min-height: 40px; padding: .4rem .9rem;
  border: 1px solid var(--mtv-borde); border-radius: 999px;
  background: #fff; color: var(--mtv-texto);
}
.mtv-boton-peligro { background: #a12a12; border-color: #a12a12; }
.mtv-enlace {
  min-height: 44px; padding: .4rem .25rem;
  border: 0; background: none; color: var(--mtv-acento);
  text-decoration: underline; text-underline-offset: 2px;
}
.mtv button:focus-visible, .mtv a:focus-visible, .mtv select:focus-visible,
.mtv textarea:focus-visible, .mtv input[type=text]:focus-visible {
  outline: 3px solid #2684ff; outline-offset: 2px;
}
.mtv-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .75rem; }

/* ---------- Mi valoración ---------- */
.mtv-mia { padding-top: 1rem; border-top: 1px solid var(--mtv-borde); }
.mtv-cuenta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; font-size: .9rem; }

.mtv-elegir { margin: 0 0 .75rem; padding: 0; border: 0; min-width: 0; }
.mtv-elegir legend { padding: 0; margin-bottom: .25rem; font-weight: 600; }
/* Los radios van de 5 a 1 y la fila se invierte: así «~» ilumina las estrellas de la izquierda. */
.mtv-fila-estrellas { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.mtv-fila-estrellas input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mtv .mtv-fila-estrellas label {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: 0; font-size: 2.1rem; font-weight: 400; line-height: 1;
  color: #d8d1c0; cursor: pointer; transition: color .1s, transform .1s;
}
.mtv-fila-estrellas input:checked ~ label,
.mtv-fila-estrellas label:hover,
.mtv-fila-estrellas label:hover ~ label { color: var(--mtv-oro); }
.mtv-fila-estrellas:hover input:checked ~ label:not(:hover):not(:hover ~ label) { color: #d8d1c0; }
.mtv-fila-estrellas label:hover { transform: scale(1.1); }
.mtv-fila-estrellas input:focus-visible + label { outline: 3px solid #2684ff; outline-offset: -4px; border-radius: 6px; }

.mtv textarea, .mtv input[type=text], .mtv select {
  display: block; width: 100%; max-width: 40rem;
  padding: .6rem .75rem; border: 1px solid #cfc6b2; border-radius: 6px;
  background: #fff; color: inherit; font: inherit;
}
.mtv textarea { resize: vertical; min-height: 5rem; }
.mtv label { display: block; margin-bottom: .3rem; font-weight: 600; font-size: .9rem; }
.mtv-contador { display: block; max-width: 40rem; text-align: right; color: var(--mtv-suave); font-size: .8rem; }

.mtv-estado { margin-top: .75rem; padding: .6rem .8rem; border-radius: 6px; background: #f3efe4; font-size: .9rem; }
.mtv-estado-rechazada, .mtv-estado-denunciada { background: #fbeae5; }
.mtv-aviso { padding: .6rem .8rem; border-left: 3px solid var(--mtv-oro); background: #faf5e8; font-size: .9rem; }
.mtv-letra-pequena { color: var(--mtv-suave); font-size: .82rem; }

/* ---------- Acceso ---------- */
.mtv-acceso { padding: 1rem; border: 1px solid var(--mtv-borde); border-radius: var(--mtv-radio); background: #fff; }
.mtv-acceso-motivo { font-weight: 600; }
.mtv-acceso-botones { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; margin-bottom: .75rem; min-height: 44px; }
.mtv-cargando { color: var(--mtv-suave); font-size: .9rem; }
.mtv-apple {
  display: inline-flex; align-items: center; justify-content: center;
  width: 260px; min-height: 40px; padding: .45rem 1rem;
  border: 0; border-radius: 999px; background: #000; color: #fff; font-weight: 600;
}

/* ---------- Paneles de cuenta ---------- */
.mtv-panel { margin: 0 0 1rem; padding: 1rem; border: 1px solid var(--mtv-borde); border-radius: var(--mtv-radio); background: #fff; }
.mtv-panel-peligro { border-color: #e8b4a6; }
.mtv-panel-titulo { font-weight: 700; }
.mtv-bloqueados { list-style: none; margin: 0 0 .5rem; padding: 0; }
.mtv-bloqueados li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; border-bottom: 1px solid #f0ead9; }

/* ---------- Menús ---------- */
.mtv-menu { position: relative; display: inline-block; }
.mtv-boton-icono {
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--mtv-suave);
  font-size: 1.3rem; line-height: 1;
}
.mtv-boton-icono:hover, .mtv-boton-icono[aria-expanded=true] { background: #f0ead9; }
.mtv-menu-lista {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
  min-width: 14rem; margin: 0; padding: .3rem 0; list-style: none;
  border: 1px solid var(--mtv-borde); border-radius: 8px; background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
.mtv-menu-lista[hidden] { display: none; }
.mtv-menu-lista li { margin: 0; }
.mtv-menu-lista button {
  display: block; width: 100%; min-height: 44px; padding: .55rem 1rem;
  border: 0; background: none; color: var(--mtv-texto); text-align: left;
}
.mtv-menu-lista button:hover, .mtv-menu-lista button:focus-visible { background: #f6f1e4; outline: none; }
.mtv-menu-lista button.peligro { color: #a12a12; }

/* ---------- Opiniones ---------- */
.mtv-opiniones ul { list-style: none; margin: 0; padding: 0; }
.mtv-op { position: relative; margin: 0; padding: .9rem 0; border-top: 1px solid #f0ead9; }
.mtv-op-cabecera { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; padding-right: 2.75rem; }
.mtv-op-cabecera time { color: var(--mtv-suave); font-size: .82rem; }
/* El «…» queda fijo arriba a la derecha aunque la cabecera ocupe dos líneas en el móvil. */
.mtv-op-cabecera .mtv-menu { position: absolute; top: .55rem; right: 0; }
.mtv-op-texto { margin: .35rem 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.mtv-etiqueta { padding: .1rem .55rem; border-radius: 999px; background: #f3efe4; color: var(--mtv-suave); font-size: .75rem; }
.mtv-confirmar { margin-top: .75rem; padding: .9rem; border-radius: 6px; background: #fbf3ef; }

@media (prefers-reduced-motion: reduce) {
  .mtv-fila-estrellas label { transition: none; }
  .mtv-fila-estrellas label:hover { transform: none; }
}
