/* filepath: /Users/gerfriedreis/dev/ddev/plugintest3/www/wp-content/plugins/reallydecent-youtube/css/videocpt.css */
/* 
 * Styles for YouTube Video Custom Post Type Templates
 * Single Video and Archive Templates
 */

/* Common Styles */
.rdsyt-video-archive-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Single Video Template Styles */
.rdsyt-content-wrapper .rdsyt-single-video-page {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
.rdsyt-chapters-swiper-wrapper {
  margin-top: 20px;
}

.rdsyt-header-wrapper {
  background-color: #f9f9f9;
  padding: 30px 0;
  border-bottom: 1px solid #eee;
  width: 100%;
}

.rdsyt-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  width: 100%;
}

.rdsyt-single-video-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: stretch; /* Equal height columns for space-between to work */
}

.rdsyt-header-content {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.rdsyt-header-text {
  flex: 1;
}

/* Right column: Thumbnail + Meta */
.rdsyt-header-right-column {
  flex: 0 0 380px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.rdsyt-header-thumbnail {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rdsyt-header-thumbnail .rdsyt-video-thumbnail {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Header meta box */
.rdsyt-header-meta {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  width: 100%;
}

.rdsyt-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.rdsyt-meta-row:last-child {
  border-bottom: none;
}

.rdsyt-meta-row .rdsyt-meta-label {
  color: #666;
  font-weight: 500;
}

.rdsyt-meta-row .rdsyt-meta-value {
  color: #333;
  text-align: right;
}

.rdsyt-meta-row .rdsyt-meta-value a {
  color: #0073aa;
  text-decoration: none;
}

.rdsyt-meta-row .rdsyt-meta-value a:hover {
  text-decoration: underline;
}

.rdsyt-subscribe-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 16px;
  background: #ff0000;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.rdsyt-subscribe-btn:hover {
  background: #cc0000;
  color: #fff;
}

/* Content hook */
.rdsyt-content-hook {
  margin: 15px 0 20px;
  line-height: 1.6;
  color: #444;
}

.rdsyt-content-hook p {
  margin: 0 0 10px;
}

.rdsyt-content-hook p:last-child {
  margin-bottom: 0;
}

/* Video subtitle and excerpt */
.rdsyt-video-subtitle {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #555;
  font-size: 18px;
}

.rdsyt-video-title {
  font-size: 28px;
  margin-bottom: 15px;
  line-height: 1.3;
}

.rdsyt-video-excerpt {
  margin-bottom: 20px;
  line-height: 1.6;
  color: #555;
}

.rdsyt-video-meta {
  display: flex;
  flex-wrap: wrap;
  color: #666;
  font-size: 14px;
  padding: 10px 0;
  border-top: 1px solid #eee;
}

.rdsyt-video-stats {
  display: flex;
  gap: 20px;
  width: 100%;
}

.rdsyt-video-player-container {
  position: relative;
  width: 100%;
  margin-bottom: 00px;
  max-width: 100%;
  padding-bottom: 0px;
}

/* Style the plugin's video shortcode output in fullwidth mode */
.rdsyt-video-player .wyt_video_box.fullwidth {
  width: 100%;
}

.rdsyt-video-player .wyt_video_box.fullwidth .wyt_video_thumbnail {
  width: 100%;
}

.rdsyt-video-player .wyt_video_box.fullwidth .wyt_video_thumbnail img {
  width: 100%;
}

.rdsyt-video-content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
  width: 100%;
}

.rdsyt-video-content-wrapper {
  width: 100%;
  margin-bottom: 40px;
}

.rdsyt-video-content-full {
  width: 100%;
}

.rdsyt-video-main-content {
  flex: 1 1 65%;
  min-width: 300px;
}

.rdsyt-video-sidebar {
  flex: 1 1 25%;
  min-width: 250px;
}

.rdsyt-video-description {
  margin-bottom: 30px;
}

.rdsyt-description-content {
  white-space: pre-wrap;
  line-height: 1.6;
}

.rdsyt-video-tags {
  margin-bottom: 30px;
}

.rdsyt-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rdsyt-tag-link {
  display: inline-block;
  background-color: #f1f1f1;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.2s;
}

.rdsyt-tag-link:hover {
  background-color: #e0e0e0;
}

.rdsyt-related-posts,
.rdsyt-related-links {
  margin-bottom: 30px;
}

.rdsyt-related-posts-list,
.rdsyt-related-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rdsyt-related-posts-list li,
.rdsyt-related-links-list li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.rdsyt-related-posts-list a,
.rdsyt-related-links-list a {
  text-decoration: none;
  color: #0073aa;
}

.rdsyt-related-posts-list a:hover,
.rdsyt-related-links-list a:hover {
  text-decoration: underline;
}

.rdsyt-related-videos {
  margin-top: 40px;
}

.rdsyt-related-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.rdsyt-related-video-card {
  overflow: hidden;
  transition: transform 0.2s;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.rdsyt-related-video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

/* Additional styling for related videos from ExposedApi */
.rdsyt-related-video-card .wyt_video_box {
  width: 100%;
  height: 100%;
}

.rdsyt-related-video-card .wyt_video_thumbnail {
  width: 100%;
}

.rdsyt-related-video-card .wyt_video_thumbnail img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 16/9;
}

/* Archive Video Template Styles */
.rdsyt-video-archive-page {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.rdsyt-archive-header-wrapper {
  background-color: #f9f9f9;
  padding: 30px 0;
  border-bottom: 1px solid #eee;
  width: 100%;
}

.rdsyt-archive-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  width: 100%;
}

.rdsyt-archive-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}

.rdsyt-archive-title {
  font-size: 32px;
  margin-bottom: 15px;
}

.rdsyt-archive-description {
  margin-bottom: 20px;
  color: #555;
}

.rdsyt-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.rdsyt-video-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.rdsyt-video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.rdsyt-video-card-thumbnail {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 8px 8px 0 0;
}

.rdsyt-video-card-thumbnail img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.rdsyt-video-card:hover .rdsyt-video-card-thumbnail img {
  transform: scale(1.05);
}

/* Video archive badges - overlaid on thumbnail */
.rdsyt-video-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 10;
}

