/* ==========================================================================
   audio.css — Dedicated Styles for Audio Books Hub & Player Pages
   ========================================================================== */

/* Active Audiobooks Navbar Tab */
.menuA { 
  color: #fbf9cd !important; 
}

/* ==========================================================================
   1. Audiobooks Directory / Index (audiobooks.html)
   ========================================================================== */

.audiobooks-hero {
  background-color: #ffffff;
  border: 1px solid #e8e2d5;
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.audiobooks-hero h2 {
  margin-top: 0;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #ccc;
}

.audiobooks-intro {
  font-size: 0.96rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 18px;
}

/* Search Box */
.search-container {
  position: relative;
  max-width: 100%;
}

.search-container i.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #8c8273;
  font-size: 0.95rem;
}

.search-input {
  width: 100%;
  height: 44px;
  padding-left: 42px;
  padding-right: 36px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.92rem;
  border-radius: 22px;
  border: 1px solid #d1c7b7;
  background-color: #fbf9f5;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.search-input:focus {
  background-color: #ffffff;
  border-color: #8B0000;
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.12);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 1rem;
  display: none;
  padding: 4px;
}
.clear-search-btn:hover { color: #333; }

/* Language Switcher */
.lang-toggle-container {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.lang-segmented-bar {
  display: inline-flex;
  background-color: #ede6d4;
  padding: 4px;
  border-radius: 24px;
  border: 1px solid #d8cfbe;
  gap: 4px;
}

.lang-tab-btn {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #495057;
  background-color: #ffffff;
  border: 1px solid #dcd5c7;
  border-radius: 20px;
  padding: 6px 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none !important;
}

.lang-tab-btn:hover:not(.active) {
  background-color: #faf7f0;
  color: #000;
}

.lang-tab-btn.active {
  background-color: #8B0000 !important;
  border-color: #8B0000 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(139, 0, 0, 0.28) !important;
}

/* A-Z Filter Strip */
.az-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 4px 2px 14px 2px;
  margin-bottom: 10px;
  scrollbar-width: thin;
}

.az-filter-wrapper::-webkit-scrollbar { height: 4px; }
.az-filter-wrapper::-webkit-scrollbar-thumb {
  background-color: #dfd7ca;
  border-radius: 4px;
}

.az-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #555;
  background-color: #ffffff;
  border: 1px solid #dfd7ca;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.az-btn:hover {
  background-color: #fbf9f4;
  border-color: #bcae98;
  color: #8B0000;
}

.az-btn.active {
  background-color: #8B0000;
  border-color: #8B0000;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(139, 0, 0, 0.2);
}

/* Letter Section Headers */
.letter-heading {
  display: flex;
  align-items: center;
  margin: 22px 0 12px 0;
  width: 100%;
}

.letter-heading .letter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #8B0000;
  color: #ffffff;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-right: 14px;
  box-shadow: 0 2px 5px rgba(139, 0, 0, 0.2);
  flex-shrink: 0;
}

.letter-heading .letter-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #dcd3c1 0%, rgba(220, 211, 193, 0.2) 100%);
}

/* Book Directory Cards */
.book-item {
  display: flex;
  align-items: stretch;
}

.book-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  border: 1px solid #e7e0d3;
  border-left: 4px solid #ded5c5;
  border-radius: 8px;
  padding: 12px 16px;
  min-height: 52px;
  text-decoration: none !important;
  color: #2b2b2b !important;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  width: 100%;
}

.book-card-link:hover {
  background-color: #fffdf7;
  border-color: #c4b69c;
  border-left-color: #8B0000;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.06);
}

.book-card-link:active {
  transform: scale(0.985);
  background-color: #f5efe6;
}

.book-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.book-card-left i.book-icon {
  color: #a69c8c;
  font-size: 0.98rem;
  flex-shrink: 0;
  transition: color 0.2s ease;
}
.book-card-link:hover i.book-icon { color: #8B0000; }

.book-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #262626;
  line-height: 1.35;
}

.title-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hindi-script {
  font-family: "Noto Serif Devanagari", serif;
  font-size: 0.94rem;
  font-weight: 500;
  color: #3e382f;
  margin-top: 3px;
  line-height: 1.35;
  letter-spacing: 0.2px;
}

.card-chevron {
  color: #ccc;
  font-size: 0.80rem;
  margin-left: 8px;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}
.book-card-link:hover .card-chevron {
  color: #8B0000;
  transform: translateX(3px);
}

