/* ═══════════════════════════════════════════════════════════════════
   MyTemple Admin — Decorative Animations
   These keyframes can't be expressed as Tailwind utilities.
   Everything else uses Tailwind classes in the ERB templates.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Floating lotus petals ─────────────────────────────────────── */
@keyframes petal-fall {
  0%   { transform: translateY(-40px) rotate(0deg); opacity: 0; }
  10%  { opacity: var(--po, 0.07); }
  85%  { opacity: var(--po, 0.07); }
  100% { transform: translateY(calc(100vh + 40px)) rotate(540deg); opacity: 0; }
}
@keyframes petal-sway {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(var(--drift, 20px)); }
}

/* ── Garland bells ─────────────────────────────────────────────── */
@keyframes bell-tinkle {
  0%, 85%, 100% { transform: rotate(0); }
  88%  { transform: rotate(5deg); }
  92%  { transform: rotate(-4deg); }
  96%  { transform: rotate(2deg); }
}
.bell-tinkle { transform-origin: top center; }
.bell-tinkle:nth-child(4n+1) { animation: bell-tinkle 6s ease-in-out infinite; }
.bell-tinkle:nth-child(4n+2) { animation: bell-tinkle 7s ease-in-out 0.5s infinite; }
.bell-tinkle:nth-child(4n+3) { animation: bell-tinkle 5s ease-in-out 1s infinite; }
.bell-tinkle:nth-child(4n)   { animation: bell-tinkle 8s ease-in-out 1.5s infinite; }

/* ── Dharma wheel spin ─────────────────────────────────────────── */
@keyframes dharma-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.dharma-spin { animation: dharma-spin 20s linear infinite; transform-origin: center; }

/* ── Prayer flags flutter ──────────────────────────────────────── */
@keyframes flag-flutter {
  0%, 100% { transform: skewX(0deg); }
  25%      { transform: skewX(2deg); }
  75%      { transform: skewX(-1.5deg); }
}
.flag-flutter { animation: flag-flutter 3s ease-in-out infinite; }
.flag-flutter:nth-child(4n+1) { animation-duration: 3s; }
.flag-flutter:nth-child(4n+2) { animation-duration: 3.5s; animation-delay: 0.4s; }
.flag-flutter:nth-child(4n+3) { animation-duration: 4s; animation-delay: 0.8s; }
.flag-flutter:nth-child(4n)   { animation-duration: 2.8s; animation-delay: 0.2s; }

/* ── Environment badge pulse (production) ─────────────────────── */
@keyframes env-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.env-pulse { animation: env-pulse 2s ease-in-out infinite; }

/* ── Sidebar active indicator ──────────────────────────────────── */
.sidebar-item { transition: all 0.15s ease; }
.sidebar-item:hover { background: rgba(196, 101, 42, 0.05); }
.sidebar-item.active { background: rgba(196, 101, 42, 0.09); border-left-color: #e89830; color: #e89830; }

/* ── Table row striping ────────────────────────────────────────── */
.admin-table tbody tr:nth-child(even) { background: rgba(212, 200, 184, 0.05); }
.admin-table tbody tr:hover { background: rgba(212, 200, 184, 0.12); }

/* ── Form layout classes ──────────────────────────────────────── */
.admin-form-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-form-field {
  flex: 1;
  min-width: 0;
}
.admin-hint {
  font-size: 9px;
  color: rgba(168, 152, 136, 0.7); /* temple-stone/70 */
  margin-top: 2px;
}
.admin-field-error {
  font-size: 9px;
  color: #b84a3c; /* temple-red-warn */
  margin-top: 2px;
}

.admin-checkbox {
  border-radius: 2px;
  border: 1px solid rgba(168, 152, 136, 0.5);
  color: #c4652a; /* temple-orange */
}
.admin-checkbox:focus {
  box-shadow: 0 0 0 2px rgba(196, 101, 42, 0.2);
}

/* ── Form input classes ───────────────────────────────────────── */
.admin-input {
  background: #fff;
  border: 1px solid rgba(168, 152, 136, 0.4); /* temple-stone/40 */
  border-radius: 2px;
  padding: 6px 8px;
  font-size: 11px;
  color: #2a2520; /* temple-charcoal */
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  width: 100%;
}
.admin-input:focus {
  outline: none;
  border-color: rgba(196, 101, 42, 0.6); /* temple-orange/60 */
  box-shadow: 0 0 0 1px rgba(196, 101, 42, 0.2); /* ring temple-orange/20 */
}
.admin-input::placeholder {
  color: rgba(168, 152, 136, 0.5); /* temple-stone/50 */
}
.admin-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a89888; /* temple-stone */
  width: 7rem;
  min-width: 7rem;
  text-align: right;
  flex-shrink: 0;
}
.admin-input-error {
  border-color: rgba(184, 74, 60, 0.6); /* temple-red-warn/60 */
}
.admin-input-error:focus {
  box-shadow: 0 0 0 1px rgba(184, 74, 60, 0.2); /* ring temple-red-warn/20 */
}
