/* ============================================================
   VARDHAN 111 — Shared UX states (empty / error / loading / field)
   Brand: #7A0C1F — not Instagram purple
   ============================================================ */

.app-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
}
.app-state__icon {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: #FCE8EC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #7A0C1F;
  margin-bottom: 1rem;
}
.app-state__icon--error {
  background: #FEE2E2;
  color: #DC2626;
  font-weight: 800;
  font-size: 2.25rem;
}
.app-state__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #1F2937;
  margin: 0 0 0.5rem;
}
.app-state__body {
  font-size: 0.875rem;
  color: #6B7280;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  max-width: 22rem;
}
.app-state__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 1rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #fff;
  background: linear-gradient(135deg, #7A0C1F, #9B1832);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.app-state__btn:active { transform: scale(0.98); }
.app-state__btn--ghost {
  background: #fff;
  color: #4B5563;
  border: 1px solid #E5E7EB;
  margin-top: 0.5rem;
}

/* Skeleton */
.app-skeleton {
  padding: 1rem;
}
.app-skeleton__block {
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  animation: app-skel 1.2s ease-in-out infinite;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}
.app-skeleton__block--lg { height: 120px; }
.app-skeleton__block--md { height: 72px; }
@keyframes app-skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Inline field errors */
.field-error-text {
  color: #DC2626;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.field-error-text.is-visible { display: block; }
/* Register page uses .error-message — keep red text when visible via style or class */
.error-message.field-error-text:not(.is-visible) {
  display: none;
}
.error-message.field-error-text.is-visible {
  display: block;
  color: #DC2626;
}
.form-control.is-invalid,
input.is-invalid,
textarea.is-invalid {
  border-color: #DC2626 !important;
  box-shadow: 0 0 0 1px #DC2626;
}

/* Slow network banner */
.app-slow-network {
  position: sticky;
  top: 0;
  z-index: 35;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #FDF2F4;
  border-bottom: 1px solid #F5D0D6;
}
.app-slow-network.is-visible { display: flex; }
.app-slow-network__icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #FCE8EC;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.app-slow-network__title {
  font-size: 13px;
  font-weight: 700;
  color: #1F2937;
}
.app-slow-network__body {
  font-size: 11px;
  color: #6B7280;
}
.app-slow-network__bar {
  height: 4px;
  margin-top: 6px;
  border-radius: 999px;
  background: #FCE8EC;
  overflow: hidden;
}
.app-slow-network__bar > i {
  display: block;
  height: 100%;
  width: 40%;
  background: #7A0C1F;
  animation: app-slow-bar 1.2s ease-in-out infinite;
}
@keyframes app-slow-bar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Session expired card (web) */
.app-session-expired {
  max-width: 360px;
  margin: 3rem auto;
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(122, 12, 31, 0.08);
  border: 1px solid #F3F4F6;
}
