/**
 * Planning Center Latest Episode Styles
 */

.pc-latest-episode-container {
  max-width: 100%;
  margin: 0 auto 30px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.pc-latest-episode-video-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.pc-latest-episode-video {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background-color: #000;
}

.pc-latest-episode-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Big play button overlay */
.pc-latest-episode-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pc-latest-episode-play-button:hover {
  background-color: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
}

.pc-latest-episode-play-button::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 15px 0 15px 26px;
  border-color: transparent transparent transparent #fff;
  margin-left: 5px; /* Adjust for visual center */
}

.pc-latest-episode-image-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.pc-latest-episode-image {
  position: relative;
}

.pc-latest-episode-image img {
  width: 100%;
  height: auto;
  display: block;
}

.pc-latest-episode-content {
  padding: 0 10px;
}

.pc-latest-episode-meta {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  justify-content: space-around;
}

.pc-latest-episode-date {
  display: inline-block;
  padding: 3px 8px;
  background-color: #f0f0f0;
  border-radius: 4px;
  font-weight: 500;
  margin: 0;
  font-size: 18px;
  color: #777;
}

.pc-latest-episode-title {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 15px;
  color: #333;
}

.pc-latest-episode-description {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #555;
}

.pc-latest-episode-player-wrapper {
  margin-top: 20px;
}

.pc-latest-episode-player {
  position: relative;
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 15px;
}

.pc-latest-episode-player audio {
  width: 100%;
}

.pc-latest-episode-error {
  padding: 15px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

@media (min-width: 768px) {
  .pc-latest-episode-container {
    display: flex;
    flex-wrap: wrap;
  }

  .pc-latest-episode-video-wrapper,
  .pc-latest-episode-image-wrapper {
    width: 60%;
    padding-right: 20px;
    margin-bottom: 0;
  }

  .pc-latest-episode-content {
    width: 40%;
    padding: 0;
  }
  
  .pc-latest-episode-play-button {
    width: 100px;
    height: 100px;
  }
  
  .pc-latest-episode-play-button::after {
    border-width: 20px 0 20px 34px;
  }
}

@media (max-width: 767px) {
  .pc-latest-episode-title {
    font-size: 28px;
  }

  .pc-latest-episode-description {
    font-size: 14px;
  }
  
  .pc-latest-episode-play-button {
    width: 60px;
    height: 60px;
  }
  
  .pc-latest-episode-play-button::after {
    border-width: 12px 0 12px 20px;
  }
}