/* ==========================================================================
   TMDB Movie Plugin — Player & Modal Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Player Wrapper
   -------------------------------------------------------------------------- */
.tmp-player-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 28px auto;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  background: #000;
}

.tmp-player-wrap .tmp-plyr-video {
  width: 100%;
  display: block;
}

.tmp-player-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 24px 14px 8px;
  margin: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.tmp-player-wrap:hover .tmp-player-label {
  opacity: 1;
}

/* Plyr theme tweaks */
.tmp-player-wrap .plyr--video .plyr__control--overlaid {
  background: rgba(220, 38, 38, 0.90);
}
.tmp-player-wrap .plyr--video .plyr__control--overlaid:hover {
  background: rgba(220, 38, 38, 1);
}
.tmp-player-wrap .plyr__progress__buffer,
.tmp-player-wrap .plyr__volume--display {
  color: rgba(220, 38, 38, 0.7);
}

/* ==========================================================================
   CPA Modal Overlay
   ========================================================================== */
.tmp-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.tmp-modal-overlay.tmp-modal--visible {
  opacity: 1;
  pointer-events: all;
}

/* --------------------------------------------------------------------------
   Modal Box
   -------------------------------------------------------------------------- */
.tmp-modal-box {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 760px;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: #0f0f14;
}

.tmp-modal-overlay.tmp-modal--visible .tmp-modal-box {
  transform: translateY(0) scale(1);
}

/* Left: poster / backdrop image */
.tmp-modal-poster {
  flex: 0 0 220px;
  background-size: cover;
  background-position: center top;
  background-color: #1a1a22;
  min-height: 320px;
}

/* Right: content */
.tmp-modal-content {
  flex: 1;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

/* Badge */
.tmp-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  width: fit-content;
}

/* Heading */
.tmp-modal-heading {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.25;
}

/* Body text */
.tmp-modal-body {
  font-size: 15px;
  line-height: 1.6;
  color: #b0b0c0;
  margin: 0;
}

.tmp-modal-body strong {
  color: #ffffff;
}

/* CTA Button */
.tmp-modal-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 17px;
  font-weight: 700;
  padding: 16px 28px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.45);
  margin-top: 4px;
}

.tmp-modal-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(220, 38, 38, 0.6);
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff !important;
}

.tmp-modal-cta-btn:active {
  transform: translateY(0);
}

/* Sub-text */
.tmp-modal-sub {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
  text-align: center;
}

/* Close button */
.tmp-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  padding: 0;
}

.tmp-modal-close::before {
  content: '✕';
}

.tmp-modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 600px) {
  .tmp-modal-box {
    flex-direction: column;
  }

  .tmp-modal-poster {
    flex: 0 0 180px;
    min-height: 180px;
    background-position: center 20%;
  }

  .tmp-modal-content {
    padding: 20px 18px 22px;
    gap: 10px;
  }

  .tmp-modal-cta-btn {
    font-size: 15px;
    padding: 14px 20px;
  }
}

/* ==========================================================================
   Seasons Accordion
   ========================================================================== */
.tmp-seasons-accordion {
  margin: 32px 0;
}

.tmp-seasons-title {
  font-size: 1.4em;
  margin-bottom: 16px;
  font-weight: 700;
}

.tmp-accordion-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.tmp-accordion-item:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Header */
.tmp-accordion-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.tmp-accordion-header:hover {
  background: #f1f5f9;
}

.tmp-accordion-item.tmp-accordion-open > .tmp-accordion-header {
  background: #1e293b;
  color: #fff;
}

.tmp-accordion-item.tmp-accordion-open > .tmp-accordion-header .tmp-season-link {
  color: #93c5fd;
}

.tmp-accordion-title {
  flex: 1;
  font-weight: 700;
  font-size: 1em;
}

.tmp-season-link {
  color: inherit;
  text-decoration: none;
}
.tmp-season-link:hover {
  text-decoration: underline;
}

.tmp-accordion-meta {
  font-size: 0.85em;
  color: #64748b;
  white-space: nowrap;
}

.tmp-accordion-item.tmp-accordion-open .tmp-accordion-meta {
  color: #94a3b8;
}

.tmp-accordion-chevron {
  font-size: 1.1em;
  transition: transform 0.25s;
  color: #94a3b8;
}

.tmp-accordion-item.tmp-accordion-open .tmp-accordion-chevron {
  transform: rotate(180deg);
  color: #fff;
}

/* Body */
.tmp-accordion-body {
  display: none;
  padding: 0;
  border-top: 1px solid #e2e8f0;
}

.tmp-accordion-item.tmp-accordion-open > .tmp-accordion-body {
  display: block;
}

/* Episode list */
.tmp-episode-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tmp-ep-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s;
}

.tmp-ep-item:last-child {
  border-bottom: none;
}

.tmp-ep-item:hover {
  background: #f8fafc;
}

.tmp-ep-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.tmp-ep-link:hover .tmp-ep-name {
  color: #dc2626;
}

.tmp-ep-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tmp-ep-name {
  font-size: 0.93em;
  color: #334155;
  transition: color 0.15s;
}

.tmp-ep-date {
  font-size: 0.78em;
  color: #94a3b8;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Season poster (used in season template) */
.tmp-season-poster {
  max-width: 120px;
  border-radius: 6px;
  float: left;
  margin: 0 16px 12px 0;
}

.tmp-ep-still {
  max-width: 100%;
  border-radius: 0;
}

/* Episode overview (used in season template list) */
.tmp-ep-overview {
  font-size: 0.85em;
  color: #64748b;
  margin: 4px 0 0 90px;
  line-height: 1.5;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.tmp-breadcrumb {
  margin: 0 0 20px 0;
  font-size: 13px;
}

.tmp-breadcrumb-list {
  list-style: none;
  margin: 0;
  padding: 8px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.tmp-breadcrumb-item {
  display: flex;
  align-items: center;
  color: #334155;
  line-height: 1.5;
}

.tmp-breadcrumb-item a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.15s;
}

.tmp-breadcrumb-item a:hover {
  color: #dc2626;
  text-decoration: underline;
}

.tmp-breadcrumb-current {
  color: #64748b;
  font-weight: 500;
}

.tmp-breadcrumb-sep {
  color: #cbd5e1;
  padding: 0 8px;
  font-size: 14px;
  user-select: none;
}
