/* ==========================================
   8. QUICK SIDEBAR & FULL SETTINGS MODALS
   ========================================== */
/* Sidebar customization drawer */
.quick-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.quick-sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.sidebar-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-close-btn {
  font-size: 20px;
  color: var(--text-muted);
  transition: var(--transition-base);
}

.sidebar-close-btn:hover {
  color: var(--text-primary);
}

.sidebar-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Grid selector sheets */
.theme-grid-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.theme-select-btn {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.15);
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-select-btn:hover {
  background: var(--bg-surface-hover);
}

.theme-select-btn.active {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.preset-slots-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-slot-btn {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-base);
}

.preset-slot-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-color);
}

.preset-slot-btn.active {
  border-color: var(--accent-color);
  background: rgba(var(--accent-color-rgb), 0.03);
}

/* Sidebar trigger floating button */
.sidebar-trigger-floating {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 90;
  transition: var(--transition-base);
}

.sidebar-trigger-floating:hover {
  border-color: var(--accent-color);
  transform: scale(1.05);
}

/* Settings Page Specific Styles */
.settings-view {
  display: flex;
  justify-content: center;
}

.settings-shell {
  width: min(800px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 auto;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.settings-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.settings-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.settings-subtitle {
  max-width: 540px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.6;
}

.settings-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(var(--accent-color-rgb), 0.1);
  border: 1px solid rgba(var(--accent-color-rgb), 0.15);
  color: var(--accent-color);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.settings-card {
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-card-head h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.settings-card-head p {
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

.theme-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.theme-preview-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.theme-preview-card:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.03);
}

.theme-preview-card.active {
  border: 2px solid #FFF200;
  box-shadow: 0 0 0 1px rgba(255, 242, 0, 0.12);
}

.theme-preview-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
}

.theme-preview-strip span {
  display: block;
  height: 100%;
}

.theme-dark span:nth-child(1) { background: #0E0E10; }
.theme-dark span:nth-child(2) { background: #18181B; }
.theme-dark span:nth-child(3) { background: #27272A; }
.theme-dark span:nth-child(4) { background: #FFF200; }
.theme-nord span:nth-child(1) { background: #2E3440; }
.theme-nord span:nth-child(2) { background: #3B4252; }
.theme-nord span:nth-child(3) { background: #434C5E; }
.theme-nord span:nth-child(4) { background: #88C0D0; }
.theme-sepia span:nth-child(1) { background: #F4EFE6; }
.theme-sepia span:nth-child(2) { background: #EFE9DC; }
.theme-sepia span:nth-child(3) { background: #E5DDC9; }
.theme-sepia span:nth-child(4) { background: #78350F; }
.theme-dracula span:nth-child(1) { background: #282A36; }
.theme-dracula span:nth-child(2) { background: #44475A; }
.theme-dracula span:nth-child(3) { background: #6272A4; }
.theme-dracula span:nth-child(4) { background: #FF79C6; }
.theme-mono span:nth-child(1) { background: #000000; }
.theme-mono span:nth-child(2) { background: #121212; }
.theme-mono span:nth-child(3) { background: #222222; }
.theme-mono span:nth-child(4) { background: #FFFFFF; }

.theme-preview-copy strong {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.theme-preview-copy span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.settings-mini-grid,
.settings-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-inline-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-hint {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.accent-picker-row,
.goal-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.accent-picker-row input[type="color"] {
  width: 52px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: transparent;
}

.goal-row select {
  flex: 1;
}

.goal-row input[type="number"] {
  width: 100px;
}

.settings-form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.settings-inline-group select,
.settings-inline-group input[type="text"],
.settings-inline-group input[type="number"] {
  width: 100%;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 11px 12px;
  font-family: var(--font-typing);
  font-size: 14px;
}

.settings-inline-group input[type="range"] {
  width: 100%;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.segment-btn {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13px;
}

.segment-btn.active {
  border-color: #FFF200;
  color: #FFF200;
  background: rgba(255, 242, 0, 0.08);
}

.toggle-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-toggle-row strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 4px;
}

.settings-toggle-row p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #333;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex: 0 0 auto;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.toggle-switch.active {
  background: #FFF200;
  border-color: rgba(255, 242, 0, 0.55);
}

.toggle-thumb {
  position: absolute;
  top: 50%;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #101114;
  transform: translateY(-50%);
  transition: left 0.2s ease, background-color 0.2s ease;
}

.toggle-switch.active .toggle-thumb {
  left: 26px;
  background: #141414;
}

@media (max-width: 900px) {
  .settings-header {
    flex-direction: column;
  }

  .theme-card-grid,
  .settings-mini-grid,
  .settings-control-grid,
  .segmented-control {
    grid-template-columns: 1fr;
  }

  .settings-card {
    padding: 20px;
  }

  .settings-toggle-row {
    align-items: flex-start;
  }
}
