/* =====================================================================
 * DEMO: Simulacao de reconhecimento facial - Versao Institucional
 *
 * Modal centralizado, paleta corporativa sobria (branco/cinza/azul),
 * sem efeitos sci-fi. Foco em clareza e profissionalismo: silhueta neutra,
 * barra de progresso linear, mensagens objetivas, sucesso com check classico.
 * ===================================================================== */

.dfs-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
  padding: 16px;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.dfs-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Card principal - estilo modal corporativo */
.dfs-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transform: translateY(8px);
  transition: transform .25s ease;
}
.dfs-overlay.is-open .dfs-card { transform: translateY(0); }

/* Cabecalho institucional */
.dfs-header {
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dfs-header-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #0d6efd;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.dfs-header-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.2;
  margin: 0;
}
.dfs-header-subtitle {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 0 0;
  font-weight: 400;
}

/* Conteudo central - silhueta neutra */
.dfs-body {
  padding: 24px 20px 20px;
  text-align: center;
}

.dfs-avatar {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color .3s ease, background .3s ease;
}

/* SVG da silhueta neutra (sem brilho, cinza-azulado) */
.dfs-avatar-icon {
  width: 64px;
  height: 64px;
  color: #94a3b8;
  transition: color .3s ease;
}

/* Anel de progresso ao redor da silhueta */
.dfs-ring {
  position: absolute;
  inset: -6px;
  pointer-events: none;
}
.dfs-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dfs-ring circle {
  fill: none;
  stroke: #0d6efd;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 351.86;          /* 2 * PI * r (r=56) */
  stroke-dashoffset: 351.86;
  transition: stroke-dashoffset .4s ease, stroke .3s ease;
}
.dfs-ring-bg {
  position: absolute;
  inset: -6px;
  pointer-events: none;
}
.dfs-ring-bg svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dfs-ring-bg circle {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 3;
}

/* Status textual */
.dfs-status {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  min-height: 20px;
  margin: 0 0 4px 0;
}
.dfs-status-hint {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  min-height: 16px;
}

/* Barra de progresso linear no rodape */
.dfs-progress-wrap {
  margin-top: 18px;
  padding: 0 4px;
}
.dfs-progress-track {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}
.dfs-progress-fill {
  height: 100%;
  background: #0d6efd;
  width: 0%;
  transition: width .35s ease, background .3s ease;
}

/* Rodape com metadado discreto */
.dfs-footer {
  padding: 10px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dfs-footer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dfs-footer-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #0d6efd;
  animation: dfs-pulse 1.4s ease-in-out infinite;
}
@keyframes dfs-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* === Estado: SUCESSO === */
.dfs-overlay.is-success .dfs-avatar {
  background: #ecfdf5;
  border-color: #34d399;
}
.dfs-overlay.is-success .dfs-avatar-icon {
  color: #10b981;
}
.dfs-overlay.is-success .dfs-ring circle {
  stroke: #10b981;
  stroke-dashoffset: 0 !important;
}
.dfs-overlay.is-success .dfs-progress-fill {
  background: #10b981;
  width: 100% !important;
}
.dfs-overlay.is-success .dfs-footer-dot {
  background: #10b981;
  animation: none;
}
.dfs-overlay.is-success .dfs-footer-status { color: #047857; }

/* Check verde sobreposto a silhueta */
.dfs-check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity .2s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
  background: #ecfdf5;
}
.dfs-overlay.is-success .dfs-check {
  opacity: 1;
  transform: scale(1);
}
.dfs-check-svg {
  width: 48px;
  height: 48px;
  color: #10b981;
}

.dfs-overlay.is-success .dfs-avatar-icon { display: none; }
