/* ===== RESET SENCILLO ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
  background-color: #fff;
}

/* ===== MENSAJES ===== */
.tv-empty {
  max-width: 1200px;
  margin: 16px auto;
  font-size: 0.95rem;
}

/* ===== WRAPPER GENERAL DEL CANAL ===== */
.vtm-tv-page {
  padding-top: 0; /* antes 12px, ahora sin aire extra bajo el navbar */
}

/* ===== HERO / CABECERA ===== */
.vtm-tv-hero {
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}

.vtm-tv-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

/* Bloque marca (logo + textos) */
.vtm-tv-hero__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 0 0 auto;
}

.vtm-tv-hero__logo {
  height: 60px;
  width: auto;
  flex-shrink: 0;
}

.vtm-tv-hero__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vtm-tv-hero__title {
  margin: 0;
  font-size: 1.4rem;
}

.vtm-tv-hero__subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
}

/* Controles (buscador + filtros) */
.vtm-tv-hero__controls {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 20px;
}

/* El buscador ocupa todo el espacio central */
.tv-search-wrapper {
  flex: 1 1 auto;
}

/* Selectores a la derecha */
.tv-selects {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ===== BUSCADOR ESTILO BARRA ANCHA ===== */
.tv-search {
  display: flex;
  align-items: center;
  background: #111;
  border-radius: 999px;
  padding: 0 2px 0 14px;
  border: 1px solid #444;
  width: 100%;
  max-width: 100%;
}

.tv-search__input {
  border: none;
  background: transparent;
  padding: 8px 6px;
  font-size: 0.95rem;
  color: #fff;
  width: 100%;
  outline: none;
}

.tv-search__input::placeholder {
  color: #aaa;
}

.tv-search__button {
  border: none;
  background: #333;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tv-search__button:hover {
  background: #555;
}

.tv-search__icon {
  width: 16px;
  height: 16px;
}

/* Selects */
.tv-tag-select {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #ddd;
  font-size: 0.9rem;
  background: #fff;
  max-width: 220px;
}

/* ===== CONTENIDO PRINCIPAL (GRID SUPERIOR) ===== */
.vtm-tv-content {
  padding: 0 16px 24px;
}

/* Layout principal
   Desktop:
   +----------------------------+--------------+
   |           main            |   sidebar    |
   +----------------------------+--------------+
*/
.tv-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* COLUMNA IZQUIERDA: VÍDEO PRINCIPAL */
.tv-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Reproductor principal */
.tv-main__player {
  position: relative;
  width: 100%;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
}

.tv-main__player iframe,
.tv-main__player video {
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 0;
  display: block;
}

/* Info del vídeo principal */
.tv-main__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tv-main__title {
  margin: 0;
  font-size: 1.4rem;
}

.tv-main__meta {
  font-size: 0.9rem;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.tv-meta__separator {
  opacity: 0.7;
}

/* === Botón Me gusta simplificado === */
.tv-like-button {
  background: transparent !important;
  border: none !important;
  padding: 0 0 6px 0 !important;
  gap: 4px !important;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.tv-like-button__label {
  display: none !important; /* Oculta "Me gusta" */
}

.tv-like-button__icon {
  font-size: 1.1rem;
  color: #111;
  margin-right: 2px;
}

.tv-like-button__count {
  font-size: 0.95rem;
  color: #111;
}

.tv-like-button--disabled {
  opacity: 0.7;
  cursor: default;
}

/* Contenedor de los botones de compartir en línea */
.tv-share-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Links compartir genéricos */
.tv-share-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  text-decoration: none;
  background: #f2f2f2;
  color: #222;
  transition: background 0.15s ease, transform 0.15s ease;
}

.tv-share-link i {
  font-size: 0.9rem;
}

.tv-share-link:hover {
  background: #e5e5e5;
  transform: translateY(-1px);
}

/* ===== SIDEBAR DERECHA ===== */
.tv-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tv-sidebar__title {
  margin: 0;
  font-size: 1.1rem;
}

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

.tv-video-card {
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.05s ease, border-color 0.15s ease;
}

.tv-video-card__link {
  display: flex;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  padding: 8px;
}

.tv-video-card__thumb {
  flex: 0 0 120px;
  aspect-ratio: 16 / 9;
  background: #ddd;
  border-radius: 6px;
  overflow: hidden;
}

.tv-video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tv-video-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tv-video-card__title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.tv-video-card__date {
  margin: 0 0 2px 0;
  font-size: 0.8rem;
  color: #777;
}

.tv-video-card__meta {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
}

.tv-video-card:hover {
  border-color: #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}

/* ===== REJILLA INFERIOR ===== */
.tv-grid {
  max-width: 1200px;
  margin: 8px auto 0;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.tv-grid__title {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
}

.tv-grid__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.tv-grid-card {
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.05s ease, border-color 0.15s ease;
}

.tv-grid-card__link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.tv-grid-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ddd;
  overflow: hidden;
}

.tv-grid-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tv-grid-card__body {
  padding: 6px 8px 8px;
}

.tv-grid-card__title {
  margin: 0 0 4px 0;
  font-size: 0.9rem;
  line-height: 1.3;
}

.tv-grid-card__date {
  margin: 0 0 2px 0;
  font-size: 0.8rem;
  color: #777;
}

.tv-grid-card__meta {
  font-size: 0.8rem;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.tv-grid-card__separator {
  opacity: 0.7;
}

.tv-grid-card__likes {
  font-size: 0.8rem;
}

.tv-grid-card:hover {
  border-color: #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}

/* Loader scroll infinito */
.tv-grid__loader {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

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

/* Ajuste columnas grid grande */
@media (max-width: 1200px) {
  .tv-grid__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Tablet / móvil grande */
@media (max-width: 900px) {
  .vtm-tv-hero__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .vtm-tv-hero__controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tv-search-wrapper {
    width: 100%;
  }

  .tv-selects {
    width: 100%;
    justify-content: flex-start;
  }

  .tv-tag-select {
    flex: 1 1 0;
    width: 100%;
  }

  .vtm-tv-hero__logo {
    height: 48px;
  }

  .tv-layout {
    grid-template-columns: 1fr;
  }

  .tv-grid__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Compartir adaptado a móvil */
  .tv-share-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .tv-share-link {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .tv-share-link i {
    margin-right: 0.35rem;
    font-size: 1rem;
  }
}

/* Móvil pequeño */
@media (max-width: 600px) {
  .vtm-tv-hero__brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .tv-grid__list {
    grid-template-columns: 1fr;
  }
}