.rdsyt-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.rdsyt-badge-video {
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
}

.rdsyt-badge-category {
  background: linear-gradient(135deg, #43a5dc 0%, #2196f3 100%);
}

.rdsyt-video-card-subtitle {
  font-size: 14px;
  color: #555;
  margin-bottom: 15px;
  line-height: 1.5;
}

.rdsyt-video-card-content {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.rdsyt-video-card-title {
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 600;
}

.rdsyt-video-card-meta {
  display: flex;
  justify-content: space-between;
  color: #666;
  font-size: 13px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f1f1f1;
}

.rdsyt-video-card-excerpt {
  font-size: 14px;
  color: #555;
  margin-bottom: 15px;
  line-height: 1.5;
}

/* Video content wrapper restructured */
.rdsyt-video-content-wrapper {
  width: 100%;
  margin-bottom: 40px;
}

.rdsyt-video-content-full {
  width: 100%;
}

/* Further Info Section */
.rdsyt-info-wrapper {
  width: 100%;
  margin-bottom: 40px;
  padding-top: 30px;
}

.rdsyt-info-section {
  width: 100%;
}

.rdsyt-further-info {
  width: 100%;
}

.rdsyt-info-video-cards {
  margin-bottom: 30px;
}

.rdsyt-info-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.rdsyt-info-column {
  flex: 1 1 calc(50% - 10px);
  min-width: 300px;
}

.rdsyt-info-item {
  display: flex;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.rdsyt-info-thumbnail {
  width: 80px;
  height: 60px;
  overflow: hidden;
  margin-right: 10px;
  border-radius: 4px;
}

.rdsyt-info-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rdsyt-info-content {
  flex: 1;
  display: flex;
  align-items: center;
}

.rdsyt-info-content .dashicons {
  margin-right: 10px;
  color: #0073aa;
}

.rdsyt-info-content a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.rdsyt-info-content a:hover {
  color: #0073aa;
  text-decoration: underline;
}

/* Related Content Sections */
.rdsyt-related-content-sections {
  margin-top: 40px;
  width: 100%;
  padding-top: 30px;
}

.rdsyt-related-section-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  width: 100%;
}

.rdsyt-related-section {
  flex: 1 1 calc(50% - 10px);
  min-width: 300px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.rdsyt-no-content-message {
  color: #666;
  font-style: italic;
  padding: 10px 0;
}

.rdsyt-related-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.rdsyt-related-item {
  display: flex;
  flex-direction: column;
  background-color: #f9f9f9;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
  position: relative;
}

.rdsyt-related-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rdsyt-related-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0073aa;
  color: #fff;
  padding: 5px;
  font-size: 16px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 24px;
  height: 24px;
}

.rdsyt-related-item-thumbnail {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
}

.rdsyt-related-item-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rdsyt-related-section-content {
  width: 100%;
}

/* Update the sidebar related items styling */
.rdsyt-related-posts-list li,
.rdsyt-related-links-list li {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.rdsyt-related-posts-list li .dashicons,
.rdsyt-related-links-list li .dashicons {
  margin-right: 8px;
  color: #0073aa;
}

/* Description and Meta section */
.rdsyt-description-meta-wrapper {
  width: 100%;
  margin-bottom: 40px;
  padding: 30px 0;
  border-bottom: 1px solid #eee;
  background-color: #f9f9f9;
}

.rdsyt-description-meta-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Page Navigation (ToC) */
.rdsyt-page-nav-column {
  flex: 1 1 auto;
  min-width: 300px;
}

.rdsyt-page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.rdsyt-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.rdsyt-nav-btn:hover {
  border-color: #0073aa;
  color: #0073aa;
  background: #f0f7fc;
}

.rdsyt-nav-btn svg {
  flex-shrink: 0;
}

.rdsyt-meta-column {
  flex: 0 0 auto;
  min-width: 280px;
  max-width: 320px;
}

.rdsyt-page-nav-column h3,
.rdsyt-meta-column h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
  color: #333;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 10px;
  display: inline-block;
}

/* About this Video section */
.rdsyt-about-video-section {
  margin: 30px 0;
  background: #f9f9f9;
  border-radius: 8px;
}

.rdsyt-about-video-section h2 {
  margin-top: 0;
  margin-bottom: 15px;

  color: #333;
}

.rdsyt-chapter-swiper .swiper-button-next {
  color: #52c5ff;
  padding: 5px;
  border: none;
  color: white;
}
.rdsyt-chapter-swiper .swiper-button-prev {
  color: #52c5ff;
  padding: 5px;
  border: none;
  color: white;
}

.rdsyt-about-content {
  line-height: 1.7;
  color: #444;
}

.rdsyt-video-meta-details {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

.rdsyt-meta-item {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
  line-height: 1.5;
}

.rdsyt-meta-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.rdsyt-meta-label {
  font-weight: 600;
  color: #555;
  display: block;
  margin-bottom: 5px;
}

.rdsyt-meta-value {
  color: #333;
}

.rdsyt-meta-value a {
  color: #0073aa;
  text-decoration: none;
}

.rdsyt-meta-value a:hover {
  text-decoration: underline;
}

/* Tag cloud in meta section */
.rdsyt-tags-cloud {
  border-bottom: none !important;
}

.rdsyt-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.rdsyt-tag {
  display: inline-block;
  background-color: #f1f1f1;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 13px;
  color: #555;
  transition: background-color 0.2s;
}

.rdsyt-tag:hover {
  background-color: #e0e0e0;
}

/* Map Section Styles */
.rdsyt-map-section-wrapper {
  width: 100%;
  margin: 40px 0;
  padding: 30px 0;
  background-color: #f9f9f9;
}

.rdsyt-map-section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.rdsyt-map-section-header {
  margin-bottom: 20px;
}

.rdsyt-map-section-header h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 24px;
  color: #333;

  padding-bottom: 10px;
  display: inline-block;
}

.rdsyt-map-section-content {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

  width: 100%;
}

.rdsyt-map-section-content .rd-map-outer-container {
  margin: 0;
}

.rdsyt-map-section-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Additional responsive styles */
@media (max-width: 768px) {
  .rdsyt-single-video-header {
    flex-direction: column;
    padding: 0 5px;
  }

  .rdsyt-content-wrapper {
    padding: 20px 5px;
  }

  .rdsyt-header-content,
  .rdsyt-header-right-column {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }

  .rdsyt-header-right-column {
    order: -1; /* Show thumbnail first on mobile */
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .rdsyt-header-thumbnail {
    margin: 0 auto;
  }

  .rdsyt-video-content-wrapper {
    flex-direction: column;
  }

  .rdsyt-video-main-content,
  .rdsyt-video-sidebar {
    width: 100%;
  }

  .rdsyt-video-title {
    font-size: 24px;
  }

  .rdsyt-videos-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .rdsyt-description-meta-container {
    flex-direction: column;
  }

  .rdsyt-page-nav-column,
  .rdsyt-meta-column {
    width: 100%;
    max-width: 100%;
  }

  .rdsyt-page-nav {
    justify-content: center;
  }

  .rdsyt-related-section-container {
    flex-direction: column;
  }

  .rdsyt-related-section {
    width: 100%;
    min-width: 100%;
  }

  .rdsyt-map-section-content {
    height: 350px;
  }
}

@media (max-width: 480px) {
  .rdsyt-videos-grid {
    grid-template-columns: 1fr;
  }

  .rdsyt-video-stats {
    flex-direction: column;
    gap: 10px;
  }

  .rdsyt-related-items-list {
    grid-template-columns: 1fr;
  }

  .rdsyt-related-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .rdsyt-related-items-grid {
    grid-template-columns: 1fr;
  }

  .rdsyt-related-item-thumbnail {
    height: 100px;
  }

  .rdsyt-map-section-content {
    height: 300px;
  }

  .rdsyt-info-columns {
    flex-direction: column;
  }

  .rdsyt-info-column {
    width: 100%;
  }

  .rdsyt-video-meta-details {
    padding: 15px;
  }
}

/* Additional styles for better header styling */
.rdsyt-related-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
  padding-bottom: 15px;
}

.rdsyt-related-section-header h3 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 20px;
  color: #333;
}

.rdsyt-see-all {
  display: inline-block;
  color: #0073aa;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.rdsyt-see-all:hover {
  text-decoration: underline;
}

/* Related item content styling */
.rdsyt-related-item-content {
  padding: 12px;
  background-color: #fff;
}

.rdsyt-related-item-content h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.4;
}

