/**
 * styles.css
 * Single consolidated stylesheet for Kirtan SPA (index.html).
 *
 * Replaces the previous custom sheet stack:
 *   capacitor.css (app-specific overrides only),
 *   theme.css, dark-theme.css,
 *   app.css, home_content_page.css,
 *   songView_page.css, all_songs_page.css
 *
 * Base Onsen UI framework styles remain on CDN:
 *   https://unpkg.com/onsenui/css/onsenui.css
 *   https://unpkg.com/onsenui/css/dark-onsen-css-components.css
 */

/* ============================================================
   CSS CUSTOM PROPERTIES (var(--x))
   ============================================================ */

/*
 * Default dark theme palette (from theme.css)
 * plus Onsen UI component variable overrides (from capacitor.css)
 * plus safe-area insets.
 */
:root {
  font-family: 'Ubuntu Sans', sans-serif; /* 1. Base property */
  --font-family: 'Charis SIL', serif; /* 3. Material components */
  --material-font-family: 'Nunito', sans-serif; /* 2. Standard components */
  /* ---- App theme palette (dark) ---- */
  --background-color: black;
  --text-color: #e0e0e0;
  --sub-text-color: #b0b0b0;
  --highlight: rgba(254, 185, 19, 1);
  --highlight-color: #feb913;
  --second-highlight-color: #ed1b24;
  --border-color: rgba(255, 255, 255, 0.25);
  --active-overlay: rgba(255, 255, 255, 0.1);
  --gray-lighter: #808080;
  --gray-light: #707070;
  --gray-dark: #606060;
  --gray-darker: #505050;
  --outer-shadow: -5px 0 10px rgba(255, 255, 255, 0.2),
                   5px 0 10px rgba(255, 255, 255, 0.2);
  --thumbnail-shadow: 0px 0px 5px 2px rgba(255, 255, 255, 0.7);
  --glass-gradient: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.08) 30%,
    rgba(255, 255, 255, 0.04) 70%,
    rgba(255, 255, 255, 0.06) 100%
  );
  --glass-border: 1px solid rgba(255, 255, 255, 0.18);
  --glass-inset-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
                        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  --separator-gradient: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  --sortable-chosen-bg: rgba(189, 189, 189, 0.2);
  --sortable-ghost-bg: rgba(189, 189, 189, 0.3);

  /* ---- App-specific layout vars ---- */
  --kirtan-accent: #ff8a3d;
  --kirtan-bg: #0d0d0d;
  --kirtan-tabbar-bg: #161616;

  /* Prevent open image in new tab */
  -webkit-user-drag:     none;
  -webkit-touch-callout: none;
  -webkit-user-select:   none;
  user-select:           none;

  /* ---- Safe-area insets ---- */
  --inset-top: env(safe-area-inset-top, 0px);
  --inset-bottom: env(safe-area-inset-bottom, 0px);
  --inset-left: env(safe-area-inset-left, 0px);
  --inset-right: env(safe-area-inset-right, 0px);

  /* ---- Onsen UI component overrides ---- */
  --button-background-color: transparent;
  --button-cta-background-color: transparent;
  --toolbar-background-color: transparent;
  --toolbar-button-color: var(--highlight-color);
  --toolbar-text-color: var(--text-color);
  --toolbar-border-color: var(--border-color);
  --button-bar-color: var(--highlight-color);
  --button-bar-active-text-color: var(--text-color);
  --button-bar-active-background-color: transparent;
  --button-light-color: var(--text-color);
  --segment-color: var(--highlight-color);
  --segment-active-text-color: var(--text-color);
  --segment-active-background-color: transparent;
  --list-background-color: transparent;
  --list-header-background-color: transparent;
  --list-tap-active-background-color: var(--active-overlay);
  --list-item-chevron-color: var(--sub-text-color);
  --progress-bar-color: var(--highlight-color);
  --progress-bar-secondary-color: var(--second-highlight-color);
  --progress-bar-background-color: transparent;
  --progress-circle-primary-color: var(--highlight-color);
  --progress-circle-secondary-color: var(--second-highlight-color);
  --progress-circle-background-color: transparent;
  --tabbar-background-color: transparent;
  --tabbar-text-color: var(--gray-lighter);
  --tabbar-highlight-text-color: var(--highlight-color);
  --tabbar-border-color: var(--border-color);
  --switch-highlight-color: #4caf50;
  --switch-border-color: rgba(255, 255, 255, 0.2);
  --switch-background-color: #424242;
  --range-track-background-color: var(--gray-dark);
  --range-track-background-color-active: var(--highlight-color);
  --range-thumb-background-color: var(--highlight-color);
  --modal-background-color: transparent;
  --modal-text-color: var(--text-color);
  --alert-dialog-background-color: transparent;
  --alert-dialog-text-color: var(--text-color);
  --alert-dialog-button-color: var(--highlight-color);
  --alert-dialog-separator-color: var(--border-color);
  --dialog-background-color: transparent;
  --dialog-text-color: var(--text-color);
  --popover-background-color: transparent;
  --popover-text-color: var(--text-color);
  --action-sheet-title-color: var(--sub-text-color);
  --action-sheet-button-separator-color: var(--border-color);
  --action-sheet-button-color: var(--highlight-color);
  --action-sheet-button-destructive-color: var(--second-highlight-color);
  --action-sheet-button-background-color: transparent;
  --action-sheet-button-active-background-color: var(--active-overlay);
  --action-sheet-cancel-button-background-color: transparent;
  --notification-background-color: var(--second-highlight-color);
  --notification-color: var(--text-color);
  --search-input-background-color: transparent;
  --fab-text-color: var(--background-color);
  --fab-background-color: var(--highlight-color);
  --fab-active-background-color: transparent;
  --card-background-color: transparent;
  --card-text-color: var(--text-color);
  --toast-background-color: var(--background-color);
  --toast-text-color: var(--text-color);
  --toast-button-text-color: var(--highlight-color);
  --select-input-color: var(--text-color);
  --select-input-border-color: var(--border-color);
  --material-background-color: var(--background-color);
  --material-text-color: var(--text-color);
  --material-notification-background-color: var(--second-highlight-color);
  --material-notification-color: var(--text-color);
  --material-switch-active-thumb-color: #4caf50;
  --material-switch-active-background-color: #2e7d32;
  --material-switch-inactive-thumb-color: #bdbdbd;
  --material-switch-inactive-background-color: #424242;
  --material-range-track-color: var(--range-track-background-color);
  --material-range-thumb-color: var(--highlight-color);
  --material-range-disabled-thumb-color: var(--gray-darker);
  --material-range-disabled-thumb-border-color: var(--material-range-disabled-thumb-color);
  --material-range-zero-thumb-color: var(--background-color);
  --material-toolbar-background-color: transparent;
  --material-toolbar-text-color: var(--text-color);
  --material-toolbar-button-color: var(--highlight-color);
  --material-segment-background-color: transparent;
  --material-segment-active-background-color: transparent;
  --material-segment-text-color: var(--sub-text-color);
  --material-segment-active-text-color: var(--text-color);
  --material-button-background-color: var(--highlight-color);
  --material-button-text-color: var(--background-color);
  --material-button-disabled-background-color: transparent;
  --material-button-disabled-color: var(--material-range-disabled-thumb-color);
  --material-flat-button-active-background-color: var(--active-overlay);
  --material-list-background-color: transparent;
  --material-list-item-separator-color: var(--border-color);
  --material-list-header-text-color: var(--sub-text-color);
  --material-checkbox-active-color: var(--highlight-color);
  --material-checkbox-inactive-color: var(--material-switch-inactive-thumb-color);
  --material-checkbox-checkmark-color: var(--background-color);
  --material-radio-button-active-color: var(--highlight-color);
  --material-radio-button-inactive-color: var(--material-switch-inactive-thumb-color);
  --material-radio-button-disabled-color: var(--material-range-disabled-thumb-color);
  --material-text-input-text-color: var(--text-color);
  --material-text-input-active-color: var(--highlight-color);
  --material-text-input-inactive-color: var(--gray-lighter);
  --material-search-background-color: transparent;
  --material-dialog-background-color: transparent;
  --material-dialog-text-color: var(--material-text-color);
  --material-alert-dialog-background-color: transparent;
  --material-alert-dialog-title-color: var(--text-color);
  --material-alert-dialog-content-color: var(--sub-text-color);
  --material-alert-dialog-button-color: var(--highlight-color);
  --material-progress-bar-primary-color: var(--highlight-color);
  --material-progress-bar-secondary-color: var(--second-highlight-color);
  --material-progress-bar-background-color: transparent;
  --material-progress-circle-primary-color: var(--highlight-color);
  --material-progress-circle-secondary-color: var(--second-highlight-color);
  --material-progress-circle-background-color: transparent;
  --material-tabbar-background-color: transparent;
  --material-tabbar-text-color: var(--tabbar-text-color);
  --material-tabbar-highlight-text-color: var(--highlight-color);
  --material-tabbar-highlight-color: transparent;
  --material-fab-text-color: var(--background-color);
  --material-fab-background-color: var(--highlight-color);
  --material-fab-active-background-color: transparent;
  --material-card-background-color: transparent;
  --material-card-text-color: var(--text-color);
  --material-toast-background-color: transparent;
  --material-toast-text-color: var(--text-color);
  --material-toast-button-text-color: var(--highlight-color);
  --material-select-input-color: var(--text-color);
  --material-select-input-active-color: var(--highlight-color);
  --material-select-input-inactive-color: var(--gray-lighter);
  --material-select-border-color: var(--border-color);
  --material-popover-background-color: transparent;
  --material-popover-text-color: var(--text-color);
  --material-action-sheet-text-color: var(--text-color);
  --tap-highlight-color: transparent;
}

