/* ==========================================
   CLEAN PROFILE MODAL - CHATGPT/CLAUDE STYLE
   ========================================== */

.profile-customization-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000; /* Above all other elements including note popups (10000) */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.profile-customization-container.active {
  opacity: 1;
  visibility: visible;
}

.profile-customization-box {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  transform: scale(0.95) translate(-50%, -50%);
  position: absolute;
  top: 50%;
  left: 50%;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.profile-customization-container.active .profile-customization-box {
  transform: scale(1) translate(-50%, -50%);
}

[data-theme="dark"] .profile-customization-box {
  background: #1a1a1a;
  border: 1px solid #2d2d2d;
}

/* ==========================================
   HEADER
   ========================================== */

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

[data-theme="dark"] .profile-header {
  border-bottom-color: #2d2d2d;
  background: #0f0f0f;
}

.profile-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

[data-theme="dark"] .profile-header h2 {
  color: #ffffff;
}

.profile-close-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-close-btn:hover {
  background: #f5f5f5;
  color: #1a1a1a;
}

[data-theme="dark"] .profile-close-btn {
  color: #ccc;
}

[data-theme="dark"] .profile-close-btn:hover {
  background: #333;
  color: #ffffff;
}

/* ==========================================
   SETTINGS LAYOUT - Left Sidebar Tabs
   ========================================== */

.settings-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ==========================================
   SETTINGS TABS - Left Sidebar Style
   ========================================== */

.settings-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 8px;
  background: #f7f7f8;
  border-right: 1px solid #e5e5e5;
  width: 180px;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: visible;
}

[data-theme="dark"] .settings-tabs {
  background: #0f0f0f;
  border-right-color: #2d2d2d;
}

.settings-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.settings-tab:hover {
  color: #1a1a1a;
  background: rgba(0, 0, 0, 0.05);
}

.settings-tab.active {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}

.settings-tab.active svg {
  color: #7c3aed;
}

.settings-tab svg {
  color: #888;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.settings-tab:hover svg {
  color: #666;
}

[data-theme="dark"] .settings-tab {
  color: #999;
}

[data-theme="dark"] .settings-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .settings-tab.active {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.15);
}

[data-theme="dark"] .settings-tab.active svg {
  color: #a78bfa;
}

[data-theme="dark"] .settings-tab svg {
  color: #666;
}

[data-theme="dark"] .settings-tab:hover svg {
  color: #999;
}

/* ==========================================
   SETTINGS DROPDOWN & SUBTABS
   ========================================== */

.settings-tab-dropdown {
  display: flex;
  flex-direction: column;
}

.settings-tab-parent {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.dropdown-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
  opacity: 0.5;
}

.settings-tab-dropdown.expanded .dropdown-chevron {
  transform: rotate(180deg);
}

.settings-subtabs {
  display: none;
  flex-direction: column;
  margin-left: 24px;
  margin-top: 2px;
  gap: 2px;
  border-left: 2px solid #e2e8f0;
  padding-left: 10px;
}

.settings-tab-dropdown.expanded .settings-subtabs {
  display: flex;
}

[data-theme="dark"] .settings-subtabs {
  border-left-color: #3a3a3a;
}

.settings-subtab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: none !important;
  background: transparent !important;
  color: #666;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  text-align: left;
  white-space: nowrap;
  min-height: 38px;
  width: 100%;
}

.settings-subtab:hover {
  background: rgba(139, 92, 246, 0.08) !important;
  color: #7c3aed;
}

.settings-subtab.active {
  background: transparent !important;
  color: #7c3aed;
  font-weight: 600;
}

[data-theme="dark"] .settings-subtab {
  color: #888;
}

[data-theme="dark"] .settings-subtab:hover {
  background: rgba(167, 139, 250, 0.1) !important;
  color: #c4b5fd;
}

[data-theme="dark"] .settings-subtab.active {
  background: transparent !important;
  color: #c4b5fd;
  font-weight: 600;
}

.settings-subtab svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ==========================================
   COMPACT BIBLIA AI HIGHLIGHT SECTION
   ========================================== */

.biblia-ai-highlight-section {
  padding: 16px 24px !important;
}

.biblia-ai-highlight-section h3 {
  margin-bottom: 12px !important;
  font-size: 13px;
}

.color-palette-compact {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px !important;
  margin-top: 8px !important;
}