.rdsyt-related-item-content h4 a {
  color: #333;
  text-decoration: none;
}

.rdsyt-related-item-content h4 a:hover {
  color: #0073aa;
  text-decoration: underline;
}

.rdsyt-related-item-meta {
  font-size: 13px;
  color: #666;
}

/* Map section enhancements */
.rdsyt-map-section-wrapper {
  position: relative;
  z-index: 1;
}

.rdsyt-map-section-content {
  position: relative;
  min-height: 300px;
}

.rdsyt-map-section-content .rd-content-map-container {
  border-radius: 8px;
  overflow: hidden;
}

/* Fix for map controls in mobile view */
.rdsyt-map-section-content .mapboxgl-ctrl-top-right,
.rdsyt-map-section-content .mapboxgl-ctrl-bottom-right {
  right: 10px;
}

.rdsyt-map-section-content .mapboxgl-ctrl-top-left,
.rdsyt-map-section-content .mapboxgl-ctrl-bottom-left {
  left: 10px;
}

/* Map loading and display enhancements */
.rdsyt-map-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 5;
}

.rdsyt-map-loading:after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid #eee;
  border-top: 4px solid #0073aa;
  border-radius: 50%;
  animation: rdsyt-spin 1s linear infinite;
}

@keyframes rdsyt-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Popup styling for map */
.rdsyt-map-popup {
  max-width: 250px;
}