/* Light theme overrides (from dark-theme.css) */
:root.theme-light {
  --background-color: #f1d0c2;
  --text-color: #1f1f21;
  --sub-text-color: #444;
  --highlight-color: #0077b6;
  --switch-highlight-color: #4caf50;
  --switch-border-color: rgba(0, 0, 0, 0.15);
  --switch-background-color: #bdbdbd;
  --material-switch-active-thumb-color: #4caf50;
  --material-switch-active-background-color: #66bb6a;
  --material-switch-inactive-thumb-color: #f5f5f5;
  --material-switch-inactive-background-color: #bdbdbd;
  --second-highlight-color: #25a6d9;
  --border-color: #ccc;
  --active-overlay: #d9d9d9;
  --gray-lighter: #757575;
  --gray-light: #777;
  --gray-dark: #555;
  --gray-darker: #31313a;
  --outer-shadow: -5px 0 20px rgba(45, 4, 6, 0.08),
                   5px 0 20px rgba(45, 4, 6, 0.08);
  --thumbnail-shadow: 0px 4px 12px rgba(45, 4, 6, 0.7);
  --glass-gradient: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.4) 30%,
    rgba(255, 255, 255, 0.2) 70%,
    rgba(255, 255, 255, 0.5) 100%
  );
  --glass-border: 1px solid rgba(255, 255, 255, 0.8);
  --glass-inset-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.9),
                        0 6px 15px rgba(45, 4, 6, 0.05);
  --separator-gradient: linear-gradient(
    to right,
    transparent,
    rgba(45, 4, 6, 0.1),
    transparent
  );
  --sortable-chosen-bg: rgba(45, 4, 6, 0.05);
  --sortable-ghost-bg: rgba(45, 4, 6, 0.1);

  --kirtan-bg: #ffffff;
  --kirtan-tabbar-bg: #f2f2f2;
  color-scheme: light;
}

:root.theme-dark {
  color-scheme: dark;
}

/* ============================================================
   CLASSES (.class-name)
   ============================================================
.shell__content, .page {
  padding-top: env(safe-area-inset-top);
}

.shell__content, .page {
  padding-bottom: env(safe-area-inset-bottom);
}
 */
/* ============================================================
   OUTLINE
   ============================================================
* { outline: 1px solid red !important; } */

/* Fix for Onsen UI tabbar blocking content clicks */
ons-tabbar.bottom-tabbar,
.ons-swiper,
.ons-swiper-target {
  pointer-events: none;
}

/* Ensure the actual tab buttons still work */
.tabbar,
.tabbar__footer {
  pointer-events: auto;
}

/* Ensure your page content explicitly allows clicks */
#tab-home,
#tab-lists,
.page__content {
  pointer-events: auto;
}

.ons-swiper-target {
  pointer-events: none;
}

.ons-swiper-blocker {
  display: none;
}

.bottom-tabbar {
  pointer-events: none;
}

.tabbar:not(.tabbar--top) {
  pointer-events: auto;
}

.tabbar__content {
  pointer-events: none;
}

