/* =========================================================
   Bajrang Vati — components.css
   Reusable UI: buttons, cards, chips, inputs, avatar, ring
   ========================================================= */

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}

.card-light {
  background: var(--surface-light);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}

.card-pad { padding: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--r-lg);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn:active { transform: scale(0.97); }

.btn:disabled {
  opacity: 0.5;
  box-shadow: none;
  cursor: not-allowed;
}

.btn:disabled:active { transform: none; }

.btn-primary {
  background: var(--saffron);
  color: var(--ink);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover:not(:disabled) { background: var(--saffron-light); }

.btn-secondary {
  background: var(--surface-light);
  color: var(--cream);
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover:not(:disabled) { background: var(--surface-lighter); }

.btn-gold {
  background: linear-gradient(90deg, var(--gold), var(--saffron));
  color: var(--ink);
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

.btn-dark {
  background: var(--ink);
  color: var(--cream);
  box-shadow: var(--shadow-card);
}

.btn-block { width: 100%; }

/* Round icon button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  flex-shrink: 0;
  border-radius: var(--r-full);
  background: var(--surface-light);
  color: var(--cream);
  transition: transform 0.15s ease;
}

.icon-btn:active { transform: scale(0.9); }

.icon-btn-lg { height: 44px; width: 44px; }

/* Text link button */
.link-btn {
  color: var(--saffron);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 16px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  background: var(--surface-light);
  color: var(--muted);
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.2s ease;
}

.chip:active { transform: scale(0.95); }

.chip.is-active {
  background: var(--saffron);
  border-color: var(--saffron);
  color: var(--ink);
}

.chip-sm {
  font-size: 10px;
  padding: 4px 10px;
}

.chip-dark {
  background: rgba(11, 8, 7, 0.7);
  color: var(--cream);
  border-color: var(--line-strong);
}

.chip-saffron {
  background: rgba(240, 118, 30, 0.15);
  color: var(--saffron);
  border-color: rgba(240, 118, 30, 0.3);
}

.chip-gold {
  background: rgba(217, 164, 65, 0.1);
  color: var(--gold);
  border-color: rgba(217, 164, 65, 0.3);
}

.chip-sindoor {
  background: rgba(184, 74, 22, 0.1);
  color: var(--sindoor-light);
  border-color: rgba(184, 74, 22, 0.4);
}

/* ---------- Inputs ---------- */
.input-field {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  color: var(--cream);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field::placeholder { color: var(--muted); }

.input-field:focus {
  outline: none;
  border-color: rgba(240, 118, 30, 0.6);
  box-shadow: 0 0 0 3px rgba(240, 118, 30, 0.2);
}

.input-wrap { position: relative; }

.input-wrap .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.input-wrap .input-field { padding-left: 44px; }

.field-error {
  margin-top: 6px;
  font-size: 13px;
  color: var(--sindoor-light);
}

/* ---------- Toggle switch ---------- */
.toggle {
  position: relative;
  height: 24px;
  width: 44px;
  border-radius: var(--r-full);
  background: var(--line-strong);
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle.is-on { background: var(--saffron); }

.toggle .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  height: 20px;
  width: 20px;
  border-radius: var(--r-full);
  background: var(--cream);
  transition: left 0.2s ease;
}

.toggle.is-on .knob { left: 22px; }

/* ---------- Avatar ---------- */
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(217, 164, 65, 0.4);
  background: linear-gradient(135deg, var(--saffron), var(--sindoor));
  flex-shrink: 0;
}

.avatar span {
  font-weight: 700;
  color: var(--ink);
}

/* ---------- Progress bar ---------- */
.bar {
  height: 6px;
  border-radius: var(--r-full);
  background: var(--line-strong);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  transition: width 0.5s ease;
}

/* ---------- Progress ring ---------- */
.ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ring svg { transform: rotate(-90deg); }

.ring .ring-track { stroke: rgba(255, 255, 255, 0.08); fill: none; }

.ring .ring-value {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ---------- Logo / wordmark ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wordmark {
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ---------- Streak badge ---------- */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: rgba(240, 118, 30, 0.15);
  border: 1px solid rgba(240, 118, 30, 0.3);
  color: var(--saffron);
  font-weight: 600;
  font-size: 13px;
}

/* ---------- Empty state ---------- */
.empty-state {
  padding: 48px 24px;
  text-align: center;
}

.empty-state .empty-icon {
  height: 64px;
  width: 64px;
  margin: 0 auto 16px;
  border-radius: var(--r-lg);
  background: var(--surface-light);
  color: var(--saffron);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Menu list (used in profile / settings) ---------- */
.menu-list { overflow: hidden; }

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  text-align: left;
  transition: background 0.2s ease;
}

.menu-item + .menu-item { border-top: 1px solid var(--line); }

.menu-item:active { background: var(--surface-lighter); }

.menu-item .menu-label {
  flex: 1;
  font-weight: 500;
  color: var(--cream);
}