.rdsyt-map-popup-title {
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 14px;
}

.rdsyt-map-popup-content {
  font-size: 12px;
  line-height: 1.4;
}

/* Enhanced grid display */
.rdsyt-related-items-grid {
  gap: 15px;
  margin-bottom: 10px;
}

.rdsyt-related-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Touch-friendly enhancements */
.rdsyt-related-item {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.rdsyt-related-item a {
  position: relative;
  z-index: 1;
}

.rdsyt-related-item:active {
  background-color: #f5f5f5;
}

/* Active state for touch devices */
@media (hover: none) {
  .rdsyt-related-item:active {
    transform: scale(0.98);
  }

  .rdsyt-tag-link:active {
    background-color: #e0e0e0;
  }
}

/* Additional responsive improvements */
@media (max-width: 768px) {
  .rdsyt-map-section-wrapper {
    padding: 20px 0;
  }

  .rdsyt-map-section-container {
    padding: 0;
  }

  .rdsyt-related-section {
    padding: 15px;
  }

  .rdsyt-related-item-content {
    padding: 10px;
  }

  .rdsyt-related-item-content h4 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .rdsyt-related-section-header {
    padding-bottom: 10px;
    margin-bottom: 15px;
  }

  .rdsyt-related-section-header h3 {
    font-size: 18px;
  }

  .rdsyt-related-items-grid {
    gap: 12px;
  }

  .rd-content-map-container .mapboxgl-ctrl-group button {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .rdsyt-related-item-content h4 {
    font-size: 15px;
  }

  .rdsyt-related-item-meta {
    font-size: 12px;
  }

  .rdsyt-tag-link {
    font-size: 12px;
    padding: 4px 10px;
  }

  .rdsyt-related-section-header h3 {
    font-size: 16px;
  }

  .rdsyt-see-all {
    font-size: 13px;
  }

  .rdsyt-related-items-grid {
    gap: 10px;
  }

  .rdsyt-related-item {
    margin-bottom: 10px;
  }

  .rd-content-map-container {
    width: 100% !important;
    height: 100% !important;
  }

  .rd-content-map-container .mapboxgl-map {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
  }

  .rd-content-map-container .mapboxgl-popup-content {
    padding: 10px;
    max-width: 220px;
  }

  .rd-content-map-container .mapboxgl-popup-close-button {
    font-size: 16px;
    padding: 4px 8px;
  }

  /* Optimize map controls for touch */
  .rd-content-map-container .mapboxgl-ctrl-group button {
    width: 32px;
    height: 32px;
  }

  .rdsyt-single-video-page {
    overflow-x: hidden; /* Prevent horizontal scrolling on mobile */
  }

  .rdsyt-video-subtitle {
    font-size: 16px;
  }

  .rdsyt-related-section {
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .rdsyt-related-item-icon {
    width: 20px;
    height: 20px;
    font-size: 14px;
  }

  .rdsyt-map-section-header h3,
  .rdsyt-related-section-header h3 {
    font-size: 18px;
    padding-bottom: 8px;
  }

  /* Improve touch targets for links */
  .rdsyt-info-content a,
  .rdsyt-related-item-content h4 a,
  .rdsyt-see-all {
    padding: 2px 0;
    display: inline-block;
  }
}

/* Optimize for very small screens */
@media (max-width: 360px) {
  .rdsyt-video-title {
    font-size: 20px;
  }

  .rdsyt-video-subtitle {
    font-size: 14px;
  }

  .rdsyt-content-wrapper {
    padding: 15px 10px;
  }

  .rdsyt-related-section {
    padding: 12px;
  }
}

/* Chapters Section - YouTube-style horizontal scroll cards */
.rdsyt-video-chapters {
  margin: 00px 0;
  padding: 0px 0;
}

.rdsyt-chapters-header h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  color: #333;
}
.rdsyt-chapters-header {
  display: none;
}

.rdsyt-chapters-scroll-wrapper {
  position: relative;
}

.rdsyt-chapters-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rdsyt-chapters-scroll-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rdsyt-chapters-scroll-left {
  left: -20px;
}

.rdsyt-chapters-scroll-right {
  right: -20px;
}

.rdsyt-chapters-scroll-btn svg {
  color: #606060;
  flex-shrink: 0;
}

.rdsyt-chapters-scroll-btn:hover svg {
  color: #030303;
}

.rdsyt-chapters-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #ccc #f1f1f1;
}

.rdsyt-chapters-scroll-container::-webkit-scrollbar {
  height: 8px;
}

.rdsyt-chapters-scroll-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.rdsyt-chapters-scroll-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.rdsyt-chapters-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.rdsyt-chapters-list {
  display: flex;
  gap: 12px;
  padding-bottom: 10px;
}

.rdsyt-chapter-card {
  flex: 0 0 280px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.rdsyt-chapter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: #0073aa;
}

.rdsyt-chapter-thumbnail {
  position: relative;
  width: 100%;
  height: 157px;
  overflow: hidden;
  background: #000;
}

.rdsyt-chapter-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.rdsyt-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  opacity: 0.9;
}