/* .active */
.tabbar-btn.active {
  color: var(--highlight-color, #ff8a3d);
}

/* .author-container */
ons-toolbar .center.author-container {
  line-height: unset;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  max-width: calc(100% - 180px);  /* reserve space for left/right toolbar buttons */
  min-width: 0;
  cursor: pointer;
}

@media (max-width: 520px) {
  /* 1. Force the right section to stay visible and not wrap */
  ons-toolbar .right {
    display: flex !important;
    align-items: center;
    flex-shrink: 0; /* don’t let the center push this away */
    flex-wrap: nowrap; /* keep buttons on one line */
    overflow: visible;
  }

  /* 2. Shrink the font-size buttons slightly so 3 buttons fit comfortably */
  ons-toolbar .right .lb-icon-btn {
    padding: 4px; /* down from 8px */
  }

  ons-toolbar .right .lb-icon-btn svg {
    width: 20px; /* down from 24px */
    height: 20px;
  }

  /* 3. The menu button (ons-toolbar-button) often has extra internal padding */
  ons-toolbar .right ons-toolbar-button {
    padding: 0 4px;
  }
}

/* Individual scrolling lines */
.author-container .title-line,
.author-container .author-line {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  text-align: center;
  position: relative;
}

.author-container .title-line span,
.author-container .author-line span {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}

/* When a line overflows, left-align its container so the scroll starts from the visible edge */
.author-container .title-line.scrolls,
.author-container .author-line.scrolls {
  text-align: left;
}

.author-container .title-line span.marquee,
.author-container .author-line span.marquee {
  animation: marquee-scroll var(--marquee-duration, 8s) linear infinite alternate;
  padding-right: 16px;
}

/* .author-text */
.author-line .author-text {
  font-size: .8em;
  color: var(--sub-text-color);
  text-transform: lowercase;
  font-weight: 400;
}

.author-line { padding-bottom: 8px; }

/* Title text styling */
.title-line .title-text {
  color: var(--highlight-color);
  text-transform: capitalize;
  font-weight: 700;
  line-height: 1.2;
  font-size: 1rem;
}

@keyframes marquee-scroll {
  0%, 15%   { transform: translateX(0); }
  85%, 100% { transform: translateX(var(--marquee-offset, -50px)); }
}

/* .back-btn */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  padding: 10px 0 0 12px;
}

/* Target the icon specifically */
.back-icon:hover {
  filter: 
    drop-shadow(0 0 5px var(--highlight)) 
    drop-shadow(0 0 15px var(--highlight));
}

/* .bottom-tabbar */
.bottom-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
}

/* .bottom-tabbar__row */
.bottom-tabbar__row {
  display: flex;
  height: 56px;
  background: var(--kirtan-tabbar-bg, #161616);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* .center  — base styling provided by Onsen UI CDN */

/* .context-popover  (created dynamically in utils.js) */
/* No static rules; inherits from .popover */

/* .default_img_container */
.default_img_container {
  box-sizing: border-box;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.default_img_container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* .dialog-label */
/* No static rules; applied dynamically via JS */

/* .dialog-list */
.dialog-list {
  margin: 10px -12px;
  max-height: 40vh;
  overflow: auto;
}

/* .expandable-content */
/* No static rules; see .list-item__expandable-content below */

/* .glassy */
.alert-dialog,
.glassy,
.hr-text,
.popover,
.toast,
.toolbar,
.verse-card,
body .glassyFloat {
  background: var(--glass-gradient);
  border: var(--glass-border);
  box-shadow: var(--glass-inset-shadow);
  border-radius: 15px;
}

/* .glassyEach */
.glassyEach {
  border-radius: 15px;
}

.glassyEach > .list-item {
  background: var(--glass-gradient);
  border: var(--glass-border);
  box-shadow: var(--glass-inset-shadow);
  border-radius: 15px;
}

.glassyEach > .list-item {
  border-radius: unset;
}

/* .glassyFloat */
.alert-dialog,
.hr-text,
.popover,
.toast,
.toolbar,
body .glassyFloat {
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-radius: 15px;
  transition: all .6s cubic-bezier(.23, 1, .32, 1);
}

/* .gutter */
.gutter {
  margin: 15px;
}

/* .hr-text */
.hr-text {
  line-height: 1em;
  position: relative;
  outline: 0;
  border: 0;
  color: var(--text-color);
  text-align: center;
  height: 1.5em;
  margin: 0;
  margin-top: -1em;
  border-radius: 50%;
  background-color: inherit;
  font-size: small;
  width: 3em;
  margin-left: auto;
  margin-right: auto;
}

.hr-text::after {
  content: attr(data-content);
  position: relative;
  display: inline-block;
  padding: 0 .5em;
  line-height: 1.5em;
  color: var(--sub-text-color);
  background-color: inherit;
}

/* .isCard */
.isCard {
  padding: 0;
  display: block;
}

/* .left  — base styling provided by Onsen UI CDN */

/* .line  — no static rules; generated dynamically in JS */

/* .line-indent  (source uses .lineIndent) */
#verseList span.lineIndent:not(:last-child) {
  padding-bottom: .6em;
}

/* .list-header  — base styling provided by Onsen UI CDN */

/* .list-header--material */
.list-header--material {
  font-size: 16px;
  text-transform: uppercase;
}

/* .list-item__subtitle */
ons-list-item .list-item__subtitle {
  width: 100%;
  display: flex;
}

ons-list-item .list-item__subtitle span {
  overflow: hidden;
  text-overflow: ellipsis;
}

ons-list-item .list-item__subtitle :first-child {
  margin-right: 10px;
}

ons-list-item .list-item__subtitle :nth-child(2) {
  margin-left: auto;
  color: var(--sub-text-color);
  font-style: italic;
}

ons-list-item .list-item__subtitle span.no_right {
  margin-left: unset;
}

/* .list-item__thumbnail */
.list-item__thumbnail {
  /* box-shadow: var(--thumbnail-shadow);*/
  filter: 
    drop-shadow(0 0 2px var(--highlight-color)) 
    drop-shadow(0 0 4px var(--highlight-color));
}

/* 1. Add spacing to the container */
.list-item__right.right {
  padding-right: 16px !important;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 0 2px var(--highlight-color));
}

/* 2. Hide the existing CSS chevron */
.list-item__expand-chevron {
  /* display: none !important;*/
  display: inline-block;
}

/* 3. Handle SVG visibility based on the expanded state */
/* Assuming the parent '.list-item' gets an 'is-expanded' class */

.chevron-up {
  display: none;
}

.list-item.is-expanded .chevron-down {
  display: none;
}

.list-item.is-expanded .chevron-up {
  display: block;
}

/* .list-item__title  — base styling provided by Onsen UI CDN */

/* .listSongView */
.listSongView {
  padding: 10px;
  opacity: .8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.listSongView span {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 18px;
  color: var(--material-list-header-text-color);
}

.listSongView ons-button {
  vertical-align: middle;
  font-size: 36px;
  overflow: unset;
}

/* .mid-ellipsis  (source uses .midElli) */
.midElli {
  display: flex;
  width: 100%;
  white-space: pre;
}

.midElli .endP {
  justify-content: flex-end;
  display: inline-flex;
  white-space: pre;
  overflow: hidden;
}

.midElli .startP {
  display: inline-block;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* .nextSongBtn  — no static rules; applied dynamically in JS */

/* .no-drag  — no static rules; applied dynamically in JS */

/* .page
.page {
  position: absolute;
  width: auto;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--kirtan-bg, #0d0d0d);
  transition: transform 0.22s ease, opacity 0.22s ease;
}
 */

/* Specific adjustments for smaller mobile screens if needed */
@media (max-width: 520px) {
  .page, .page__content > shell__cont {
    inset: 0;
    /* If you must shift the top bar up, use calc to subtract pixels */
    /* padding-top: calc(env(safe-area-inset-top) - 180px); */
    padding-top: 80px !important;
    
    /* Forces the app to touch the absolute bottom of the screen */
    padding-bottom: 0px !important; 
  }
}

/* .page--enter */
.page--enter {
  transform: translateX(16px);
  opacity: 0;
}

/* .page__content */
.page .page__content {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.page__content {
  scrollbar-width: thin;
}

/* .prevSongBtn  — no static rules; applied dynamically in JS */

/* .recents-scroll */
.recents-scroll {
  max-height: 260px;
  overflow-y: auto;
}

/* .right  — base styling provided by Onsen UI CDN */

/* ═══════════════════════════════════════════════════════════
   UNIFIED SEARCH BAR — Home trigger + Search page input
   ═══════════════════════════════════════════════════════════ */

/* Base search bar shape — used by both home trigger and search input */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 14px 18px;
  box-sizing: border-box;
  background: var(--glass-gradient);
  border: var(--glass-border);
  box-shadow: var(--glass-inset-shadow);
  border-radius: 16px;
  font-size: 1.05rem;
  color: var(--text-color);
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.search-bar:hover {
  box-shadow: 0 0 12px rgba(254, 185, 19, 0.15), var(--glass-inset-shadow);
}

.search-bar .search-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: var(--highlight-color);
}

.search-bar .search-placeholder {
  color: var(--sub-text-color);
  flex: 1;
  user-select: none;
}

/* Active input variant (search page) */
.search-bar input[type="text"] {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-color);
  font-size: inherit;
  font-family: inherit;
  flex: 1;
  padding: 0;
  margin: 0;
  width: 100%;
}

.search-bar input[type="text"]::placeholder {
  color: var(--sub-text-color);
}

.search-bar .search-clear {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: var(--gray-lighter);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.search-bar.has-value .search-clear {
  opacity: 1;
}

/* Home page specific */
#tab-home .search-bar {
  margin: 16px 0;
}

/* Search page specific */
#search_page .page__content {
  position: relative;
  width: 100%;
}

#search_page .gutter {
  display: block;
  width: 100%;
  /*padding: 20px 15px 0 15px;*/
  box-sizing: border-box;
  margin: 0;
}

