/* ==========================================================================
   Simplified Scriptures Web - Interface Polish & Minimalism
   Applied dynamically when html[data-simplified="true"]
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. BRANDING & LOGO: Rebrand to "Scriptures"
   -------------------------------------------------------------------------- */
html[data-simplified="true"] .brand strong {
  font-size: 0 !important;
  line-height: 0 !important;
  display: inline-block !important;
}

html[data-simplified="true"] .brand strong::after {
  content: "Scriptures" !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  color: var(--text-strong, #ffffff) !important;
  display: inline-block !important;
}

html[data-simplified="true"] .brand small {
  display: none !important;
}

html[data-simplified="true"] .app-version-footer span:last-of-type {
  font-size: 0 !important;
  line-height: 0 !important;
  display: inline-block !important;
}

html[data-simplified="true"] .app-version-footer span:last-of-type::after {
  content: "Scriptures" !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  display: inline-block !important;
}

/* --------------------------------------------------------------------------
   2. CHAPTER HEADING: Compact Layout & Controls Cluster
   -------------------------------------------------------------------------- */
html[data-simplified="true"] .app-shell:not(.presentation-mode) .chapter-heading {
  padding: 16px clamp(16px, 3.5vw, 40px) 12px !important;
  max-width: 920px !important;
}

html[data-simplified="true"] .app-shell:not(.presentation-mode) .chapter-heading::before {
  display: none !important;
}

html[data-simplified="true"] .app-shell:not(.presentation-mode) .chapter-heading h1 {
  font-size: clamp(24px, 2.5vw, 32px) !important;
  margin: 3px 0 6px !important;
  line-height: 1.15 !important;
}

html[data-simplified="true"] .app-shell:not(.presentation-mode) .reader-heading-identity {
  font-size: 13px !important;
  margin-bottom: 2px !important;
  line-height: 1.3 !important;
}

html[data-simplified="true"] .reader-heading-footer {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-top: 8px !important;
}

html[data-simplified="true"] .reader-heading-navigation {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  background: var(--surface-soft, rgba(255, 255, 255, 0.05)) !important;
  padding: 3px 5px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12)) !important;
}

html[data-simplified="true"] .reader-heading-navigation > button,
html[data-simplified="true"] .reader-heading-navigation > .icon-button,
html[data-simplified="true"] .reader-heading-navigation > .chapter-contents-trigger {
  min-width: 34px !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  color: var(--text, inherit) !important;
  font-size: 13px !important;
  cursor: pointer !important;
}

html[data-simplified="true"] .reader-heading-navigation > button:hover,
html[data-simplified="true"] .reader-heading-navigation > .icon-button:hover,
html[data-simplified="true"] .reader-heading-navigation > .chapter-contents-trigger:hover {
  background: var(--surface-hover, rgba(255, 255, 255, 0.08)) !important;
}

html[data-simplified="true"] .reader-heading-navigation #lw-bookmarks-open,
html[data-simplified="true"] .reader-heading-navigation #lw-st-find-open {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
}

/* --------------------------------------------------------------------------
   3. SECONDARY READER TOOLBAR (Hidden by default)
   -------------------------------------------------------------------------- */
html[data-simplified="true"][data-hide-subtoolbar="true"] .reader-toolbar .reader-tools {
  display: none !important;
}

/* --------------------------------------------------------------------------
   4. LEFT SIDEBAR CLEANUP
   -------------------------------------------------------------------------- */
/* Hide extra sidebar tabs: Tags, Questions, To-Do, Canvas, Layouts */
html[data-simplified="true"][data-hide-ext-sidebar="true"] #lw-st-nav,
html[data-simplified="true"][data-hide-ext-sidebar="true"] .sidebar-collections-field,
html[data-simplified="true"][data-hide-ext-sidebar="true"] .primary-nav button[data-lw-nav="tags"],
html[data-simplified="true"][data-hide-ext-sidebar="true"] .primary-nav button[data-lw-nav="questions"],
html[data-simplified="true"][data-hide-ext-sidebar="true"] .primary-nav button[data-lw-nav="todos"],
html[data-simplified="true"][data-hide-ext-sidebar="true"] .primary-nav button[data-lw-nav="canvas"] {
  display: none !important;
}