.rdsyt-video-placeholder svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.rdsyt-chapter-timestamp-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  font-family: "Roboto Mono", monospace;
}

.rdsyt-chapter-content {
  padding: 12px;
}

.rdsyt-chapter-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 500;
  color: #030303;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rdsyt-chapter-description {
  margin: 0;
  font-size: 12px;
  color: #606060;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rdsyt-chapter-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.rdsyt-chapter-timestamp-text {
  display: block;
  font-size: 12px;
  color: #606060;
  font-family: "Roboto Mono", monospace;
  margin-top: 4px;
}

.rdsyt-chapter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px 12px;
  position: relative;
  z-index: 10;
}

.rdsyt-chapter-link-badge {
  display: inline-block;
  background: #e8f4fc;
  color: #0073aa;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.rdsyt-chapter-link-badge:hover {
  background: #0073aa;
  color: #fff;
}

.rdsyt-chapter-link-more {
  background: #f1f1f1;
  color: #606060;
}

.rdsyt-chapter-link-more:hover {
  background: #e0e0e0;
  color: #333;
}

@media (max-width: 768px) {
  .rdsyt-chapter-card {
    flex: 0 0 240px;
  }

  .rdsyt-chapter-thumbnail {
    height: 135px;
  }

  .rdsyt-chapters-scroll-btn {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .rdsyt-chapter-card {
    flex: 0 0 200px;
  }

  .rdsyt-chapter-thumbnail {
    height: 112px;
  }

  .rdsyt-chapters-header h2 {
    font-size: 18px;
  }
}

/* Affiliate Products Section - styled like Further Info */
.rdsyt-affiliate-products {
  width: 100%;
  margin: 40px 0;
}

.rdsyt-affiliate-products h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
  color: #333;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 10px;
  display: inline-block;
}