#search_page .search-bar-wrap {
  position: sticky;
  top: 10px;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 15px;
  box-sizing: border-box;
  margin-bottom: 16px;
}

/* Search page header row: back button + unified search bar */
.search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 15px 16px 15px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--kirtan-bg, #0d0d0d);
}

.search-header .back-btn {
  flex-shrink: 0;
  padding: 10px 0 10px 4px;
}

.search-header .search-bar {
  flex: 1;
}

/* .shell__content */
.shell__content {
  padding-bottom: 56px;
}

/* .tabbar-btn */
.tabbar-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-bottom: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.7rem;
}

/* .timeAgo  (from home_content_page.css) */
.timeAgo {
  font-size: x-small;
  padding-right: 5px;
  float: right;
  color: var(--sub-text-color);
  font-style: italic;
}

/* .trans-container */
.trans-container {
  color: var(--sub-text-color);
}

/* .trans-intro */
.trans-intro {
  text-align: center;
  font-weight: 600;
  margin-bottom: .5em;
  font-style: italic;
}

/* .verse-card */
.verse-card {
  padding: 5px 14px;
  margin-left: 0;
  margin-right: 0;
  border: none;
}

.verse-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.5;
  font-weight: 400;
  font-style: italic;
  margin: 9px 0 9px 0;
}
/* .verse-container  — no static rules; see .trans-container */

#recents-items {
  overflow-x: hidden;
}

/* ============================================================
   IDs (#id-name)
   ============================================================ */

/* #addSongToListBtn */
#addSongToListBtn {
  text-transform: uppercase;
  color: var(--highlight-color);
  border: 2px dashed;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  opacity: .8;
  margin-bottom: 0;
  font-size: 16px;
}

#addSongToListBtn > .center {
  text-align: center;
  line-height: 2em;
}

#addSongToListBtn .ons-icon,
#createListBtn .ons-icon,
.button--md-outline > .ons-icon {
  font-size: 20px;
  margin-right: 8px;
}

/* #group-nav — letter-jump grid above the all-songs list */
.group-nav {
  display: grid;
  /* Creates equal columns that fill the screen width
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));  */
  top: 0;
  z-index: 100;
  margin-bottom: 12px;
  padding: 0;
}

/* Glassy box that actually holds the grid */
.group-nav > .glassy {
  display: grid !important;
  padding: 0 15px !important;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); 
  gap: 6px;
}

/* FIX: Forces headings to break out of the button grid layout */
.group-nav .list-header--material {
  grid-column: 1 / -1; /* Spans from the very first column to the very last */
  width: 100%;
}

.group-nav-btn {
  padding: 12px 0px; 
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  background: var(--glass-gradient);
  border: var(--glass-border);
  box-shadow: var(--glass-inset-shadow);
  border-radius: 15px;
  color: var(--highlight-color);
  font-family: var(--material-font-family);
  font-size: 16px;
}

.group-nav-btn:hover {
  filter: 
    drop-shadow(0 0 5px var(--highlight-color)) 
    drop-shadow(0 0 15px var(--highlight-color));
}


