/**
 * NaamJapTracker Plugin Application Stylesheet
 * Peaceful, spiritual, modern mobile-app design
 */

:root {
  --njt-primary: #e65100;
  --njt-primary-hover: #d84315;
  --njt-primary-light: #fff3e0;
  --njt-gold: #d4af37;
  --njt-gold-hover: #b8972e;
  --njt-gold-light: #fef9e7;
  --njt-bg: #faf7f2;
  --njt-surface: #ffffff;
  --njt-card: #ffffff;
  --njt-text: #2c2523;
  --njt-text-muted: #6e6561;
  --njt-border: #ede4d8;
  --njt-shadow: 0 4px 20px -2px rgba(90, 60, 40, 0.08);
  --njt-radius-lg: 20px;
  --njt-radius-md: 14px;
  --njt-radius-sm: 8px;
  --njt-radius-pill: 9999px;
  --njt-font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --njt-font-serif: 'Cinzel', serif;
  --njt-font-deva: 'Tiro Devanagari Sanskrit', serif;
}

[data-theme="dark"] .njt-app-root,
[data-theme="dark"] {
  --njt-primary: #ff8a50;
  --njt-primary-hover: #ff7043;
  --njt-primary-light: #2d180d;
  --njt-gold: #f5d061;
  --njt-gold-hover: #e6be47;
  --njt-gold-light: #2c2616;
  --njt-bg: #131110;
  --njt-surface: #1e1b19;
  --njt-card: #1e1b19;
  --njt-text: #f5eee9;
  --njt-text-muted: #a69c97;
  --njt-border: #332d29;
  --njt-shadow: 0 4px 25px -2px rgba(0, 0, 0, 0.45);
}