.color-palette-compact .color-option {
  padding: 6px !important;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-palette-compact .color-option:hover {
  transform: scale(1.1);
}

/* Blue circle selection indicator for Biblia AI highlight */
.color-palette-compact .color-option.selected .color-circle,
.color-palette-compact .color-option[data-selected="true"] .color-circle {
  box-shadow: 0 0 0 3px #2563eb, 0 0 0 5px rgba(37, 99, 235, 0.3);
}

.color-palette-compact .color-circle {
  width: 28px !important;
  height: 28px !important;
  transition: box-shadow 0.2s ease;
}

/* Hide color tick (using blue circle instead) */
.color-palette-compact .color-tick {
  display: none;
}

/* ==========================================
   FORM GROUP DIVIDERS
   ========================================== */

.form-group-with-divider {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="dark"] .form-group-with-divider {
  border-bottom-color: #3a3a3a;
}

/* ==========================================
   PAGE LAYOUT PREVIEW BOXES
   ========================================== */

.layout-preview-box {
  width: 80px;
  height: 60px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: all 0.2s ease;
}

[data-theme="dark"] .layout-preview-box {
  border-color: #3a3a3a;
  background: #2a2d33;
}

.layout-option.active .layout-preview-box,
.layout-option.selected .layout-preview-box {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
}

/* Single column preview */
.layout-preview-single {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.layout-preview-single .preview-line {
  height: 3px;
  background: #94a3b8;
  border-radius: 2px;
  width: 100%;
}

.layout-preview-single .preview-line.short {
  width: 60%;
}

[data-theme="dark"] .layout-preview-single .preview-line {
  background: #64748b;
}

/* Two column preview */
.layout-preview-two-column {
  display: flex;
  gap: 6px;
  width: 100%;
  height: 100%;
  align-items: stretch;
}

.layout-preview-two-column .preview-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.layout-preview-two-column .preview-line {
  height: 3px;
  background: #94a3b8;
  border-radius: 2px;
  width: 100%;
}

.layout-preview-two-column .preview-line.short {
  width: 70%;
}

.layout-preview-two-column .preview-divider {
  width: 1px;
  background: #cbd5e1;
  align-self: stretch;
}

[data-theme="dark"] .layout-preview-two-column .preview-line {
  background: #64748b;
}

[data-theme="dark"] .layout-preview-two-column .preview-divider {
  background: #475569;
}

/* Auto layout preview */
.layout-preview-auto {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

[data-theme="dark"] .layout-preview-auto {
  color: #64748b;
}

.layout-option.active .layout-preview-auto,
.layout-option.selected .layout-preview-auto {
  color: #7c3aed;
}

/* ==========================================
   COMING SOON CONTAINER
   ========================================== */

.coming-soon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
}

.coming-soon-icon {
  color: #a78bfa;
  margin-bottom: 16px;
  opacity: 0.6;
}

.coming-soon-text {
  font-size: 18px;
  font-weight: 600;
  color: #7c3aed;
  margin: 0 0 8px 0;
  letter-spacing: 0.03em;
}

.coming-soon-description {
  font-size: 14px;
  color: #666;
  margin: 0;
  max-width: 280px;
}

[data-theme="dark"] .coming-soon-icon {
  color: #c4b5fd;
}

[data-theme="dark"] .coming-soon-text {
  color: #c4b5fd;
}

[data-theme="dark"] .coming-soon-description {
  color: #888;
}

/* ==========================================
   APPEARANCE DEFAULT MESSAGE
   ========================================== */

.appearance-default-message {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.appearance-default-message p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

[data-theme="dark"] .appearance-default-message p {
  color: #888;
}

/* ==========================================
   TAB CONTENT
   ========================================== */

.settings-tab-content {
  display: none;
}

.settings-tab-content.active {
  display: block;
}

/* ==========================================
   CONTENT
   ========================================== */

.profile-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.profile-form {
  padding: 0;
}

.profile-section {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.profile-section:last-of-type {
  border-bottom: none;
}

[data-theme="dark"] .profile-section {
  border-bottom-color: #2a2a2a;
}

.profile-section h3 {
  margin: 0 0 20px 0;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

[data-theme="dark"] .profile-section h3 {
[data-theme="dark"] .profile-section h3 {
  color: #888;
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */

.form-row {
  display: flex;
  gap: 12px;
}

.form-group {
  margin-bottom: 16px;
  flex: 1;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

[data-theme="dark"] .form-group label {
  color: #d1d5db;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: #ffffff;
  color: #1a1a1a;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .form-group input[type="text"] {
  background: #2a2a2a;
  border-color: #404040;
  color: #ffffff;
}

[data-theme="dark"] .form-group input[type="text"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==========================================
   COLOR PALETTE
   ========================================== */

.color-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.color-option {
  position: relative;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.color-option:hover {
  background: #f5f5f5;
}

[data-theme="dark"] .color-option:hover {
  background: #333;
}

.color-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.color-option.selected .color-circle {
  border-color: #2563eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 2px #2563eb;
  transform: scale(1.1);
}

/* Blue tick for selected color option */
.color-tick {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.color-option.selected .color-tick {
  opacity: 1;
}

/* ==========================================
   TOGGLE SWITCHES - MODERN CLEAN STYLE
   ========================================== */

.theme-toggle-section,
.toggle-wrapper {
  margin-top: 8px;
}

.theme-toggle-wrapper,
.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.theme-toggle-label,
.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  width: 100%;
}

.theme-toggle-text,
.toggle-text {
  flex: 1;
}

.toggle-title {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.toggle-description {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

[data-theme="dark"] .toggle-title,
[data-theme="dark"] .theme-toggle-text span {
  color: #ffffff;
}

[data-theme="dark"] .toggle-description {
  color: #999;
}

/* Toggle Switch Styling */
.theme-toggle-wrapper input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

#themeToggle,
#showThemeLabels,
#redLetterToggle {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

.theme-toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: #d1d5db !important;
  border-radius: 13px;
  transition: all 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.theme-toggle-switch::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #ffffff !important;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="checkbox"]:checked + .theme-toggle-label .theme-toggle-switch,
#themeToggle:checked + .theme-toggle-label .theme-toggle-switch,
#showThemeLabels:checked + .theme-toggle-label .theme-toggle-switch,
#redLetterToggle:checked + .theme-toggle-label .theme-toggle-switch {
  background: #7c3aed !important;
}

input[type="checkbox"]:checked + .theme-toggle-label .theme-toggle-switch::before,
#themeToggle:checked + .theme-toggle-label .theme-toggle-switch::before,
#showThemeLabels:checked + .theme-toggle-label .theme-toggle-switch::before,
#redLetterToggle:checked + .theme-toggle-label .theme-toggle-switch::before {
  transform: translateX(22px);
}

/* Show Themes Toggle Group */
.show-themes-toggle-group {
  margin-top: 12px;
}

/* ==========================================
   LIVE LAYOUT PREVIEW
   ========================================== */

.layout-selection-container {
  display: flex !important;
  flex-direction: row !important;
  gap: 20px !important;
  align-items: stretch !important;
  margin-top: 8px;
}

.layout-options-column {
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  width: auto !important;
}

.layout-options-column .layout-selector {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  width: auto !important;
}

.layout-options-column .layout-option {
  min-width: 110px;
  flex-direction: row;
  gap: 10px;
  padding: 8px 12px;
  justify-content: flex-start;
}

.layout-options-column .layout-option .layout-preview-box {
  width: 50px;
  height: 36px;
  padding: 4px;
}

.layout-options-column .layout-option .layout-label {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.layout-options-column .layout-option.selected .layout-label {
  color: #7c3aed;
  font-weight: 700;
}

[data-theme="dark"] .layout-options-column .layout-option .layout-label {
  color: #f3f4f6;
}

[data-theme="dark"] .layout-options-column .layout-option.selected .layout-label {
  color: #c4b5fd;
}

.layout-live-preview {
  flex: 1;
  min-width: 150px;
  max-width: 280px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  min-height: 100px;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
}

[data-theme="dark"] .layout-live-preview {
  background: #1a1a1a;
  border-color: #3a3a3a;
}

.live-preview-container {
  width: 100%;
  overflow: hidden;
}

.live-preview-content {
  font-size: 11px;
  line-height: 1.6;
  color: #374151;
  font-family: 'Georgia', serif;
  transition: all 0.3s ease;
}

[data-theme="dark"] .live-preview-content {
  color: #d1d5db;
}

/* Single column preview layout */
.live-preview-content.layout-single {
  columns: 1;
  max-width: 100%;
}

/* Two column preview layout */
.live-preview-content.layout-two-column {
  columns: 2;
  column-gap: 16px;
  column-rule: 1px solid #e2e8f0;
}

[data-theme="dark"] .live-preview-content.layout-two-column {
  column-rule-color: #3a3a3a;
}

/* Auto layout - default to single */
.live-preview-content.layout-auto {
  columns: 1;
}

.preview-verse {
  margin-bottom: 6px;
  break-inside: avoid;
}

.preview-verse sup {
  font-size: 0.7em;
  color: #7c3aed;
  font-weight: 600;
  margin-right: 4px;
  vertical-align: super;
}

[data-theme="dark"] .preview-verse sup {
  color: #a78bfa;
}

/* ==========================================
   ACTION BUTTONS
   ========================================== */

.profile-actions {
  display: flex;
  gap: 12px;
  padding: 20px;
  background: #f9fafb;
  border-top: 1px solid #e5e5e5;
}

[data-theme="dark"] .profile-actions {
  background: #1f1f1f;
  border-top-color: #333;
}

.btn-cancel,
.btn-save {
  flex: 1;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-cancel {
  background: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}

.btn-cancel:hover {
  background: #f9fafb;
}

.btn-save {
  background: #2563eb;
  color: #ffffff;
}

.btn-save:hover {
  background: #1d4ed8;
}

[data-theme="dark"] .btn-cancel {
  background: #2a2a2a;
  color: #d1d5db;
  border-color: #404040;
}

[data-theme="dark"] .btn-cancel:hover {
  background: #333;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 640px) {
  .profile-customization-box {
    width: 95%;
    margin: 20px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .color-palette {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px; /* Larger gap for better touch targets */
  }
  
  /* Larger touch targets on mobile */
  .color-option {
    padding: 8px;
    border-radius: 12px;
  }
  
  .color-circle {
    width: 36px;
    height: 36px;
    margin: 0 auto;
  }
  
  /* Ensure profile modal is properly sized for mobile */
  .profile-customization-container {
    padding: 10px;
  }
  
  .profile-section {
    padding: 16px;
  }
  
  /* Mobile Settings Layout */
  .settings-layout {
    flex-direction: column;
  }
  
  .settings-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    padding: 12px;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    gap: 8px;
  }
  
  [data-theme="dark"] .settings-tabs {
    border-bottom-color: #2d2d2d;
  }
  
  .settings-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .settings-tab-dropdown {
    flex-direction: column;
    width: 100%;
  }
  
  .settings-subtabs {
    margin-left: 16px;
    margin-top: 4px;
  }
  
  .settings-subtab {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .coming-soon-container {
    padding: 24px 12px;
  }
  
  .coming-soon-text {
    font-size: 16px;
  }
}

/* ==========================================
   FONT SIZE SLIDER STYLES - Professional Design
   ========================================== */

.font-size-slider-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem 0;
  padding: 0.5rem 0;
}

.slider-label-min {
  font-size: 1rem;
  font-weight: 700;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slider-label-max {
  font-size: 1.75rem;
  font-weight: 700;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .slider-label-min,
[data-theme="dark"] .slider-label-max {
  color: #a78bfa;
}

.font-size-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, 
    #e2e8f0 0%, 
    #ddd6fe 50%, 
    #c4b5fd 100%);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 1px 2px rgba(124, 58, 237, 0.2);
  outline: none;
  cursor: pointer;
  margin: 0 8px;
  transition: all 0.3s ease;
}

.font-size-slider:hover {
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(124, 58, 237, 0.3);
}

.font-size-slider:active {
  box-shadow: 
    inset 0 3px 6px rgba(0, 0, 0, 0.2),
    0 1px 3px rgba(124, 58, 237, 0.4);
}

/* Slider Thumb - WebKit (Chrome, Safari, Edge) */
.font-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #6b46c1 100%);
  cursor: grab;
  box-shadow: 
    0 4px 12px rgba(124, 58, 237, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  border: 4px solid #ffffff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.font-size-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 
    0 6px 16px rgba(124, 58, 237, 0.6),
    0 3px 8px rgba(0, 0, 0, 0.25),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.font-size-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
  box-shadow: 
    0 2px 8px rgba(124, 58, 237, 0.7),
    0 1px 4px rgba(0, 0, 0, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #6b46c1 0%, #5b21b6 100%);
}

/* Slider Thumb - Firefox */
.font-size-slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #6b46c1 100%);
  cursor: grab;
  box-shadow: 
    0 4px 12px rgba(124, 58, 237, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  border: 4px solid #ffffff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.font-size-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 
    0 6px 16px rgba(124, 58, 237, 0.6),
    0 3px 8px rgba(0, 0, 0, 0.25);
}

.font-size-slider::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
  background: linear-gradient(135deg, #6b46c1 0%, #5b21b6 100%);
}

.font-size-slider::-moz-range-track {
  height: 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, 
    #e2e8f0 0%, 
    #ddd6fe 50%, 
    #c4b5fd 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dark Theme Slider */
[data-theme="dark"] .font-size-slider {
  background: linear-gradient(90deg, 
    #475569 0%, 
    #5b21b6 50%, 
    #7c3aed 100%);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 1px 2px rgba(167, 139, 250, 0.3);
}

[data-theme="dark"] .font-size-slider:hover {
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(167, 139, 250, 0.4);
}

[data-theme="dark"] .font-size-slider::-webkit-slider-thumb {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
  border-color: #1e293b;
  box-shadow: 
    0 4px 12px rgba(167, 139, 250, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .font-size-slider::-webkit-slider-thumb:hover {
  box-shadow: 
    0 6px 16px rgba(167, 139, 250, 0.7),
    0 3px 8px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .font-size-slider::-moz-range-thumb {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
  border-color: #1e293b;
  box-shadow: 
    0 4px 12px rgba(167, 139, 250, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .font-size-slider::-moz-range-track {
  background: linear-gradient(90deg, 
    #475569 0%, 
    #5b21b6 50%, 
    #7c3aed 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Font Size Preview */
.font-size-preview {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
  border: 1px solid #e9e5ff;
  border-radius: 12px;
  text-align: center;
  margin-top: 0.5rem;
}

[data-theme="dark"] .font-size-preview {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-color: #4c1d95;
}

.font-size-preview .size-preview-text {
  color: #4c1d95;
  line-height: 1.6;
  font-style: italic;
  transition: font-size 0.15s ease;
}

[data-theme="dark"] .font-size-preview .size-preview-text {
  color: #c4b5fd;
}

/* Font Size Display Label */
#fontSizeDisplay {
  font-weight: 600;
  color: #7c3aed;
}

[data-theme="dark"] #fontSizeDisplay {
  color: #a78bfa;
}

/* ==========================================
   FONT FAMILY SELECTOR STYLES
   ========================================== */

.font-family-selector {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.font-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.font-select:hover {
  border-color: #a78bfa;
}

.font-select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

[data-theme="dark"] .font-select {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

[data-theme="dark"] .font-select:hover {
  border-color: #a78bfa;
}

[data-theme="dark"] .font-select:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

/* Font Preview Box */
.font-preview {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
  border: 1px solid #e9e5ff;
  border-radius: 12px;
  text-align: center;
}

[data-theme="dark"] .font-preview {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-color: #4c1d95;
}

.font-preview .preview-text {
  font-size: 1.25rem;
  color: #4c1d95;
  line-height: 1.6;
  font-style: italic;
}

[data-theme="dark"] .font-preview .preview-text {
  color: #c4b5fd;
}

/* ==========================================
   RED LETTER TOGGLE - CUSTOM STYLING
   ========================================== */

.red-letter-form-group {
  margin-top: 16px;
}

.red-letter-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.red-letter-toggle-wrapper {
  position: relative;
  flex-shrink: 0;
}

.red-letter-toggle-wrapper input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.red-letter-toggle-label {
  display: block;
  width: 44px;
  height: 24px;
  background: #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.red-letter-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.red-letter-toggle-wrapper input:checked + .red-letter-toggle-label {
  background: #c41e3a;
}

.red-letter-toggle-wrapper input:checked + .red-letter-toggle-label .red-letter-toggle-slider {
  transform: translateX(20px);
}

.red-letter-description {
  font-size: 13px;
  color: #4a5568;
  line-height: 1.4;
}

[data-theme="dark"] .red-letter-toggle-label {
  background: #374151;
}

[data-theme="dark"] .red-letter-toggle-wrapper input:checked + .red-letter-toggle-label {
  background: #dc2626;
}

[data-theme="dark"] .red-letter-description {
  color: #9ca3af;
}