/* #all-songs-list  — rendered by ons-lazy-repeat; no custom static rules */

/* #all_songs_page  — styled via .page */

/* #allSongs  — no direct styles; styled via ons-list-item */

/* #appVersion  — no custom styles; inherits text color */

/* #createListBtn */
#createListBtn {
  text-transform: uppercase;
  color: var(--highlight-color);
  border: 2px dashed;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  opacity: .8;
  margin-bottom: 0;
  font-size: 16px;
}

#createListBtn > .center {
  text-align: center;
  line-height: 2em;
}

/* #custom-lists  — no direct styles; container for dynamic list items */

/* #dialogList  — no static rules; created dynamically in JS */

/* #footerSpacer */
#footerSpacer {
  height: 33vh;
}

#footerSpacer > div {
  height: 100%;
}

#footerSpacer .listSongView {
  position: sticky;
  bottom: 0;
}

/* #infoBlurb  — uses .list-header .list-header--material */

/* #lang-{code}  — no static rules; IDs generated dynamically for language settings */

/* #list-list  — no direct styles; container for dynamic list items */

/* #list_page  — styled via .page */

/* #listBtn  — no direct styles; styled via parent ons-list-item */

/* #listMenuBtn  — no direct styles; styled via ons-toolbar */

/* #navigator */
#navigator {
  display: none;
}

/* #pronounce-list  — no direct styles; container for dynamic list items */

/* #pronounce_page  — styled via .page */

/* #pronounceGuide  — no direct styles; styled via ons-list-item */

/* #recentHeader */
#recentHeader {
  display: none;
}

/* #recents  — no direct styles; container for #recents-items */
/* Hide actions if the items list has no children */
#recents:has(#recents-items:empty) #recents-actions {
  display: none !important;
}

/* #recents-items  — no direct styles; container for dynamic recent items */

/* #search-hint-add */
#search-hint-add {
  display: none;
}

/* #search-input  — no direct styles; uses .search-box */

/* #search-list-page  — no direct styles; container for search results */

/* #search_page  — styled via .page */

/* #settings_page  — styled via .page */

/* #settingsBtn  — no direct styles; styled via ons-list-item */

/* #shareBtn  — no direct styles; styled via parent ons-list-item */

/* #shell_page  — styled via .page */

/* #songTitle  — no direct styles; content injected dynamically */

/* #songView_page */
#songView_page .page__content {
  overflow-y: auto;
  scrollbar-width: thin;
}

/* #songViewMenuBtn  — no direct styles; styled via ons-toolbar */

/* Centre the song-view menu popover like a true modal */
#songViewPopover {
  top: 25% !important;
  left: 65% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  position: fixed !important;
}

#songViewPopover .popover__arrow {
  display: none !important;
}

/* #songViewPopover */
#songViewPopover ons-list-item {
  color: var(--highlight-color);
  text-transform: uppercase;
  font-size: initial;
}

#songViewPopover ons-list-item ons-icon {
  color: var(--highlight-color);
}

#songViewPopover .list-item__left {
  min-width: 30px;
}

/* #tab-home */
/* default visible; no override needed */

/* #tab-lists */
#tab-lists {
  display: none;
}

/* #tabBtnHome  — no direct styles; styled via .tabbar-btn */

/* #tabBtnLists  — no direct styles; styled via .tabbar-btn */

/* #tattva-lists  — no direct styles; container for dynamic list items */

/* ons-fab */
#toTop {
  margin-top: 48px;
  color: var(--highlight-color);
  pointer-events: auto;
  transition: 0.3s;
  display: block;
  width: 48px;
  height: 48px;
}

#toTop:hover {
  filter: 
    drop-shadow(0 0 5px var(--highlight-color)) 
    drop-shadow(0 0 15px var(--highlight-color));
}

/* #transAvail  — no direct styles; content injected dynamically */

/* #verseList */
#verseList b {
  text-decoration: bold;
  color: var(--highlight-color);
}

#verseList span {
  display: block;
  text-indent: -1em;
  padding-left: 1em;
  font-weight: 600;
  margin-bottom: .3em;
  line-height: 1.3;
}


/* ============================================================
   data-* ATTRIBUTES
   ============================================================ */

/* [data-init-fn]  — used by router.js to identify page init functions; no styles needed */

/* [data-content]  (used on .hr-text, e.g. hr.hr-text[data-content]) */
.hr-text[data-content]::after {
  content: attr(data-content);
}


/* ============================================================
   ONSEN UI TAGS IN USE
   ============================================================
   Base Onsen UI styles are loaded from CDN:
     https://unpkg.com/onsenui/css/onsenui.css
     https://unpkg.com/onsenui/css/dark-onsen-css-components.css

   The following are app-specific overrides for Onsen components.
   --------------------------------------------------------------- */

/* ons-button */
.listSongView ons-button {
  vertical-align: middle;
  font-size: 36px;
  overflow: unset;
}

/* ons-card  — no app-specific overrides; uses CDN styles */

/* ons-icon */
.search-container > ons-icon {
  min-width: 36px;
  line-height: 26px;
  font-size: 28px;
  color: var(--highlight-color);
  margin-top: 4px;
}

.list-item .ons-icon {
  font-size: 28px;
}

.list-item--chevron .ons-icon {
  color: var(--highlight-color);
}

#broadcasts .ons-icon {
  margin-left: 6px;
}

/* ons-input  — no app-specific overrides beyond .search-box>input */

/* ons-lazy-repeat  — no app-specific overrides */

/* ons-list  — no app-specific overrides beyond glassy containers */

/* ons-list-header  — no app-specific overrides beyond .list-header--material */

/* ons-list-item */
.list-item__top,
ons-list-item {
  min-height: 62px;
}

ons-list-item .left,
ons-list-item .right {
  padding-top: 5px;
  padding-bottom: 5px;
}

#sharedLists-list ons-list-item .center,
#sharedLists-list ons-list-item .left,
ons-list-item .right {
  padding: 0;
}

ons-list-item .center:not(.isCard) {
  white-space: nowrap;
  text-overflow: ellipsis;
  display: inline-block;
  overflow: hidden;
  padding-right: 0;
  padding-top: 20px;
}

ons-list-item .center.list-item--chevron__center {
  padding-right: 6px;
}

ons-list-item .center > span {
  overflow: hidden;
  width: 100%;
}

ons-list-item .rightButton {
  padding-right: unset;
  margin-right: 3px;
}

ons-list-item .list-item__subtitle {
  width: 100%;
  display: flex;
}

