/**
 * @file
 * plyr_captions.css
 * DEFINITIVE FINAL VERSION
 *
 * This file contains all styles for the Plyr Captions module.
 */

/* ==========================================================================
   1. Base Positioning & Animation
   ========================================================================== */
.plyr__captions {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 1em;
  background: none;
  transition: top 0.3s ease-in-out, bottom 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.plyr__caption {
  display: inline-block;
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.5;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@media (prefers-reduced-motion: no-preference) {
  .plyr__caption {
    animation: captionFadeInUp 0.3s ease-out forwards;
  }
  @keyframes captionFadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ==========================================================================
   2. Style Themes (Toggled by JS)
   ========================================================================== */

/* --- Style: Modern (Default) --- */
.plyr-captions--style-modern .plyr__caption {
  color: #FFFFFF; background-color: rgba(0, 0, 0, 0.75); padding: 0.3em 0.6em;
  border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); text-shadow: none;
  font-family: 'Inter', -apple-system, sans-serif; text-decoration: none;
}

/* --- Style: Classic --- */
.plyr-captions--style-classic .plyr__caption {
  color: #FFFFFF; background-color: transparent; padding: 0.2em; border-radius: 0;
  box-shadow: none; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 0.9);
  font-family: 'Inter', -apple-system, sans-serif; text-decoration: none;
}

/* --- Style: Branded --- */
.plyr-captions--style-branded .plyr__caption {
  background-color: #D31145; color: #FFFFFF; padding: 0.3em 0.6em; border-radius: 4px;
  font-family: 'Comic Neue', cursive; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3); text-decoration: none;
}

/* --- NEW Style: High Contrast --- */
.plyr-captions--style-high-contrast .plyr__caption {
  background-color: #000000;
  color: #FFFF00; /* Yellow */
  padding: 0.3em 0.6em;
  border-radius: 0;
  box-shadow: none;
  text-shadow: none;
  font-family: Arial, Helvetica, sans-serif; /* A very clear, standard font */
  text-decoration: underline; /* Underline for extra emphasis */
}


/* ==========================================================================
   3. Size Modifiers (Toggled by JS)
   ========================================================================== */
.plyr-captions--size-small   { --caption-font-size: 1.4rem; --caption-font-weight: 600; }
.plyr-captions--size-medium  { --caption-font-size: 1.7rem; --caption-font-weight: 700; }
.plyr-captions--size-large   { --caption-font-size: 2.1rem; --caption-font-weight: 700; }
.plyr-captions--size-xlarge  { --caption-font-size: 2.5rem; --caption-font-weight: 800; }

.plyr__caption {
  font-size: var(--caption-font-size);
  font-weight: var(--caption-font-weight);
}

/* ==========================================================================
   4. Position Modifiers (Toggled by JS)
   ========================================================================== */
.plyr-captions--position-bottom .plyr__captions {
  bottom: 85px; top: auto; transform: translateY(0);
}
.plyr-captions--position-center .plyr__captions {
  bottom: auto; top: 50%; transform: translateY(-50%);
}
.plyr-captions--position-top .plyr__captions {
  bottom: auto; top: 20px; transform: translateY(0);
}

/* ==========================================================================
   5. Custom Control Buttons & Visibility
   ========================================================================== */
.plyr-caption-control { display: none; }
.plyr-captions-customized .plyr-caption-control {
  display: inline-block; font-weight: bold; font-size: 16px; min-width: 40px;
  padding: 0 10px; font-family: monospace;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
  opacity: 0; transform: scale(0.8); pointer-events: none;
}
.plyr--captions-active .plyr__controls__item.plyr-caption-control {
  opacity: 1; transform: scale(1); pointer-events: auto;
}
.plyr-caption-control svg {
  width: 22px; height: 22px; padding: 2px;
}
