/* Topnet Lite Player — компактный UI, визуально близкий к Plyr (красный акцент). */
.tlp-player { margin-top: 14px; }
.tlp-player-ui {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb; border-radius: 12px;
  background: #fff; width: 100%; box-sizing: border-box;
}
.tlp-player-ui audio { display: none; }
.tlp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: 0 0 36px;
  border: none; border-radius: 50%; background: transparent;
  color: #1f2937; cursor: pointer; padding: 0;
  transition: background .15s;
}
.tlp-btn:hover { background: #f3f4f6; }
.tlp-btn svg { width: 22px; height: 22px; }
.tlp-play { background: var(--aiopod-color-main, #ff3a3a); color: #fff; }
.tlp-play:hover { background: var(--aiopod-color-main, #ff3a3a); opacity: .9; }
.tlp-time { font-size: 12px; color: #6b7280; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tlp-progress {
  position: relative; flex: 1 1 auto; height: 6px; min-width: 40px;
  background: #e5e7eb; border-radius: 3px; cursor: pointer;
}
.tlp-buffer, .tlp-fill { position: absolute; top: 0; left: 0; height: 100%; border-radius: 3px; }
.tlp-buffer { background: #d1d5db; width: 0; }
.tlp-fill { background: var(--aiopod-color-main, #ff3a3a); width: 0; z-index: 1; }
.tlp-thumb { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; transform: translate(-50%,-50%); background: #fff; border: 2px solid var(--aiopod-color-main, #ff3a3a); border-radius: 50%; z-index: 2; }
.tlp-speed { width: auto; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 600; color: #374151; }
.tlp-speed:hover { background: #f3f4f6; }

/* Исправление вёрстки плеера: ровное выравнивание элементов по одной линии. */
.tlp-player-ui { min-height: 44px; }
.tlp-progress { flex: 1 1 auto; }
.tlp-btn { flex: 0 0 auto; }
.tlp-time { flex: 0 0 auto; }

/* Кнопки перемотки назад/вперёд. */
.tlp-rew, .tlp-fwd { width: 25px; height: 25px; flex: 0 0 25px; }
.tlp-rew svg, .tlp-fwd svg { width: 15px; height: 15px; }
.tlp-rew, .tlp-fwd { color: #374151; }
.tlp-rew:hover, .tlp-fwd:hover { background: #f3f4f6; }

/* Блок громкости: иконка + ползунок. */
.tlp-vol { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.tlp-vol-range {
  width: 52px; max-width: 52px; flex: 0 0 52px; height: 3px;
  -webkit-appearance: none; appearance: none;
  background: #e5e7eb; border-radius: 2px; outline: none; cursor: pointer;
}
.tlp-vol-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--aiopod-color-main, #ff3a3a);
}
.tlp-vol-range::-moz-range-thumb {
  width: 7px; height: 7px; border: 1.5px solid var(--aiopod-color-main, #ff3a3a);
  background: #fff; border-radius: 50%;
}
.tlp-vol-range::-moz-range-track { height: 3px; background: #e5e7eb; border-radius: 2px; }

/* Тема Astra задаёт общий стиль input[type=range] (крупная синяя ручка 20px с рамкой),
   который перебивает наш маленький белый круг. Принудительно возвращаем свой вид. */
.tlp-vol-range::-webkit-slider-thumb {
  width: 7px !important; height: 7px !important;
  background: #fff !important;
  border: 1.5px solid var(--aiopod-color-main, #ff3a3a) !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  margin-top: 0 !important;
}
.tlp-vol-range::-moz-range-thumb {
  width: 7px !important; height: 7px !important;
  background: #fff !important;
  border: 1.5px solid var(--aiopod-color-main, #ff3a3a) !important;
  border-radius: 50% !important;
  box-shadow: none !important;
}
@media (max-width: 640px) {
  .tlp-vol-range { width: 36px; }
}

/* Кнопки переключения выпусков. */
.tlp-prev, .tlp-next { width: 30px; height: 30px; flex: 0 0 30px; color: #374151; }
.tlp-prev svg, .tlp-next svg { width: 17px; height: 17px; }
.tlp-prev:hover, .tlp-next:hover { background: #f3f4f6; }

/* Адаптивность: на средних/узких экранах убираем менее важные контролы,
   чтобы плеер не вылезал за границы. */
@media (max-width: 640px) {
  .tlp-rew, .tlp-fwd { display: none; }
  .tlp-prev, .tlp-next { width: 28px; height: 28px; flex: 0 0 28px; }
  .tlp-progress { min-width: 30px; }
}
@media (max-width: 720px) {
  .tlp-vol-range { display: none; }
}
@media (max-width: 420px) {
  .tlp-prev, .tlp-next { display: none; }
  .tlp-cur, .tlp-dur { font-size: 11px; }
}

/* Список выпусков под плеером. */
.tlp-episode-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; width: 100%; }
.tlp-episode-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb; border-radius: 12px;
  background: #fff; cursor: pointer; width: 100%; box-sizing: border-box;
  transition: background .13s, border-color .13s;
}
.tlp-episode-item:hover { background: #f9fafb; }
.tlp-episode-item.is-active { border-color: var(--aiopod-color-main, #ff3a3a); background: #fff5f5; }
.tlp-episode-item__cover { position: relative; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 8px; overflow: hidden; }
.tlp-episode-item__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tlp-episode-item__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35); color: #fff; font-size: 16px; opacity: 0; transition: opacity .15s;
}
.tlp-episode-item:hover .tlp-episode-item__play { opacity: 1; }
.tlp-episode-item__body { flex: 1; min-width: 0; }
.tlp-episode-item__title { font-weight: 600; font-size: 14px; line-height: 1.35; color: #1f2937; }
.tlp-episode-item__meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
.tlp-episode-item__dur { flex: 0 0 auto; font-size: 12px; color: #6b7280; font-variant-numeric: tabular-nums; }

/* Поиск по выпускам на странице подкаста. */
.tlp-search-wrap { position: relative; margin: 4px 0 14px; }
.tlp-search {
  width: 100%; box-sizing: border-box;
  padding: 9px 34px 9px 12px;
  border: 1px solid #e5e7eb; border-radius: 8px;
  font-size: 14px; color: #1f2937; background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.tlp-search:focus { border-color: var(--aiopod-color-main, #ff3a3a); box-shadow: 0 0 0 2px rgba(255,58,58,.12); }
.tlp-search::placeholder { color: #9ca3af; }
.tlp-search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; display: none; align-items: center; justify-content: center;
  border: none; background: #f3f4f6; border-radius: 50%;
  color: #6b7280; font-size: 12px; line-height: 1; cursor: pointer;
}
.tlp-search-wrap.has-value .tlp-search-clear { display: inline-flex; }
.tlp-episode-item.is-hidden { display: none !important; }
.tlp-search-empty { padding: 14px 12px; font-size: 14px; color: #6b7280; }

/* Кнопка «Показать ещё». */
.tlp-more-wrap { text-align: center; margin-top: 18px; margin-bottom: 40px; }
.tlp-more {
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid var(--aiopod-color-main, #ff3a3a);
  border-radius: 24px; background: transparent;
  color: var(--aiopod-color-main, #ff3a3a);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s;
}
.tlp-more:hover { background: var(--aiopod-color-main, #ff3a3a); color: #fff; }
.tlp-more__loading { display: block; margin-top: 10px; font-size: 13px; color: #6b7280; }
.tlp-more.is-hidden, .tlp-more__loading.is-hidden { display: none !important; }
@media (max-width: 480px) {
  .tlp-player-ui { gap: 8px; padding: 8px 10px; }
  .tlp-cur, .tlp-dur { font-size: 11px; }
}

/* Главная: сетка подкастов в 6 колонок на узких экранах сужает карточки,
   из-за чего названия рвутся по буквам. На малых экранах уменьшаем число
   колонок, чтобы карточки оставались читабельными. */
@media (max-width: 719px) {
  .aiopod .aiopod-grid { --aiopod-cols: 3 !important; }
  .aiopod .aiopod-card--podcast,
  .aiopod .aiopod-card--podcast .aiopod-podcast__title { max-width: none; }
}
@media (max-width: 480px) {
  .aiopod .aiopod-grid { --aiopod-cols: 2 !important; }
}
@media (max-width: 359px) {
  .aiopod .aiopod-grid { --aiopod-cols: 2 !important; }
}
.aiopod .aiopod-card--podcast .aiopod-podcast__title {
  overflow-wrap: normal; word-break: normal; overflow-wrap: break-word;
}

/* Страница подкаста (мобильный): обложка растягивается на всю ширину перед
   заголовком. Уменьшаем её и выравниваем по левому краю, чтобы выглядела
   аккуратно — симпатичный квадрат слева. */
@media (max-width: 480px) {
  .aiopod-card--podcast .aiopod-card__image-wrapper,
  .aiopod-card--podcast .aiopod-podcast__image-wrapper {
    flex: 0 0 auto;
    width: 120px !important;
    max-width: 120px;
    align-self: flex-start;
  }
  .aiopod-card--podcast .aiopod-card__image-wrapper img,
  .aiopod-card--podcast .aiopod-podcast__image-wrapper img {
    width: 120px !important;
    height: 120px !important;
    border-radius: 4px;
    object-fit: cover;
  }
}