ons-list-item .list-item__subtitle span {
  overflow: hidden;
  text-overflow: ellipsis;
}

ons-list-item .list-item__subtitle :first-child {
  margin-right: 10px;
}

ons-list-item .list-item__subtitle :nth-child(2) {
  margin-left: auto;
  color: var(--sub-text-color);
  font-style: italic;
}

ons-list-item .list-item__subtitle span.no_right {
  margin-left: unset;
}

/* ons-page  — base styling provided by Onsen UI CDN; see .page for SPA override */

/* ons-popover */
ons-popover div.popover__content {
  width: 180px;
  min-height: 0;
}

/* ons-radio  — no app-specific overrides */

/* ons-tabbar  — replaced by custom .bottom-tabbar in this SPA */

/* ons-toolbar
ons-toolbar .center.author-container {
  line-height: unset;
  display: flex;
  flex-direction: column;
  justify-content: center;
} */

.toolbar {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border: none;
}

.toolbar--material__left > .back-button,
.toolbar--material__right > .toolbar-button {
  display: flex !important;
  justify-content: center;
}

/* ============================================================
   SAFE-AREA HANDLING (single source of truth)
   ============================================================ */

html, body {
  height: 100%;
  margin: 0;
  overscroll-behavior: none;
}

#app {
  position: relative;
  height: 100dvh;
}

/* .page is position: fixed (see base rule) — so safe areas must be
   applied as padding on the page itself, not margin on an ancestor. */
.page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--kirtan-bg, #0d0d0d);
  transition: transform 0.22s ease, opacity 0.22s ease;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  box-sizing: border-box;
}

/* Toolbar sits in normal flow inside the padded .page, so it's
   automatically clear of the notch — no top/position overrides needed. */
ons-toolbar {
  position: relative;
}

/* Bottom tabbar is its own fixed element (see .bottom-tabbar), so it
   needs its own bottom-inset padding rather than inheriting .page's. */
.bottom-tabbar {
  padding-bottom: env(safe-area-inset-bottom);
}

.page__content {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   ADDITIONAL APP-SPECIFIC HELPERS STYLES.CSS
   ============================================================ */

/* Force-update spinner */
@keyframes spin-360 {
  to { transform: rotate(360deg); }
}
#forceUpdateBtn.is-working .update-icon {
  animation: spin-360 1s linear infinite;
}

/* Sharp, glow-free switches */
.switch,
.switch__toggle,
.switch__handle {
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Crisp thumb — flat white like modern iOS */
.switch__handle {
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* Subtle border on the track for edge definition */
.switch__toggle {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Light theme track border override */
:root.theme-light .switch__toggle {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* SortableJS helpers */
.sortable-chosen {
  background-color: var(--sortable-chosen-bg);
  margin-top: 5px;
  margin-left: 20px;
}

.sortable-ghost {
  background-color: var(--sortable-ghost-bg);
}

/* Subtitle helper */
.subText {
  font-style: italic;
  left: 10px;
  position: relative;
  width: calc(100% - 10px);
}

/* Button outline helper */
.button--md-outline {
  border: 1px solid;
  font-size: 18px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* List item separator override */
.list-item:not(:last-child) > .center:not(.isCard),
.list-item__top:not(:last-child) > .center:not(.isCard) {
  background-image: var(--separator-gradient);
}

/* List item chevron override */
.list-item--chevron:before {
  border-color: var(--highlight-color);
}

/* Material list item padding */
.list-item--material {
  padding: 0 12px;
}

/* Broadcasts / chevron left min-width */
#broadcasts .list-item .list-item--material__left,
.list-item--chevron .list-item--material__left {
  min-width: 44px;
}

/* Expandable content */
.list-item__expandable-content {
  /* width: 100vw;*/
  padding: 0 5% 0 5%;
  margin-bottom: 12px;
}

/* Alert-dialog content spacing */
.alert-dialog-content {
  margin: 10px 0;
}

/* HOME BOTTOM DOCK BAR */

/* 1. Reset: Remove the default Onsen UI chevron borders for these specific items */
#allSongs::before,
#authorsBtn::before,
#pronounceGuide::before,
#settingsBtn::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px; /* Adjust distance from right edge */

  width: 28px;  /* Adjust icon size */
  height: 28px; /* Adjust icon size */

  transform: translateY(-50%);

  background-color: var(--highlight-color);

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;

  -webkit-mask-position: center;
  mask-position: center;

  -webkit-mask-size: contain;
  mask-size: contain;

  border: none !important;
}

/* 2. Assign the specific SVG icons */

/* Alphabetized Icon */
#allSongs::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="m298-262-56-56 121-122H80v-80h283L242-642l56-56 218 218-218 218Zm222-18v-80h360v80H520Zm0-320v-80h360v80H520Zm120 160v-80h240v80H640Z"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="m298-262-56-56 121-122H80v-80h283L242-642l56-56 218 218-218 218Zm222-18v-80h360v80H520Zm0-320v-80h360v80H520Zm120 160v-80h240v80H640Z"/></svg>');
}

/* Authors Icon */
#authorsBtn::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="m298-262-56-56 121-122H80v-80h283L242-642l56-56 218 218-218 218Zm222-18v-80h360v80H520Zm0-320v-80h360v80H520Zm120 160v-80h240v80H640Z"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="m298-262-56-56 121-122H80v-80h283L242-642l56-56 218 218-218 218Zm222-18v-80h360v80H520Zm0-320v-80h360v80H520Zm120 160v-80h240v80H640Z"/></svg>');
}

/* Pronunciation Icon */
#pronounceGuide::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="M507-480 384-357l56 57 180-180-180-180-56 57 123 123ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="M507-480 384-357l56 57 180-180-180-180-56 57 123 123ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>');
}

/* Settings Icon */
#settingsBtn::before {
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="M507-480 384-357l56 57 180-180-180-180-56 57 123 123ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="M507-480 384-357l56 57 180-180-180-180-56 57 123 123ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>');
}

