/**
 * EzyHires loaders — Option A (bouncy green dots) + Option F (brand + progress).
 * Agreed product 2026-08-09: A short waits; F long/bulk. Reject B/D/E. (BUGS #82–#83)
 */
:root {
  --ezy-loader-emerald: #1a7a52;
  --ezy-loader-emerald-mid: #1f8f5f;
  --ezy-loader-emerald-deep: #146b48;
  --ezy-loader-ink: #0f1f17;
  --ezy-loader-muted: #5a6b62;
}

/* ========== A — Bouncy green dots ========== */
.ezy-loader-a-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 16px;
  min-height: 80px;
  width: 100%;
  box-sizing: border-box;
}

.ezy-loader-a {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
  height: 28px;
}

.ezy-loader-a > span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ezy-loader-emerald);
  animation: ezy-loader-bounce 0.7s ease-in-out infinite alternate;
}

.ezy-loader-a > span:nth-child(1) {
  background: var(--ezy-loader-emerald-mid);
  animation-delay: 0s;
}
.ezy-loader-a > span:nth-child(2) {
  background: var(--ezy-loader-emerald);
  animation-delay: 0.12s;
}
.ezy-loader-a > span:nth-child(3) {
  background: var(--ezy-loader-emerald-deep);
  animation-delay: 0.24s;
}

@keyframes ezy-loader-bounce {
  from {
    transform: translateY(0);
    opacity: 0.55;
  }
  to {
    transform: translateY(-12px);
    opacity: 1;
  }
}

.ezy-loader-a-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ezy-loader-muted);
  margin: 0;
}

html[data-ezy-theme="dark"] .ezy-loader-a-label,
html.ezy-theme-dark .ezy-loader-a-label {
  color: #b8c9be;
}

/* Compact A for inline buttons / small slots */
.ezy-loader-a-wrap.ezy-loader-a-sm {
  padding: 12px;
  min-height: 48px;
  gap: 8px;
}
.ezy-loader-a-wrap.ezy-loader-a-sm .ezy-loader-a > span {
  width: 9px;
  height: 9px;
}

/* ========== F — Full-screen brand + progress ========== */
.ezy-loader-f-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 30, 22, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.ezy-loader-f-card {
  width: min(420px, 100%);
  background: rgba(245, 252, 248, 0.97);
  border-radius: 0;
  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.12),
    0 16px 48px rgba(0, 0, 0, 0.35);
  padding: 36px 28px 28px;
  text-align: center;
  color: var(--ezy-loader-ink);
}

html[data-ezy-theme="dark"] .ezy-loader-f-card {
  background: rgba(28, 32, 30, 0.96);
  color: #f2f5f3;
  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.06),
    0 16px 48px rgba(0, 0, 0, 0.5);
}

.ezy-loader-f-mark {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, #219866 0%, #0f5a3c 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: ezy-loader-f-bounce 1s ease-in-out infinite;
  box-shadow: 0 14px 32px rgba(13, 59, 46, 0.35);
}

.ezy-loader-f-mark::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 28px;
  border: 2px solid rgba(26, 122, 82, 0.4);
  animation: ezy-loader-f-ring 1s ease-out infinite;
  pointer-events: none;
}

@keyframes ezy-loader-f-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes ezy-loader-f-ring {
  0% { transform: scale(0.94); opacity: 0.85; }
  100% { transform: scale(1.12); opacity: 0; }
}

.ezy-loader-f-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d3b2e;
  margin: 0 0 6px;
}

html[data-ezy-theme="dark"] .ezy-loader-f-title {
  color: #e8f6ef;
}

.ezy-loader-f-sub {
  font-size: 0.9rem;
  color: var(--ezy-loader-muted);
  margin: 0 0 16px;
  line-height: 1.4;
}

html[data-ezy-theme="dark"] .ezy-loader-f-sub {
  color: #b8c9be;
}

.ezy-loader-f-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(13, 59, 46, 0.12);
  overflow: hidden;
  margin: 0 0 10px;
}

html[data-ezy-theme="dark"] .ezy-loader-f-track {
  background: rgba(255, 255, 255, 0.1);
}

.ezy-loader-f-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #146b48, #5ee9a8, #1f8f5f);
  background-size: 200% 100%;
  transition: width 0.35s ease;
  animation: ezy-loader-f-shim 1.4s linear infinite;
}

.ezy-loader-f-fill.is-indeterminate {
  width: 42% !important;
  animation: ezy-loader-f-indet 1.1s ease-in-out infinite;
}

@keyframes ezy-loader-f-shim {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@keyframes ezy-loader-f-indet {
  0% { transform: translateX(-80%); }
  100% { transform: translateX(220%); }
}

.ezy-loader-f-pct {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ezy-loader-emerald-deep);
  margin: 0;
}

html[data-ezy-theme="dark"] .ezy-loader-f-pct {
  color: #5ee9a8;
}

/* Hide legacy GIF if any slip through */
img[src*="loading.gif"] {
  display: none !important;
}