.njt-app-root {
  font-family: var(--njt-font-sans);
  color: var(--njt-text);
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

.njt-app-root * {
  box-sizing: border-box;
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.njt-app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.njt-topbar-left,
.njt-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.njt-pill-btn {
  background: var(--njt-surface);
  border: 1px solid var(--njt-border);
  color: var(--njt-text);
  padding: 0.45rem 0.95rem;
  border-radius: var(--njt-radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.njt-pill-btn:hover {
  border-color: var(--njt-primary);
  transform: translateY(-1px);
}

.njt-mantra-btn {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  font-family: var(--njt-font-deva), var(--njt-font-sans);
  color: var(--njt-primary);
  text-align: left;
}

.njt-mantra-btn .njt-pill-text {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.njt-pill-arrow {
  font-size: 0.7rem;
  color: var(--njt-text-muted);
}

.njt-icon-toggle {
  background: var(--njt-surface);
  border: 1px solid var(--njt-border);
  color: var(--njt-text);
  border-radius: var(--njt-radius-pill);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.njt-icon-toggle:hover {
  border-color: var(--njt-primary);
  transform: translateY(-1px);
}

/* ==========================================================================
   Tabs Navigation
   ========================================================================== */
.njt-app-tabs {
  display: flex;
  background: var(--njt-surface);
  border: 1px solid var(--njt-border);
  border-radius: var(--njt-radius-md);
  padding: 0.35rem;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.njt-tab-item {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--njt-text-muted);
  padding: 0.65rem 0.5rem;
  border-radius: var(--njt-radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  min-height: 42px;
}

.njt-tab-item .tab-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.njt-tab-item:hover {
  color: var(--njt-text);
  background: var(--njt-bg);
}

.njt-tab-item.active {
  background: var(--njt-primary);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(230, 81, 0, 0.3);
}

/* ==========================================================================
   View Panels
   ========================================================================== */
.njt-view-panel {
  display: none;
}

.njt-view-panel.active {
  display: block;
  animation: njtFadeIn 0.25s ease-out;
}

@keyframes njtFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Main Counter Card
   ========================================================================== */
.njt-counter-card {
  background: var(--njt-card);
  border: 1px solid var(--njt-border);
  border-radius: var(--njt-radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--njt-shadow);
  text-align: center;
}

@media (min-width: 640px) {
  .njt-counter-card {
    padding: 2.5rem 2rem;
  }
}

.njt-card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.njt-tap-voice-btn {
  background: var(--njt-surface);
  border: 1px solid var(--njt-border);
  color: var(--njt-text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--njt-radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.njt-tap-voice-btn:hover {
  border-color: var(--njt-primary);
  color: var(--njt-text);
}

.njt-tap-voice-btn.active {
  background: var(--njt-gold-light);
  border-color: var(--njt-accent);
  color: var(--njt-accent);
}

.njt-tap-voice-btn * {
  pointer-events: none;
}

.njt-icon-toggle * {
  pointer-events: none;
}

.njt-mantra-banner {
  margin-bottom: 0;
}

.mantra-deva {
  font-family: var(--njt-font-deva), var(--njt-font-sans);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--njt-primary);
  letter-spacing: 0.02em;
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: var(--njt-radius-pill);
  background: var(--njt-primary-light);
  border: 1px solid rgba(230, 81, 0, 0.15);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 100%;
  line-height: 1.4;
}

.njt-mala-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

.mala-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--njt-gold-light);
  color: var(--njt-gold-hover);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--njt-radius-pill);
  font-weight: 600;
}

[data-theme="dark"] .mala-chip {
  color: var(--njt-gold);
}

.mala-chip-sub {
  color: var(--njt-text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Big Circular Tap Zone
   ========================================================================== */
.njt-tap-zone {
  width: 260px;
  height: 260px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 2rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--njt-surface) 0%, var(--njt-bg) 100%);
  border: 4px solid var(--njt-border);
  box-shadow: 0 10px 30px -5px rgba(230, 81, 0, 0.15), inset 0 2px 6px rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  touch-action: manipulation;
}

@media (min-width: 640px) {
  .njt-tap-zone {
    width: 290px;
    height: 290px;
  }
}

.njt-tap-zone:hover {
  border-color: var(--njt-primary);
  box-shadow: 0 14px 40px -5px rgba(230, 81, 0, 0.25);
}

.njt-tap-zone:active,
.njt-tap-zone.tapping {
  transform: scale(0.94);
  border-color: var(--njt-primary);
  background: radial-gradient(circle at 35% 35%, var(--njt-primary-light) 0%, var(--njt-bg) 100%);
}

.njt-counter-digits {
  font-size: clamp(3.5rem, 9vw, 4.75rem);
  font-weight: 800;
  color: var(--njt-text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
  transition: transform 0.1s ease;
}

.njt-tap-instruction {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--njt-primary);
  background: var(--njt-primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--njt-radius-pill);
}

/* ==========================================================================
   Target & Progress Section
   ========================================================================== */
.njt-target-box {
  background: var(--njt-bg);
  border: 1px solid var(--njt-border);
  border-radius: var(--njt-radius-md);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}

.njt-progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.progress-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.target-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--njt-text);
}

.btn-edit-target {
  background: transparent;
  border: none;
  color: var(--njt-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.btn-edit-target:hover {
  text-decoration: underline;
}

.percent-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--njt-primary);
}

.njt-progress-track {
  width: 100%;
  height: 12px;
  background: var(--njt-surface);
  border: 1px solid var(--njt-border);
  border-radius: var(--njt-radius-pill);
  overflow: hidden;
  margin-bottom: 1rem;
}

.njt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--njt-gold), var(--njt-primary));
  border-radius: var(--njt-radius-pill);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.njt-target-submetrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--njt-border);
}

.submetric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sub-label {
  font-size: 0.75rem;
  color: var(--njt-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.sub-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--njt-text);
}

.streak-highlight {
  color: #d84315;
}

/* ==========================================================================
   Target Complete Banner
   ========================================================================== */