/* The container for the buttons */
.bottom-tabbar__row {
  display: flex;
  width: 95%;           /* Slight margin from sides to look like a floating dock */
  max-width: 600px;     /* Optional: prevents it from being too wide on tablets */
  margin: 0 auto;       /* Centers the dock horizontally */
  height: 65px;
  
  /* Glass Effect */
  background-color: rgba(255, 255, 255, 0.1); 
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  
  /* Shape: Rounded Top, Sharp Bottom */
  border-radius: 20px 20px 0 0; 
  
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

/* The footer container itself should be transparent */
.tabbar.ons-tabbar__footer {
  background-color: transparent !important;
  border: none !important;
}

.bottom-tabbar__row button {
  flex: 1;
  display: flex;
  flex-direction: row;    /* Changed from column to row */
  align-items: center;    /* Keeps icon and text vertically centered */
  justify-content: center;
  gap: 8px;               /* Adds space between the icon and the text */
  background: transparent;
  border: none;
  color: var(--text-color);
}

/* Optional: Reset any default Onsen UI margin on the icon */
.bottom-tabbar__row button ons-icon {
  margin-bottom: 0 !important; 
}

/* PRONUNCIATION */

/* Container for each list item in the pronunciation list */
ons-list#pronounce-list ons-list-item {
  display: flex;
  justify-content: center; /* Centers the whole row's content */
  width: 100%;
  padding-left: 0 !important; /* Reset default padding */
}

/* The left side (Word) */
ons-list#pronounce-list .list-item__left {
  flex: 0 0 30% !important;   /* Occupy exactly 30% */
  display: flex;
  justify-content: center;    /* Center content horizontally */
  align-items: center;        /* Center content vertically */
  text-align: center;
  padding-right: 0 !important; /* Remove right spacing */
}

/* The center side (Pronunciation) */
ons-list#pronounce-list .list-item__center {
  flex: 0 0 70% !important;   /* Occupy exactly 70% */
  display: flex;
  justify-content: center;    /* Center content horizontally */
  align-items: center;        /* Center content vertically */
  text-align: center;
  background-image: none !important; /* Removes default Onsen UI border if any */
}

highlight {
  font-weight: 400;
  color: var(--highlight-color);
  background-color: transparent; !important;
}

/* Scoped smaller text for the Song View only */
#songView_page highlight {
  font-size: 0.83em;
  color: var(--gray-lighter);
}

/**/
footnote {
  font-weight: 400;
  color: var(--gray-dark);
  background-color: transparent; !important;
}

#addSongToListBtn > .center {
  display: flex;
  align-items: center;
  justify-content: center;
}

#addSongToListBtn .ons-icon {
  vertical-align: middle;
  margin-top: 0px;
}

.sample-text {
  text-transform: none; 
  font-size: 1.2rem; 
  background-image: none; 
  padding-top: 12px;
  padding-bottom: 12px;
  background-color: var(--material-fab-text-color);
  border-radius: 0 0 12px 12px; 
  margin: 0 12px 12px 12px; 
  text-align: center; 
  color: var(--highlight-color);
}

/* .search-result / .search-result-author / .search-result-title */
ons-list-item .center.search-result {
  display: flex;
  flex-direction: column;
  white-space: normal;
  overflow: hidden;
}

.search-result-author {
  font-size: 0.75em;
  font-style: italic;
  color: var(--sub-text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-rest {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.guide-rest.is-open {
  max-height: 600px; /* adjust to your content length */
}

/* Home Version Wrapper becomes the positioning context */
.home-image-wrap {
  position: relative;
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto;
  overflow: hidden; /* clips the caption when translated down */
  box-shadow: var(--outer-shadow);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.home-image-wrap img {
  display: inline;
  object-fit: cover;
}

/* Re-used caption logic */
.home-image-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  min-height: 25%;
  background: rgba(0, 0, 0, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 10px 14px;
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.8s ease-in-out;
  z-index: 2;
}

/* Toggled via JS only */
.home-image-wrap.is-visible .home-image-caption {
  transform: translateY(0%);
}

.home-image-heading {
  font-weight: 700;
  font-size: .85rem;
  line-height: 1.2;
}

.home-image-subtitle {
  font-weight: 400;
  font-size: .65rem;
  line-height: 1.3;
  opacity: 0.75;
  margin-top: 2px;
}

/* ═══ Intro slideshow frame ═══ */
.intro-thumb {
  width: 100%;
  max-width: 720px;
  min-width: 320px;
  aspect-ratio: 1 / 1;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: var(--thumbnail-shadow);
}

/* Each slide-layer now wraps an <img> + its own caption, so image
   opacity (crossfade) and caption slide-in/out can be controlled
   independently but toggled together via the same .slide-visible class. */
.ken-burns-frame .slide-layer {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.ken-burns-frame .slide-layer.slide-visible {
  opacity: 1;
  z-index: 1;
}

.ken-burns-frame .slide-layer .slideshow {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Caption overlay: bottom third, dark 60%-opacity scrim, white text,
   left-aligned. Starts translated fully below the frame and slides up
   into place; .slide-visible on the parent .slide-layer triggers the
   transform, so it's driven by the same class toggle as the crossfade. */
.slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 25%;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 12px 16px;
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.8s ease-in-out;
  z-index: 2; /* above the <img> within the same layer */
}

.slide-layer.slide-visible .slide-caption {
  transform: translateY(0%);
}

.slide-caption-heading {
  font-weight: 700;
  font-size: 1.85rem;
  margin-bottom: 4px;
}

.slide-caption-body {
  font-size: 1.25rem;
  opacity: 0.9;
  line-height: 1.3;
  /* Prevent an unusually long body from overflowing the fixed-height
     bottom third — clip with ellipsis rather than pushing the frame. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 520px) {
  .slide-caption { height: 20%; }
  .slide-caption-heading { font-size: 0.85rem; }
  .slide-caption-body { font-size: 0.65rem; }
  .intro-thumb { aspect-ratio: 2 / 3; }
}

/* When alt="" has no caption text, hide the scrim entirely rather than
   showing an empty dark bar. */
.slide-caption.slide-caption-empty {
  display: none;
}

/* ═══ Ken Burns frame ═══ */
.ken-burns-frame {
  position: relative;
  overflow: hidden;
}

/* Base layers — hidden by default */
.ken-burns-frame .slide-a,
.ken-burns-frame .slide-b {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

/* Visible layer — fades in */
.ken-burns-frame .slide-visible {
  opacity: 1;
  z-index: 1;
}

/* The zoom/pan animation */
.ken-burns {
  --kb-duration: 9s;
  --kb-scale: 1.2;
  --kb-origin: center;
  --kb-pan-x: 0%;
  --kb-pan-y: 0%;

  display: block;
  transform-origin: var(--kb-origin);
  will-change: transform;
  animation: wo-ken-burns var(--kb-duration) ease-in-out infinite alternate;
}

@keyframes wo-ken-burns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(var(--kb-scale)) translate(var(--kb-pan-x), var(--kb-pan-y)); }
}

@media (prefers-reduced-motion: reduce) {
  .ken-burns { animation: none; }
}

.glassy {
  padding-left: 16px;  /* Adjust this value as needed */
  padding-right: 16px;
  box-sizing: border-box; /* Ensures padding doesn't increase the container's total width */
}

/* Remove the lists_page container's own top/bottom border gradients */
#tab-lists .gutter ons-list,
#tab-lists .gutter ons-list-item,
#tab-lists .gutter ons-list-header {
  background-image: none !important;
  box-shadow: none !important;
}

.shortcut-icon {
  display: block;
  margin-right: 5px; /* Space between icon and text */
}

/* ═══════════════════════════════════════════════════════════
   1. Swipe-to-delete & right-click-to-delete for Recents
   ═══════════════════════════════════════════════════════════ */

.recent-swipe-item .recent-delete-btn {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  min-width: 44px;
  justify-content: center;
  display: flex;
  align-items: center;
}

.recent-swipe-item.swiped .recent-delete-btn {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.recent-swipe-item.swiped .center {
  transform: translateX(-8px);
  transition: transform 0.25s ease;
}

/* Alternating row tint for list-detail songs */
#list-list .recent-swipe-item:nth-child(even) {
  background: rgba(0, 0, 0, 0.12);
}

#list-list .recent-swipe-item:nth-child(even) .center {
  background: transparent;
}

/* Alternating row tint for home-page recents */
#recents-items .recent-swipe-item:nth-child(even) {
  background: rgba(55, 55, 55, 0.02);
}

#recents-items .recent-swipe-item:nth-child(even) .center {
  background: transparent;
}

/* ═══════════════════════════════════════════════════════════
   2. Font-size toolbar buttons (SongView)
   ═══════════════════════════════════════════════════════════ */

.lb-icon-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--toolbar-button-color, var(--highlight-color));
}

