/* KFT Media Page */

.kft-media-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  min-height: 100vh;
}

/* ---------------------------------------------------------------------------
   Sticky Player (only when transcript exists)
   --------------------------------------------------------------------------- */
.kft-media-player {
  background: #000;
  height: 50vh;
  transition: height 0.3s ease;
}

.kft-media-player.has-transcript {
  position: sticky;
  top: 0;
  z-index: 10000; /* Above Divi header (~999), below modals */
}

.admin-bar .kft-media-player {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .kft-media-player {
    top: 0px;
  }
}

.kft-media-player.is-compact {
  height: 33vh;
}

.kft-media-player iframe,
#kft-media-player {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.kft-media-external-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #1a1a1a;
}

.kft-media-external-link a {
  color: #fff;
  font-size: 1.2em;
  text-decoration: none;
  padding: 12px 24px;
  border: 1px solid #555;
  border-radius: 4px;
}

.kft-media-external-link a:hover {
  background: #333;
}

.kft-hidden {
  display: none;
}

/* ---------------------------------------------------------------------------
   Content area
   --------------------------------------------------------------------------- */
.kft-media-content {
  padding: 24px 0 80px;
}

.kft-media-meta {
  display: flex;
  gap: 8px;
  color: #111;
  font-family: neue-haas-unica-pro, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 19px;
  line-height: 19px;
  margin-bottom: 12px;
}

.kft-media-separator {
  color: #000;
}

.kft-media-title {
  margin: 0 0 6px;
  font-family: tiemposfinesemibold, "Tiempos Fine", Georgia, serif;
  font-size: 44px;
  line-height: 44px;
  color: #000;
}

.kft-media-title em {
  font-style: normal;
}

.kft-media-transcript-link {
  display: inline-block;
  margin-bottom: 0px;
  font-family: helveticaneueconbold, "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  text-decoration: underline;
  color: #000;
}

.kft-media-transcript-link:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Subtitles
   --------------------------------------------------------------------------- */
.kft-media-subtitles,
#kft-subtitles-root {
  margin-top: 24px;
}

.kft-media-subtitles-header {
  font-family: neue-haas-unica-pro, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 19px;
  color: #000;
  margin-bottom: 12px;
}

.kft-media-subtitles-label {
  margin-right: 4px;
  font-family: tiemposregital, Georgia, serif;
  font-style: italic;
  font-size: 16px;
  line-height: 22px;
}

.kft-media-subtitles-header strong {
  font-family: helveticaneueconbold, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-style: normal;
  text-transform: uppercase;
}

#kft-lang-selector {
  font-family: helveticaneueconbold, "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: 19px !important;
  line-height: 25px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  color: rgb(0, 0, 0) !important;
  padding: 4px 8px !important;
  border: none !important;
  border-bottom: 1px solid #000 !important;
  border-radius: 0 !important;
  background: transparent !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

.kft-media-subtitles-source {
  margin-left: 8px;
  color: #999;
  text-decoration: none;
  font-size: 0.9em;
}

.kft-media-subtitles-source:hover {
  text-decoration: underline;
  color: #666;
}

.kft-subtitle-loading {
  padding: 24px 0;
  color: #999;
  font-size: 0.9em;
  text-align: center;
}

.kft-media-subtitles-note {
  font-size: 0.85em;
  color: #666;
  margin: 8px 0 0;
  font-style: italic;
}

.kft-media-divider {
  border: none;
  border-top: 1px solid #000;
  margin: 0 0 16px;
}

.kft-subtitle-lang table {
  width: 100%;
  border-collapse: collapse;
}

.kft-subtitle-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.kft-subtitle-row:hover {
  background-color: #f5f5f5;
}

.kft-subtitle-row:focus {
  outline: 2px solid #000;
  outline-offset: -2px;
}

.kft-subtitle-row.active {
  background-color: #fff8e1;
}

.kft-subtitle-time {
  width: 60px;
  padding: 8px 16px 8px 0;
  vertical-align: baseline;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.kft-seek-link {
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-stretch: condensed;
  font-size: 17px;
  line-height: 23px;
  color: #000;
  text-decoration: underline;
  text-decoration-skip-ink: none;
}

.kft-subtitle-text {
  font-family: neue-haas-unica-pro, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 19px;
  padding: 8px 0;
  line-height: 25px;
}

/* ---------------------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .kft-media-player,
  .kft-subtitle-row {
    transition: none;
  }
}

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .kft-media-page {
    padding: 0 0 24px;
  }

  .kft-media-player {
    height: 33vh;
  }

  .kft-media-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .kft-media-title {
    font-size: 32px;
    line-height: 32px;
  }

  .kft-media-meta {
    gap: 4px;
    font-size: 16px;
    line-height: 150%;
  }

  .kft-media-separator {
    display: inline;
  }

  .kft-media-transcript-link {
    margin-bottom: 0;
  }

  .kft-subtitle-time {
    width: 50px;
    padding: 4px 8px 6px 0;
  }

  .kft-subtitle-text {
    padding: 6px 0;
    font-size: 17px;
    line-height: 23px;
  }

  .kft-media-subtitles,
  #kft-subtitles-root {
    margin-top: 16px;
  }
}