.njt-target-complete-banner {
  background: linear-gradient(135deg, var(--njt-gold-light), #fff8e1);
  border: 2px solid var(--njt-gold);
  border-radius: var(--njt-radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  animation: njtCelebrate 0.5s ease-out;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

[data-theme="dark"] .njt-target-complete-banner {
  background: linear-gradient(135deg, #2b2314, #1f1b14);
}

@keyframes njtCelebrate {
  0% { transform: scale(0.95); opacity: 0; }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}

.banner-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.banner-text strong {
  font-size: 1.15rem;
  color: #b8860b;
  display: block;
}

[data-theme="dark"] .banner-text strong {
  color: var(--njt-gold);
}

.banner-text p {
  margin: 0.2rem 0 0.4rem;
  font-size: 0.9rem;
  color: var(--njt-text);
}

.banner-extra-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--njt-primary);
}

.extra-count-badge {
  background: var(--njt-primary);
  color: #ffffff;
  padding: 0.1rem 0.5rem;
  border-radius: var(--njt-radius-pill);
}

/* ==========================================================================
   Action Bar (Increments & Reset)
   ========================================================================== */
.njt-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quick-add-group,
.utility-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.njt-btn-action {
  background: var(--njt-bg);
  border: 1px solid var(--njt-border);
  color: var(--njt-text);
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: var(--njt-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 42px;
}

.njt-btn-action:hover:not(:disabled) {
  border-color: var(--njt-primary);
  color: var(--njt-primary);
  transform: translateY(-1px);
}

.njt-btn-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-increment {
  font-size: 1rem;
}

.btn-mala-inc {
  background: var(--njt-primary-light);
  border-color: rgba(230, 81, 0, 0.25);
  color: var(--njt-primary);
}

.btn-subtext {
  font-size: 0.75rem;
  opacity: 0.85;
}

.btn-reset:hover {
  border-color: #d32f2f !important;
  color: #d32f2f !important;
}

/* ==========================================================================
   Panel Card (History, Stats, Settings)
   ========================================================================== */
.njt-panel-card {
  background: var(--njt-card);
  border: 1px solid var(--njt-border);
  border-radius: var(--njt-radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--njt-shadow);
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.panel-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--njt-text);
  margin-bottom: 1.25rem;
}

.panel-badge {
  background: var(--njt-primary-light);
  color: var(--njt-primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--njt-radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
}

/* History Cards */
.njt-history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-card {
  background: var(--njt-bg);
  border: 1px solid var(--njt-border);
  border-radius: var(--njt-radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  transition: transform 0.2s ease;
}

.history-card:hover {
  transform: translateY(-2px);
  border-color: var(--njt-primary);
}

.history-date {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--njt-text);
  display: block;
}

.history-mantra {
  font-family: var(--njt-font-deva), var(--njt-font-sans);
  font-size: 0.95rem;
  color: var(--njt-primary);
  font-weight: 600;
}

.history-stats {
  text-align: right;
}

.history-naam-count {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--njt-text);
  display: block;
}

.history-meta {
  font-size: 0.85rem;
  color: var(--njt-text-muted);
}

.target-badge-success {
  color: #2e7d32;
  font-weight: 700;
}

.empty-history {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--njt-text-muted);
}

.empty-history .empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Statistics Grid & Bar Chart
   ========================================================================== */
.njt-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--njt-bg);
  border: 1px solid var(--njt-border);
  border-radius: var(--njt-radius-md);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat-card.highlight-streak {
  border-color: rgba(230, 81, 0, 0.3);
  background: var(--njt-primary-light);
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--njt-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--njt-text);
}

.chart-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--njt-text);
  margin-bottom: 1rem;
}

.njt-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  height: 160px;
  padding: 1rem 0.5rem 0.5rem;
  background: var(--njt-bg);
  border-radius: var(--njt-radius-md);
  border: 1px solid var(--njt-border);
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.chart-bar-fill {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(180deg, var(--njt-primary) 0%, var(--njt-gold) 100%);
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.chart-bar-fill:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--njt-surface);
  color: var(--njt-text);
  border: 1px solid var(--njt-border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--njt-shadow);
  z-index: 10;
}

.chart-bar-day {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--njt-text-muted);
  margin-top: 0.5rem;
}

/* ==========================================================================
   Settings Panel
   ========================================================================== */
.njt-settings-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--njt-bg);
  border: 1px solid var(--njt-border);
  border-radius: var(--njt-radius-md);
  gap: 1rem;
}

.setting-info {
  display: flex;
  flex-direction: column;
}

.setting-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--njt-text);
  margin-bottom: 0.2rem;
}

.setting-desc {
  font-size: 0.8rem;
  color: var(--njt-text-muted);
}

