/* Base Styles */
body {
  background-color: #f0f0f0;
  color: #48647A;
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 20px;
}

/* Episode Container */
.episode {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin: 10px auto;
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
}

/* Episode Title */
.episode h2 {
  margin-top: 0;
  color: #48647A;
  font-size: 1.4rem;
  padding-right: 10px; /* enough space for the pin */
}

/* Episode Description */
.episode p {
  margin: 10px 0;
  color: #333;
  word-wrap: break-word;
}

/* Episode Image */
.episode img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
  max-height: 300px;
  object-fit: contain;
}

/* Custom Audio Player */
.custom-audio-player {
  margin-top: 15px;
}

/* Controls Container */
.controls-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
  margin-bottom: 15px; /* Add some space between controls and progress bar */
}

.controls-container button {
  padding: 8px 12px;
  font-size: 14px;
  margin: 2px;
  border: none;
  border-radius: 4px;
  background-color: #333;
  color: white;
  cursor: pointer;
  flex: 1; /* make buttons distribute space evenly */
  min-width: 60px;
}



/* Button Styling */
.play-button,
.skip-button {
  background: #3F5B73;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.play-button:hover,
.skip-button:hover {
  background: #9C8A5C;
}

/* Icons and Labels in Buttons */
.play-button i,
.skip-button i {
  font-size: 1.2rem;
}

.skip-button .label {
  font-size: 0.7rem;
  margin-top: 3px;
}

/* Progress Bar */
.progress-container {
  background: #e0e0e0;  /* lighter background */
  height: 12px;         /* taller progress bar */
  border-radius: 6px;   /* smooth edges */
  cursor: pointer;
  position: relative;
  max-width: 100%;
  margin: 0 auto 10px;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.2); /* subtle shadow */
}

.progress-bar {
  background: #9C8A5C;   /* gold color for progress */
  height: 100%;
  width: 0;
  border-radius: 6px;    /* smooth edges */
  transition: width 0.2s ease-in-out; /* smooth animation */
}


/* Time Display */
.time-display {
  font-size: 0.9rem;
  color: #1f3a93;
  text-align: center;
}

.pin-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 16px;
  color: #555;
  cursor: pointer;
  padding: 4px;
  transition: color 0.3s;
}

#toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.toast {
  background-color: #333;
  color: #fff;
  padding: 10px 16px;
  margin: 10px 0;
  border-radius: 4px;
  opacity: 0.9;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  animation: fadeInOut 3s forwards;
  text-align: center;
  min-width: 200px;
  max-width: 80%;
}


@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-20px); }
  10% { opacity: 0.9; transform: translateY(0); }
  90% { opacity: 0.9; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}

/* Loading and Error Messages */
.loading-message, .error-message {
  text-align: center;
  padding: 20px;
  margin: 20px auto;
  max-width: 600px;
  border-radius: 8px;
  font-size: 1.1rem;
}

.loading-message {
  background: #e8f4fd;
  color: #2196F3;
  border: 1px solid #90CAF9;
}

.error-message {
  background: #ffebee;
  color: #f44336;
  border: 1px solid #ffcdd2;
}

/* Pagination Controls */
.pagination-controls {
  text-align: center;
  padding: 20px;
  margin: 20px auto;
  max-width: 600px;
  border-radius: 8px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
}

.pagination-info {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 15px;
}

.load-more-button {
  background: #48647A;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.load-more-button:hover {
  background: #3F5B73;
}

.load-more-button:active {
  transform: translateY(1px);
}

/* Filter Actions */
.filter-actions {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.clear-filters-button {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.clear-filters-button:hover {
  background: #c82333;
}

.clear-filters-button:active {
  transform: translateY(1px);
}

.clear-filters-button i {
  font-size: 1rem;
}

.episode-details.collapsed {
  display: none;
}

.collapsible-title-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.toggle-icon {
  font-size: 14px;
  color: #555;
}

.episode-details p a {
  text-decoration: underline;
  color: #9c8a5c;
  font-weight: bold;

}

.episode-details p.notes a {
  color: #48647A;
}
.episode-details p.notes a:link,
.episode-details p.notes a:visited {
  color: #48647A;
}
.episode-details p.notes a:hover,
.episode-details p.notes a:active {
  color: #9C8A5C; /* optional hover color */
}


.controls-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.skip-buttons-wrapper {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.skip-buttons-wrapper button {
  flex: 1;
  margin: 0 2px;
}

.play-button-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.play-button-wrapper button {
  flex: 1;
}

#floating-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #48647A;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
}

#floating-controls i {
  font-size: 24px;
}

.controls-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
}

