/**
 * Audio Portal - Avada & WordPress Frontend Stylesheet
 * Brand: The Functional Medicine Center (#2C3E2D, #C8973E, #FDFBF7)
 */

.audio-portal-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #2C3E2D;
  background: #FDFBF7;
  border: 1px solid #E5E0D5;
  border-radius: 24px;
  padding: 28px;
  margin: 20px 0;
  box-shadow: 0 4px 24px rgba(44, 62, 45, 0.06);
  box-sizing: border-box;
}

.audio-portal-container * {
  box-sizing: border-box;
}

/* Header & Banner */
.ap-portal-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #E5E0D5;
  gap: 16px;
}

.ap-portal-title {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: bold;
  color: #2C3E2D;
  margin: 0;
}

.ap-portal-subtitle {
  font-size: 13px;
  color: #5E665E;
  margin: 4px 0 0 0;
}

.ap-search-box {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid #E5E0D5;
  border-radius: 14px;
  padding: 8px 14px;
  gap: 8px;
  min-width: 240px;
}

.ap-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: #2C3E2D;
  width: 100%;
}

/* Now Playing Hero Card */
.ap-hero-player {
  background: #FFFFFF;
  border: 1px solid #E5E0D5;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px rgba(44, 62, 45, 0.04);
}

.ap-hero-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: center;
}

@media (max-width: 768px) {
  .ap-hero-grid {
    grid-template-columns: 1fr;
  }
}

.ap-hero-cover {
  width: 100%;
  height: 200px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.ap-hero-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ap-meta-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ap-badge-cat {
  background: #2C3E2D;
  color: #FDFBF7;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.ap-badge-series {
  font-size: 12px;
  color: #7B8C7D;
  font-weight: 600;
}

.ap-hero-title {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: bold;
  color: #2C3E2D;
  margin: 0;
}

.ap-hero-presenter {
  font-size: 13px;
  color: #5E665E;
  margin: 0;
}

/* Waveform Bars */
.ap-waveform-container {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
  margin: 6px 0;
}

.ap-wave-bar {
  flex: 1;
  background: #E5E0D5;
  border-radius: 2px;
  transition: height 0.15s ease, background 0.15s ease;
  min-height: 4px;
}

.ap-wave-bar.active {
  background: #C8973E;
}

/* Progress & Controls */
.ap-progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.ap-time-text {
  font-size: 11px;
  font-family: monospace;
  font-weight: bold;
  color: #5E665E;
}

.ap-slider {
  flex: 1;
  accent-color: #C8973E;
  cursor: pointer;
}

.ap-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 12px;
}

.ap-main-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ap-btn-round {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #E5E0D5;
  background: #F5F2ED;
  color: #2C3E2D;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.ap-btn-round:hover {
  background: #E5E0D5;
}

.ap-btn-play-hero {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #C8973E;
  color: #2C3E2D;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(200, 151, 62, 0.3);
  transition: transform 0.15s ease;
}

.ap-btn-play-hero:hover {
  transform: scale(1.05);
}

.ap-speed-select {
  display: flex;
  gap: 4px;
  background: #F5F2ED;
  padding: 3px;
  border-radius: 10px;
}

.ap-speed-btn {
  border: none;
  background: transparent;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: bold;
  color: #5E665E;
  cursor: pointer;
}

.ap-speed-btn.active {
  background: #2C3E2D;
  color: #FFFFFF;
}

/* Chapter List */
.ap-chapters-shelf {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #F5F2ED;
}

.ap-chapter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ap-chapter-item:hover {
  background: #F5F2ED;
}

.ap-chapter-item.active {
  background: #F5F2ED;
  font-weight: bold;
  color: #2C3E2D;
}

/* Member Access Token Shelf */
.ap-member-auth-card {
  background: #2C3E2D;
  color: #FDFBF7;
  border-radius: 20px;
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.ap-auth-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ap-auth-input {
  background: #3D523E;
  border: 1px solid #4E674F;
  border-radius: 10px;
  color: #FFFFFF;
  padding: 8px 12px;
  font-size: 12px;
  font-family: monospace;
  outline: none;
}

.ap-auth-btn {
  background: #C8973E;
  color: #2C3E2D;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

/* Folder Nav */
.ap-folder-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ap-folder-pill {
  background: #FFFFFF;
  border: 1px solid #E5E0D5;
  color: #5E665E;
  padding: 8px 18px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ap-folder-pill.active {
  background: #2C3E2D;
  color: #FFFFFF;
  border-color: #2C3E2D;
}

/* Track Grid */
.ap-tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.ap-track-card {
  background: #FFFFFF;
  border: 1px solid #E5E0D5;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ap-track-card:hover {
  border-color: #7B8C7D;
  box-shadow: 0 6px 20px rgba(44, 62, 45, 0.08);
  transform: translateY(-2px);
}

.ap-track-card.is-active-playing {
  border-color: #C8973E;
  background: #FFFAF0;
}

.ap-track-thumb {
  width: 100%;
  height: 150px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 12px;
}

.ap-btn-play {
  background: #2C3E2D;
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}

.ap-btn-play:hover {
  background: #3D523E;
}

/* Sticky Bottom Player Dock */
.ap-sticky-player {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 920px;
  background: #2C3E2D;
  color: #FFFFFF;
  border-radius: 24px;
  padding: 14px 24px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
}

.ap-sticky-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ap-sticky-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  overflow: hidden;
}

.ap-sticky-thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
}

.ap-sticky-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ap-sticky-title {
  font-weight: bold;
  font-size: 13px;
  color: #FFFFFF;
}

.ap-sticky-presenter {
  font-size: 11px;
  color: #A3B4A5;
}

.ap-sticky-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap-ctrl-btn {
  background: #3D523E;
  color: #FFFFFF;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.ap-ctrl-btn.main-play {
  background: #C8973E;
  color: #2C3E2D;
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.ap-progress-slider {
  width: 100%;
  accent-color: #C8973E;
  cursor: pointer;
}