/* Eliminate duplicate bookmarks button in primary-nav */
html[data-simplified="true"][data-hide-dup-bm="true"] #lw-bookmarks-nav {
  display: none !important;
}

/* Polish sidebar Bookmarks list section */
html[data-simplified="true"] #lw-bookmarks-sidebar {
  margin: 12px 10px 8px !important;
  background: var(--surface, rgba(255, 255, 255, 0.02)) !important;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
}

html[data-simplified="true"] #lw-bookmarks-sidebar header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 6px !important;
}

html[data-simplified="true"] #lw-bookmarks-sidebar .lw-bm-side-title {
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: var(--text-muted, #94a3b8) !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer !important;
}

html[data-simplified="true"] #lw-bookmarks-sidebar .lw-bm-side-title:hover {
  color: var(--text, #ffffff) !important;
}

/* --------------------------------------------------------------------------
   5. SELECTION TOOLBAR: Palette & Advanced Actions
   -------------------------------------------------------------------------- */
/* Hide 7 secondary swatches (Keep Gold, Blue, Red) */
html[data-simplified="true"][data-hide-full-palette="true"] .selection-toolbar :is(
  .swatch-orange,
  .swatch-lime,
  .swatch-sage,
  .swatch-teal,
  .swatch-indigo,
  .swatch-violet,
  .swatch-rose
) {
  display: none !important;
}

/* Hide advanced selection actions */
html[data-simplified="true"][data-hide-adv-selection="true"] .selection-toolbar-actions button:is(
  .passage-links-tool,
  .text-color-tool,
  .quick-search-tool,
  .copy-reference-tool,
  [title*="beside" i],
  [title*="collection" i],
  [title*="tag" i],
  [title*="share" i],
  [title*="related" i],
  [title*="Passage links" i],
  [data-lw-adv-tool="true"]
),
html[data-simplified="true"][data-hide-adv-selection="true"] .selection-toolbar button:is(
  .passage-links-tool,
  .text-color-tool,
  .quick-search-tool,
  .copy-reference-tool,
  [title*="beside" i],
  [title*="collection" i],
  [title*="tag" i],
  [title*="share" i],
  [title*="related" i],
  [title*="Passage links" i],
  [data-lw-adv-tool="true"]
) {
  display: none !important;
}

/* --------------------------------------------------------------------------
   6. KEYBOARD SHORTCUTS ELIMINATION
   -------------------------------------------------------------------------- */
html[data-simplified="true"][data-hide-shortcuts="true"] .sidebar-shortcut-button,
html[data-simplified="true"][data-hide-shortcuts="true"] .sidebar-utility-nav .sidebar-shortcut-button,
html[data-simplified="true"][data-hide-shortcuts="true"] .keyboard-shortcuts-settings-section,
html[data-simplified="true"][data-hide-shortcuts="true"] .shortcut-guide-backdrop,
html[data-simplified="true"][data-hide-shortcuts="true"] .shortcut-guide-dialog {
  display: none !important;
}

/* --------------------------------------------------------------------------
   7. SETTINGS PANEL: Feature Customization Styles
   -------------------------------------------------------------------------- */
.lw-features-card {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--surface-raised, #172033);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 14px;
}

.lw-features-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-strong, #ffffff);
}

.lw-features-card p.lw-features-desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
}

.lw-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lw-feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  background: var(--surface, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
}

.lw-feature-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lw-feature-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #e8edf8);
}

.lw-feature-hint {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
}

.lw-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.lw-toggle-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.lw-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.2s;
  border-radius: 24px;
  pointer-events: none;
}

.lw-toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.lw-toggle-switch input:checked + .lw-toggle-slider {
  background-color: var(--accent, #3b82f6);
}

.lw-toggle-switch input:checked + .lw-toggle-slider::before {
  transform: translateX(20px);
}