.njt-select {
  background: var(--njt-surface);
  border: 1px solid var(--njt-border);
  color: var(--njt-text);
  padding: 0.5rem 0.85rem;
  border-radius: var(--njt-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Toggle Switch */
.njt-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.njt-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--njt-border);
  transition: 0.3s;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background-color: var(--njt-primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.setting-box-info {
  background: var(--njt-bg);
  border: 1px solid var(--njt-border);
  border-radius: var(--njt-radius-md);
  padding: 1.25rem;
}

.box-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.box-desc {
  font-size: 0.85rem;
  color: var(--njt-text-muted);
  margin-bottom: 1rem;
}

.setting-actions-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-danger {
  background: #ffebee;
  color: #c62828 !important;
  border: 1px solid #ffcdd2;
}

.btn-danger:hover {
  background: #ef5350;
  color: #ffffff !important;
}

.setting-future-note {
  background: var(--njt-primary-light);
  border: 1px solid rgba(230, 81, 0, 0.2);
  border-radius: var(--njt-radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--njt-text);
}

.setting-future-note p {
  margin: 0.35rem 0 0;
  color: var(--njt-text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.njt-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.njt-modal.is-active {
  display: flex;
}

.njt-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.njt-modal-box {
  position: relative;
  background: var(--njt-surface);
  border: 1px solid var(--njt-border);
  border-radius: var(--njt-radius-lg);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: njtModalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.njt-modal-box.modal-sm {
  max-width: 380px;
}

@keyframes njtModalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--njt-text);
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--njt-text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.modal-close-btn:hover {
  color: var(--njt-text);
}

.modal-body {
  margin-bottom: 1.5rem;
}

.input-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--njt-text);
  margin-bottom: 0.5rem;
}

.njt-input-number,
.njt-input-text {
  width: 100%;
  background: var(--njt-bg);
  border: 1px solid var(--njt-border);
  color: var(--njt-text);
  padding: 0.75rem 1rem;
  border-radius: var(--njt-radius-md);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.njt-input-number:focus,
.njt-input-text:focus {
  outline: none;
  border-color: var(--njt-primary);
}

.input-error {
  color: #d32f2f;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.quick-presets-section {
  margin-top: 1.25rem;
}

.quick-presets-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--njt-text-muted);
  display: block;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.presets-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preset-chip {
  background: var(--njt-bg);
  border: 1px solid var(--njt-border);
  color: var(--njt-text);
  padding: 0.4rem 0.8rem;
  border-radius: var(--njt-radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover {
  border-color: var(--njt-primary);
  background: var(--njt-primary-light);
  color: var(--njt-primary);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--njt-border);
  color: var(--njt-text);
  padding: 0.6rem 1.25rem;
  border-radius: var(--njt-radius-pill);
  font-weight: 600;
  cursor: pointer;
}

.btn-modal-save {
  background: var(--njt-primary);
  border: none;
  color: #ffffff;
  padding: 0.6rem 1.5rem;
  border-radius: var(--njt-radius-pill);
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-danger {
  background: #d32f2f;
  border: none;
  color: #ffffff;
  padding: 0.6rem 1.5rem;
  border-radius: var(--njt-radius-pill);
  font-weight: 700;
  cursor: pointer;
}

/* Mantra List in Modal */
.mantra-selection-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 1.25rem;
  padding-right: 4px;
}

.mantra-choice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--njt-bg);
  border: 1px solid var(--njt-border);
  border-radius: var(--njt-radius-md);
  cursor: pointer;
  font-family: var(--njt-font-deva), var(--njt-font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.mantra-choice-item:hover {
  border-color: var(--njt-primary);
  background: var(--njt-primary-light);
}

.mantra-choice-item.selected {
  border-color: var(--njt-primary);
  background: var(--njt-primary-light);
  color: var(--njt-primary);
}

.custom-mantra-box {
  padding-top: 1rem;
  border-top: 1px solid var(--njt-border);
}

.custom-mantra-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--njt-primary);
  margin-bottom: 0.5rem;
}

.custom-input-row {
  display: flex;
  gap: 0.5rem;
}

.btn-add-mantra {
  background: var(--njt-primary);
  color: #ffffff;
  border: none;
  padding: 0 1.25rem;
  border-radius: var(--njt-radius-md);
  font-weight: 700;
  cursor: pointer;
}