.skip-buttons-wrapper {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 5px;
}

.skip-buttons-wrapper button {
  flex: 1;
  min-width: 50px;
  padding: 8px 12px;
}

.play-button {
  width: 100%;
  height: 60px; /* Match the skip button height */
  background: #48647A;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-play-button {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #3F5B73;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.8rem;
  padding: 20px; /* make button bigger */
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  width: 75px;
}

.floating-play-button.hidden {
  display: none;
}


/* Filter Panel Styles */
#filter-panel {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin: 10px auto;
  max-width: 600px;
  width: 100%;
  display: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#filter-panel label {
  margin-right: 10px;
}

#filter-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: #3F5B73;
  color: white;
  padding: 10px;
  border-radius: 8px;
  width: 150px;
  margin: 0 auto;
  font-size: 16px;
}

#filter-toggle i {
  margin-right: 5px;
}


/* Search Box */
#searchBox {
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
}

/* Filter Toggle Button */
#filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: #3F5B73;
  color: white;
  padding: 8px 12px;
  border-radius: 25px;
  font-size: 16px;
  transition: background-color 0.3s;
  margin-bottom: 10px;
}

#filter-toggle:hover {
  background-color: #9C8A5C;
}

/* Filter Panel Container */
#filter-panel {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin: 0 auto;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: none;
  text-align: center;
}

/* Filter Labels and Select */
#filter-panel strong {
  color: #48647A;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 5px;
}

#filter-panel select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-top: 5px;
  width: 100%;
  max-width: 200px;
  font-size: 1rem;
}


/* Search and Filter Container */
#search-and-filter {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

#search-and-filter > * {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}


/* Episode Title */
.episode-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: #48647A;
  margin-bottom: 5px;
}

/* Episode Metadata */
.episode-meta {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.episode-meta i {
  margin-right: 3px;
  color: #9C8A5C;
}

/* Episode Description */
.episode-description {
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
  background-color: #f9f9f9;
  padding: 10px;
  border-left: 4px solid #9C8A5C;
  border-radius: 5px;
  box-shadow: inset 0 0 3px rgba(0,0,0,0.1);
}

.floating-nowplaying-button {
  position: fixed;
  bottom: 100px; /* adjust as needed */
  left: 50%;
  transform: translateX(-50%);
  background-color: #3F5B73;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.8rem;
  padding: 20px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  width: 75px;
}

.floating-nowplaying-button.hidden {
  display: none;
}

.episode.now-playing {
  border: 3px solid #9C8A5C;
  box-shadow: 0 0 10px rgba(156, 138, 92, 0.5);
  background-color: #fdf8e4;
}

.episode-description {
  border-left: 4px solid #48647A;
  background-color: #f0f8ff; /* optional: light blue background to complement the theme */
  padding-left: 10px;
  margin: 10px 0;
}

.floating-play-button,
.floating-nowplaying-button {
  -webkit-tap-highlight-color: transparent;
}

/* Search and Filter Styles */
#search-and-filter {
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#searchBox {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 2px solid #48647A;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
}

#filter-toggle {
  background: #3F5B73;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  margin-bottom: 10px;
}

#filter-toggle:hover {
  background: #9C8A5C;
}

#filter-panel {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #ddd;
}

#filter-panel div {
  margin-bottom: 15px;
}

#filter-panel label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #48647A;
}

#filter-panel select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  background: white;
}

/* Loading and Error Messages */
.loading {
  text-align: center;
  padding: 40px;
  font-size: 1.2rem;
  color: #48647A;
  background-color: #fff;
  border-radius: 8px;
  margin: 20px auto;
  max-width: 600px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error {
  text-align: center;
  padding: 40px;
  font-size: 1.2rem;
  color: #d32f2f;
  background-color: #ffebee;
  border-radius: 8px;
  margin: 20px auto;
  max-width: 600px;
  border: 1px solid #f44336;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


