/* Public schedule page (templates/schedule.html)
   Goal: remove heavy inline styles and keep the page readable in all themes.
   IMPORTANT: no Django template vars in static CSS. Use CSS variables set in HTML.
*/

.schedule-public {
  /* Dynamic accent (from site settings). Fallback to theme accents. */
  --schedule-accent: var(--schedule-accent, var(--accent-secondary, var(--color-primary, #32b8c6)));
  --schedule-surface: var(--bg-secondary, rgba(0, 0, 0, 0.12));
  --schedule-border: rgba(0, 0, 0, 0.10);
  --schedule-shadow: 0 18px 46px rgba(15, 23, 42, 0.10);
  --schedule-item-bg: rgba(0, 0, 0, 0.06);
  --schedule-item-border: rgba(0, 0, 0, 0.08);
  --schedule-text: var(--text-primary, var(--color-text, #ffffff));
  --schedule-text-muted: rgba(15, 23, 42, 0.72);
}

/* If theme is dark-ish, bump item surface contrast */
html[data-theme="neon"] .schedule-public,
html[data-theme="hard_japan"] .schedule-public {
  --schedule-border: rgba(255, 255, 255, 0.14);
  --schedule-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
  --schedule-item-bg: rgba(0, 0, 0, 0.28);
  --schedule-item-border: rgba(255, 255, 255, 0.10);
  --schedule-text-muted: rgba(255, 255, 255, 0.72);
}

.schedule-public .heading.style-1 h2.schedule-public__title {
  color: var(--schedule-text) !important;
  font-size: 30px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  margin-bottom: 22px !important;
}

.schedule-public__card {
  background: var(--schedule-surface);
  border: 1px solid var(--schedule-border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--schedule-shadow);
}

/* Accent strip */
.schedule-public__card::before {
  content: "";
  display: block;
  height: 3px;
  border-radius: 10px;
  background: var(--schedule-accent);
  opacity: 0.95;
  margin-bottom: 14px;
}

.schedule-public__card--tomorrow {
  --schedule-accent: #ff9800;
}

.schedule-public__card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--schedule-text);
}

.schedule-public__card-title i {
  color: var(--schedule-accent);
}

.schedule-public__body--scroll {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.schedule-public__item {
  cursor: pointer;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--schedule-item-bg);
  border: 1px solid var(--schedule-item-border);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.schedule-public__item:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--schedule-accent) 35%, var(--schedule-item-border));
  background: color-mix(in srgb, var(--schedule-accent) 10%, var(--schedule-item-bg));
}

.schedule-public__poster {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--schedule-item-border);
  background: rgba(0, 0, 0, 0.12);
}

.schedule-public__item-title {
  margin: 0 0 6px 0 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  letter-spacing: 0.01em !important;
  color: var(--schedule-text) !important;
}

.schedule-public__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* ============================================
   DESKTOP: make cards as neat as mobile list
   ============================================ */
@media (min-width: 769px) {
  .schedule-public__poster {
    width: 70px;
    height: 98px;
    border-radius: 12px;
  }

  /* Keep original Bootstrap grid layout (poster left, title+chips center, episode right),
     only apply typography/ellipsis improvements. */

  .schedule-public__item-title {
    font-size: 18px !important;
    line-height: 1.15 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .schedule-public__chips a {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Episode badge: compact and aligned */
  .schedule-public__episode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--schedule-item-border);
    background: color-mix(in srgb, var(--schedule-accent) 18%, transparent);
    white-space: nowrap;
  }
}

.schedule-public__date {
  margin: 6px 0 0 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--schedule-text-muted) !important;
}

.schedule-public__episode {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  color: var(--schedule-text) !important;
  opacity: 0.9;
}

.schedule-public__divider {
  margin: 10px 0;
  border: 0;
  border-top: 1px solid var(--schedule-item-border);
  opacity: 1;
}

.schedule-public__empty {
  color: var(--schedule-text-muted);
  text-align: center;
  padding: 22px 12px;
  font-size: 14px;
  font-weight: 700;
}

/* Reuse existing chip classes on schedule page, but make them consistent */
.schedule-public a.btn-toggle,
.schedule-public a.btn-tag,
.schedule-public a.status-button,
.schedule-public a.voiceover-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--schedule-accent) 45%, transparent);
  background: color-mix(in srgb, var(--schedule-accent) 14%, transparent);
  color: var(--schedule-text);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

/* Colorful variants (status / voiceover) */
.schedule-public a.btn-toggle--status,
.schedule-public a.status-button {
  border-color: rgba(76, 175, 80, 0.40);
  background: rgba(76, 175, 80, 0.14);
  color: color-mix(in srgb, var(--schedule-text) 20%, #4CAF50);
}
.schedule-public a.btn-tag--voice,
.schedule-public a.voiceover-button {
  border-color: rgba(99, 102, 241, 0.42);
  background: rgba(99, 102, 241, 0.14);
  color: color-mix(in srgb, var(--schedule-text) 20%, #6366f1);
}

.schedule-public a.btn-toggle:hover,
.schedule-public a.btn-tag:hover,
.schedule-public a.status-button:hover,
.schedule-public a.voiceover-button:hover {
  transform: translateY(-1px);
  background: var(--schedule-accent);
  border-color: var(--schedule-accent);
  color: #ffffff;
}

@media (max-width: 768px) {
  .schedule-public .heading.style-1 h2.schedule-public__title {
    font-size: 24px !important;
  }
  .schedule-public__card {
    padding: 14px;
  }
  .schedule-public__poster {
    width: 48px;
    height: 64px;
  }
  
  /* МОБИЛЬНЫЕ КНОПКИ - КОМПАКТНЫЕ - ВСЕ ВАРИАНТЫ */
  .schedule-public a.btn-toggle,
  .schedule-public a.btn-tag,
  .schedule-public a.status-button,
  .schedule-public a.voiceover-button,
  .schedule-public a.schedule-page-button,
  .schedule-public .schedule-public__chips a,
  .schedule-public__item a.btn-toggle,
  .schedule-public__item a.btn-tag,
  .schedule-public__item a.status-button,
  .schedule-public__item a.voiceover-button,
  .schedule-public__item a.schedule-page-button,
  .schedule-public__body a.btn-toggle,
  .schedule-public__body a.btn-tag,
  .schedule-public__body a.status-button,
  .schedule-public__body a.voiceover-button,
  .schedule-public__body a.schedule-page-button,
  a.status-button.schedule-page-button,
  a.voiceover-button.schedule-page-button,
  .schedule-public a[class*="button"],
  .schedule-public a[class*="toggle"],
  .schedule-public a[class*="tag"] {
    font-size: 9px !important;
    font-weight: 600 !important;
    padding: 3px 6px !important;
    border-radius: 4px !important;
    gap: 2px !important;
    min-height: auto !important;
    line-height: 1.2 !important;
  }
}