.rdsyt-affiliate-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rdsyt-affiliate-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.rdsyt-affiliate-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.rdsyt-affiliate-content {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.rdsyt-affiliate-content .dashicons {
  margin-right: 10px;
  color: #0073aa;
  flex-shrink: 0;
}

.rdsyt-affiliate-content a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.rdsyt-affiliate-content a:hover {
  color: #0073aa;
  text-decoration: underline;
}

.rdsyt-affiliate-description {
  margin: 0 0 0 34px;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* Transcript Section */
.rdsyt-video-transcript {
  width: 100%;
  margin: 40px 0;
}

.rdsyt-video-transcript h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
  color: #333;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 10px;
  display: inline-block;
}

.rdsyt-transcript-content {
  position: relative;
  max-height: 150px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.rdsyt-transcript-content.rdsyt-transcript-expanded {
  max-height: none;
}

.rdsyt-transcript-content::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, #fff);
  pointer-events: none;
}

.rdsyt-transcript-content.rdsyt-transcript-expanded::after {
  display: none;
}

.rdsyt-transcript-text {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
}

.rdsyt-transcript-toggle {
  margin-top: 15px;
  background: #f1f1f1;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  color: #0073aa;
  font-weight: 500;
  transition: background 0.2s;
}

.rdsyt-transcript-toggle:hover {
  background: #e0e0e0;
}

@media (max-width: 768px) {
  .rdsyt-transcript-content {
    max-height: 120px;
  }
}

/* Subscribe Button */
.rdsyt-subscribe-button {
  margin-top: 8px;
}

.rdsyt-youtube-subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background-color: #ff0000;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  transition: background-color 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rdsyt-youtube-subscribe-btn:hover {
  background-color: #cc0000;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.rdsyt-youtube-subscribe-btn svg {
  flex-shrink: 0;
}