.lb-icon-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.lb-font-btn {
  opacity: 0.85;
  transition: opacity 0.2s;
}

.lb-font-btn:hover {
  opacity: 1;
}

/* Ensure the buttons sit nicely in the toolbar right area */
ons-toolbar .right .lb-icon-btn {
  margin-left: 4px;
}

/* ═══════════════════════════════════════════════════════════
   SMART FOOTER NAVIGATION (Song View)
   ═══════════════════════════════════════════════════════════ */

.song-footer-nav {
  position: relative;
  margin: 12px 6px 24px 6px;
  padding: 0;
  background: transparent !important;
  border: none !important;
  pointer-events: auto;
}

/* Reuse the exact same row styling as bottom-tabbar__row */
.song-footer-nav .bottom-tabbar__row {
  display: flex;
  width: 95%;
  max-width: 600px;
  margin: 0 auto;
  height: 65px;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

/* Prev / Next buttons — same structure as tabbar-btn */
.song-footer-nav .footer-nav-prev,
.song-footer-nav .footer-nav-next {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  padding: 0 12px;
  min-width: 0;
  overflow: hidden;
}

/* Constrained title container — clips marquee, stays between icon and divider */
.song-footer-nav .footer-nav-prev .footer-nav-title,
.song-footer-nav .footer-nav-next .footer-nav-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.song-footer-nav .footer-nav-prev {
  justify-content: flex-start;
  padding-left: 12px;
}

.song-footer-nav .footer-nav-next {
  justify-content: flex-end;
  padding-right: 12px;
}

/* Arrow icons */
.song-footer-nav .footer-nav-icon {
  flex-shrink: 0;
  opacity: 0.8;
}

/* Song titles — single line, marquee if overflow */
.song-footer-nav .footer-nav-title {
  white-space: nowrap;
  overflow: visible;
  font-size: 0.85rem;
  color: var(--text-color);
  display: inline-block;
  will-change: transform;
  min-width: 0;
}

/* Marquee animation */
.song-footer-nav .footer-nav-title.marquee {
  animation: marquee-scroll var(--marquee-duration, 8s) linear infinite alternate;
  padding-right: 16px;
}

/* Center divider */
.song-footer-nav .footer-nav-divider {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  color: var(--highlight-color);
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.6;
  user-select: none;
  padding: 0 4px;
}

/* Active / hover feedback */
.song-footer-nav .footer-nav-prev:active,
.song-footer-nav .footer-nav-next:active {
  opacity: 0.6;
}

/* Mobile adjustments */
@media (max-width: 520px) {
  .song-footer-nav {
    margin: 8px 4px 16px 4px;
  }
  .song-footer-nav .bottom-tabbar__row {
    height: 56px;
  }
  .song-footer-nav .footer-nav-title {
    font-size: 0.8rem;
  }
}

.song-file-name {
  color: var(--sub-text-color);
  font-size: .5rem;
  font-family: 'Ubuntu Sans', sans-serif;
  vertical-align: .25em;
  font-style: normal;
  font-weight: 400;
  margin-left: 6px;
  opacity: .6;
}

.total-songs-num {
  font-family: 'Ubuntu Sans', sans-serif;
  color: var(--sub-text-color);
  font-size: .85rem;
  vertical-align: .25em;
  margin-left: 6px;
}

/* ── Author list row marquee ── */

/* Keep the icon fixed on the left. */
.author-row-center {
  min-width: 0;
  overflow: hidden;
}

/* This is the fixed viewport between icon and chevron. */
.author-marquee-viewport {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

/* Author name + [song count] scroll together. */
.author-marquee-text {
  display: inline-block;
  white-space: nowrap;
  min-width: max-content;
  will-change: transform;
}

/* Reuse the same marquee animation as song footer titles. */
.author-marquee-text.marquee {
  animation: marquee-scroll var(--marquee-duration, 8s) linear infinite alternate;
  padding-right: 16px;
}

/* Keep the chevron fixed on the right. */
.author-chevron {
  flex-shrink: 0;
}

.sanskrit-header-wrapper {
  min-height: 56px;
  padding: 0;
  background: transparent;
}

.sanskrit-header {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;

  padding-top: 6px;
  padding-bottom: 18px;
  margin-bottom: -18px !important;

  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;

  font-size: 1.4rem;
  font-weight: 700;
  color: var(--highlight-color);

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.16) 30%,
    rgba(255, 255, 255, 0.10) 70%,
    rgba(255, 255, 255, 0.14) 100%
  );

  border: 1px solid rgba(255, 255, 255, 0.28);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.15);

  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);

  letter-spacing: 3px;
}