.search-status-bar {
  display: none;
  font-size: 0.88rem;
  color: #666;
  margin-bottom: 14px;
  padding: 6px 12px;
  background-color: #fbf9f4;
  border-radius: 6px;
  border: 1px solid #e7ded0;
}
.search-status-bar strong { color: #8B0000; }

.cross-tab-hint {
  display: none;
  background-color: #fff9e6;
  border: 1px solid #e7d8b5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: #554b38;
  margin-bottom: 14px;
  cursor: pointer;
}
.cross-tab-hint:hover { background-color: #fff3d0; }
.cross-tab-hint strong { color: #8B0000; text-decoration: underline; }

.no-search-results {
  display: none;
  text-align: center;
  padding: 35px 15px;
  background-color: #ffffff;
  border: 1px dashed #dcd3c1;
  border-radius: 8px;
  color: #777;
  margin: 15px 0;
}

/* ==========================================================================
   2. Single Audiobook Player Page (e.g. audio-message-divine.html)
   ========================================================================== */

/* Breadcrumb */
.breadcrumb-simple {
  display: flex;
  align-items: center;
  list-style: none;
  background: transparent;
  padding: 6px 0 8px 0;
  margin-bottom: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
}
.breadcrumb-simple li {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
}
.breadcrumb-simple li + li:before {
  content: "/";
  padding: 0 8px;
  color: #888;
  font-size: 0.85rem;
}
.breadcrumb-simple a {
  color: #222;
  text-decoration: none;
}
.breadcrumb-simple a:hover { text-decoration: underline; }
.breadcrumb-simple .home-icon {
  font-size: 0.95rem;
  color: #333;
  margin-right: 6px;
}
.breadcrumb-simple .breadcrumb-current {
  color: #767676;
  font-weight: normal;
}

.desktop-h2 {
  display: block;
  margin-top: 0;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #ccc;
}
.mobile-h2 { display: none; }

/* Showcase Hero Card */
.book-showcase-card {
  background-color: #ffffff;
  border: 1px solid #e5dfd3;
  border-radius: 14px;
  padding: 22px 24px;
  margin: 14px 0 20px 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.book-author-byline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  color: #556270;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
}
.book-author-byline i {
  color: #5e6d7a;
  margin-right: 8px;
  font-size: 1.05rem;
  transform: rotate(-10deg);
}

.book-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333333;
  margin-bottom: 14px;
}

/* Metadata Specs Box */
.publication-details-card {
  background-color: #faf8f5;
  border: 1px solid #eae4d8;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.pub-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pub-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #786f63;
}
.pub-val {
  font-size: 0.88rem;
  font-weight: 500;
  color: #212529;
  line-height: 1.25;
  word-break: break-word;
}

/* Action Buttons */
.action-buttons-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 15px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 20px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.action-btn.btn-download {
  background-color: #800000;
  border: 1px solid #800000;
  color: #ffffff !important;
}
.action-btn.btn-download:hover {
  background-color: #660000;
  color: #ffffff !important;
}

.action-btn.btn-secondary-action {
  background-color: #ffffff;
  border: 1px solid #dcd5c7;
  color: #333333 !important;
}
.action-btn.btn-secondary-action:hover {
  background-color: #f7f4ee;
  color: #111111 !important;
}
.action-btn.btn-secondary-action i.fa-youtube {
  color: #cc181e;
  font-size: 0.95rem;
}

.order-drawer-box {
  background-color: #faf8f5;
  border: 1px solid #e7ded0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.order-drawer-box .btn-store {
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #ccc;
  color: #333;
}
.order-drawer-box .btn-store:hover { background: #f0ebe1; }

.book-cover {
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08);
  display: inline-block;
  margin-top: 4px;
}

/* ==========================================================================
   3. Sticky Audio Player & Controls (audio-code2.html)
   ========================================================================== */

.sticky-player-wrapper {
  position: -webkit-sticky;
  position: sticky;
  top: 8px;
  z-index: 990;
  background-color: #ffffff;
  border: 1px solid #dfd7ca;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 14px 0 20px 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
}

.player-now-playing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #666;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #ede5d8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  gap: 10px;
}
.player-now-playing strong {
  color: #8B0000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
#now-playing-track-name {
  font-weight: 700;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

/* Native Audio Element Styling */
audio#player {
  width: 100%;
  height: 44px;
  border-radius: 25px;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  outline: none;
  margin-bottom: 8px;
}

@media screen and (max-width: 767px) {
  audio#player::-webkit-media-controls-volume-control-container,
  audio#player::-webkit-media-controls-mute-button {
    display: none !important;
  }
}

/* Safe Scoped Controls */
.sticky-player-wrapper .controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
  font-size: 11pt;
}