/* =====================================================
   Video Archive Header Styles
   ===================================================== */
.rdsyt-archive-header-wrapper {
  background: white;
  padding: 40px 0;
  margin-bottom: 30px;
}

.rdsyt-archive-header-wrapper.has-image {
  padding: 50px 0;
}

.rdsyt-archive-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.rdsyt-archive-header-content {
  flex: 1;
  min-width: 0;
}

.rdsyt-archive-header .rdsyt-archive-title {
  color: #1a1a1a;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 15px 0;
  line-height: 1.2;
}

.rdsyt-archive-header .rdsyt-archive-description {
  color: #555;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 600px;
}

.rdsyt-archive-header .rdsyt-archive-description p {
  margin: 0;
}

.rdsyt-archive-header-image {
  flex-shrink: 0;
  width: 300px;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.rdsyt-archive-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .rdsyt-archive-header {
    flex-direction: column;
    text-align: center;
  }

  .rdsyt-archive-header .rdsyt-archive-title {
    font-size: 1.8rem;
  }

  .rdsyt-archive-header .rdsyt-archive-description {
    font-size: 1rem;
  }

  .rdsyt-archive-header-image {
    width: 100%;
    max-width: 350px;
    height: 180px;
  }
}

/* Insider Tips Section */
.rdsyt-insider-tips-wrapper {
  width: 100%;
  margin: 40px 0;
  padding: 30px 0;
  background-color: #3dbeff;
  color: white;
  border-radius: 20px;
}

.rdsyt-insider-tips-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.rdsyt-insider-tips-header {
  margin-bottom: 20px;
}

.rdsyt-insider-tips-header h2 {
  margin: 0;
  font-size: 24px;
  color: #333;
}

.rdsyt-insider-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.rdsyt-insider-tip-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.rdsyt-insider-tip-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.rdsyt-insider-tip-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.rdsyt-insider-tip-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rdsyt-insider-tip-content {
  padding: 16px;
}

.rdsyt-insider-tip-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #333;
}

.rdsyt-insider-tip-title a {
  color: inherit;
  text-decoration: none;
}

.rdsyt-insider-tip-title a:hover {
  color: #1a73e8;
}

