/* ── components.css — Chips, toasts, toggle, category, payment-detail ── */

/* Transitions between steps */
.fade-in {
  animation: fadeIn 0.35s ease;
}
.fade-out {
  animation: fadeOut 0.2s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

/* Progress dots and bars */
[id^="dot"] {
  transition: background-color 0.35s ease, transform 0.25s ease;
}
[id^="dot"].bg-accent {
  transform: scale(1.2);
}
[id^="bar"] {
  transition: background-color 0.4s ease;
}

/* Selectionable elements */
.chip {
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}
.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(169, 119, 145, 0.12);
  border-color: #a97791;
}
.chip.active {
  background: #a97791;
  color: #fff;
  border-color: #a97791;
  animation: chipSelect 0.25s ease;
}
@keyframes chipSelect {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.category-btn {
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}
.category-btn:hover {
  border-color: #a97791;
  background: rgba(169,119,145,0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(169, 119, 145, 0.12);
}
.category-btn.active {
  background: #a97791;
  color: #fff;
  border-color: #a97791;
}

.reading-panel {
  animation: fadeIn 0.35s ease;
}

/* Toggle */
.toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  transition: background 0.2s;
  cursor: pointer;
  position: relative;
}
.toggle-track::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
}
.toggle-track.on {
  background: #a97791;
}
.toggle-track.on::after {
  transform: translateX(20px);
}
.toggle-track.off {
  background: #ccc;
}

/* Toast */
.toast-enter {
  animation: toastIn 0.3s ease forwards;
}
.toast-exit {
  animation: toastOut 0.3s ease forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(12px); }
}

/* Button active state */
button:active {
  transform: scale(0.97);
  opacity: 0.85;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

/* Payment detail panels */
.payment-detail {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
  margin-top: 0;
}
.payment-detail.open {
  max-height: 600px;
  opacity: 1;
  margin-top: 0.75rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}