.sticky-player-wrapper .controls .btn {
  font-size: 0.82rem !important;
  padding: 5px 12px !important;
  border-radius: 18px !important;
  background-color: #ffffff !important;
  border: 1px solid #dcd4c5 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  color: #333 !important;
  transition: all 0.15s ease;
}

.sticky-player-wrapper .controls .btn:hover {
  background-color: #f7f4ee !important;
  border-color: #c4b69c !important;
  color: #000 !important;
}

/* ==========================================================================
   4. Audio Tracklist & Chapter Formatting
   ========================================================================== */

.tracklist-title {
  font-size: 1.12rem;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  color: #555555;
  margin: 20px 0 10px 0;
  padding-bottom: 4px;
  border-bottom: 2px solid #8B0000;
}

.audiobook.list-group {
  border: none;
}

.audiobook .list-group-item {
  background-color: #ffffff !important;
  border: 1px solid #e8e3d8 !important;
  border-radius: 6px !important;
  margin-bottom: 6px !important;
  padding: 0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.audiobook .list-group-item a.track-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
  padding: 10px 14px;
  text-decoration: none !important;
  color: #333333 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.94rem;
  width: 100%;
}

.audiobook .list-group-item a.track-link i {
  color: #8B0000;
  font-size: 1.15rem;
  margin-right: 12px;
  flex-shrink: 0;
}

.track-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audiobook .list-group-item.activeChapter {
  background-color: #fff9e6 !important;
  border-left: 5px solid #8B0000 !important;
  border-color: #e5d8b8 !important;
}

.audiobook .list-group-item.activeChapter .track-title {
  font-weight: 700;
  color: #000000;
}

.audiobook .list-group-item:active {
  background-color: #f3ede2 !important;
}

@media (hover: hover) and (pointer: fine) {
  .audiobook .list-group-item:hover:not(.activeChapter) {
    background-color: #fffdf5 !important;
    border-color: #c9bc9e !important;
    transform: translateX(3px);
  }
}

/* Non-playable Chapter Banners */
.audiobook li.list-group-item.chapter-banner {
  background-color: #f1ebd9 !important;
  color: #333333 !important;
  font-weight: bold !important;
  font-size: 11pt !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none !important;
  border-left: 6px solid #800000 !important;
  border-radius: 0 4px 4px 0 !important;
  box-shadow: none !important;
  padding: 10px 15px !important;
  margin-top: 20px !important;
  margin-bottom: 5px !important;
  pointer-events: none;
}

/* ==========================================================================
   5. Listening Notes & Tips Card (audio-notes.html)
   ========================================================================== */

.audio-notes-card {
  background-color: #fcfbf8;
  border: 1px solid #e6ded1;
  border-radius: 10px;
  padding: 18px 20px;
  margin: 25px 0 15px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #e9e2d5;
  margin-bottom: 14px;
}

.notes-header h5 {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  color: #4a453d;
  font-size: 1.15rem;
  margin: 0;
  display: flex;
  align-items: center;
}

.notes-header h5 i {
  color: #8B0000;
  margin-right: 8px;
}

.notes-badge-img {
  width: 80px;
  height: auto;
  max-height: 50px;
  object-fit: contain;
  margin-left: 15px;
}

.note-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 14px;
}
.note-row:last-child { margin-bottom: 0; }

.note-icon-col {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f1ebd9;
  color: #8B0000;
  flex-shrink: 0;
  margin-right: 14px;
  margin-top: 2px;
  font-size: 0.9rem;
}

.note-icon-col.yt-icon {
  color: #c4302b;
  background-color: #fde8e7;
}

.note-body {
  flex: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #38342e;
}

.note-body b { color: #222; }
.note-body a {
  color: #8B0000;
  text-decoration: underline;
}

/* Responsive Media Queries */
@media screen and (max-width: 767px) {
  .desktop-h2 { display: none; }
  .mobile-h2 {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ccc;
  }
  .book-showcase-card { padding: 18px 16px; margin-top: 6px; }
  .publication-details-card { grid-template-columns: 1fr; gap: 10px; }
  .book-cover { max-width: 180px; margin: 4px auto 8px auto; }
}

@media screen and (max-width: 576px) {
  .audiobooks-hero { padding: 18px 14px; }
  .book-card-link { padding: 10px 12px; }
  .az-btn { min-width: 32px; height: 32px; padding: 0 8px; font-size: 0.80rem; }
  .audio-notes-card { padding: 14px 15px; }
  .notes-badge-img { width: 65px; }
  .note-row { margin-bottom: 12px; }
  .note-icon-col { width: 28px; height: 28px; font-size: 0.82rem; margin-right: 10px; }
  .note-body { font-size: 0.88rem; }
}