.rdsyt-insider-tip-description {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* Route Map Section - reuse map section styles */
.rdsyt-route-map-section-wrapper {
  width: 100%;
  margin: 40px 0;
  padding: 30px 0;
  background-color: #f0f7ff;
}

.rdsyt-route-map-section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.rdsyt-route-map-section-header {
  margin-bottom: 20px;
}

.rdsyt-route-map-section-header h2 {
  margin: 0;
  font-size: 24px;
  color: #333;
}

.rdsyt-route-map-section-content {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Insider Tips / Highlights Carousel */
.rdsyt-insider-tip-carousel,
.rdsyt-highlight-carousel {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.rdsyt-insider-tip-carousel .swiper,
.rdsyt-highlight-carousel .swiper {
  width: 100%;
  height: 100%;
}

.rdsyt-insider-tip-carousel .swiper-slide img,
.rdsyt-highlight-carousel .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rdsyt-insider-tip-carousel .swiper-button-prev,
.rdsyt-insider-tip-carousel .swiper-button-next,
.rdsyt-highlight-carousel .swiper-button-prev,
.rdsyt-highlight-carousel .swiper-button-next {
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.rdsyt-insider-tip-carousel .swiper-button-prev::after,
.rdsyt-insider-tip-carousel .swiper-button-next::after,
.rdsyt-highlight-carousel .swiper-button-prev::after,
.rdsyt-highlight-carousel .swiper-button-next::after {
  font-size: 14px;
}

.rdsyt-insider-tip-carousel .swiper-pagination-bullet,
.rdsyt-highlight-carousel .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.7;
}

.rdsyt-insider-tip-carousel .swiper-pagination-bullet-active,
.rdsyt-highlight-carousel .swiper-pagination-bullet-active {
  opacity: 1;
}

/* Insider Tips / Highlights Links */
.rdsyt-insider-tip-links,
.rdsyt-highlight-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rdsyt-insider-tip-link,
.rdsyt-highlight-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
}

.rdsyt-insider-tip-link:hover,
.rdsyt-highlight-link:hover {
  background: #e8e8e8;
  color: #1a73e8;
}

.rdsyt-insider-tip-link svg,
.rdsyt-highlight-link svg {
  opacity: 0.6;
}

/* Show on Map button */
.rdsyt-show-on-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 14px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.rdsyt-show-on-map-btn:hover {
  background: #1557b0;
  transform: translateY(-1px);
}

.rdsyt-show-on-map-btn:active {
  transform: translateY(0);
}

.rdsyt-show-on-map-btn svg {
  flex-shrink: 0;
}

/* Highlights Section - similar to Insider Tips but different color */
.rdsyt-highlights-wrapper {
  width: 100%;
  margin: 40px 0;
  padding: 30px 0;
  background-color: white;
  border-radius: 20px;
}

.rdsyt-highlights-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.rdsyt-highlights-header {
  margin-bottom: 20px;
}

.rdsyt-highlights-header h2 {
  margin: 0;
  font-size: 24px;
  color: #333;
}

.rdsyt-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.rdsyt-highlight-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.rdsyt-highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.rdsyt-highlight-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.rdsyt-highlight-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rdsyt-highlight-content {
  padding: 16px;
}

.rdsyt-highlight-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #333;
}

.rdsyt-highlight-title a {
  color: inherit;
  text-decoration: none;
}

.rdsyt-highlight-title a:hover {
  color: #1a73e8;
}

.rdsyt-highlight-description {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .rdsyt-insider-tips-wrapper,
  .rdsyt-highlights-wrapper,
  .rdsyt-route-map-section-wrapper {
    padding: 20px 0;
    margin: 20px 0;
  }

  .rdsyt-insider-tips-container,
  .rdsyt-highlights-container,
  .rdsyt-route-map-section-container {
    padding: 0 15px;
  }

  .rdsyt-insider-tips-grid,
  .rdsyt-highlights-grid {
    grid-template-columns: 1fr;
  }

  .rdsyt-insider-tips-header h2,
  .rdsyt-highlights-header h2,
  .rdsyt-route-map-section-header h2 {
    font-size: 20px;
  }
}
