/* ================================================================
   ALERTA — ProdCheck  |  Padrão visual deploy Firebase
   ================================================================ */

/* ── Keyframes ── */
@keyframes _alertaFadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes _alertaSlideUp { from { transform:translateY(24px);opacity:0 } to { transform:translateY(0);opacity:1 } }

/* ── Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.modal-overlay.open {
  display: flex;
  animation: _alertaFadeIn .18s ease;
}

/* ── Modal Box ── */
.modal-box {
  background: var(--bg-secondary, #ffffff);
  border-radius: 20px;
  padding: 0;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  overflow: hidden;
  animation: _alertaSlideUp .22s ease;
}

/* ── Ícone (header colorido) ── */
.modal-icon {
  font-size: 52px;
  text-align: center;
  padding: 28px 24px 8px;
  line-height: 1;
}

/* ── Cores do header por tipo ── */
.modal-success .modal-icon { background: linear-gradient(135deg, var(--success-bg,#d1fae5), var(--success-border,#a7f3d0)); }
.modal-error   .modal-icon { background: linear-gradient(135deg, var(--error-bg,#fee2e2),   var(--error-border,#fecaca)); }
.modal-warning .modal-icon { background: linear-gradient(135deg, var(--warning-bg,#fffbeb),  var(--warning-border,#fef3c7)); }
.modal-info    .modal-icon { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.modal-progress .modal-icon { background: linear-gradient(135deg, var(--primary-light,#eef2ff), #c7d2fe); }

/* ── Corpo ── */
.modal-body {
  padding: 8px 24px 24px;
  text-align: center;
}
.modal-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary, #111827);
}
.modal-body p {
  color: var(--text-secondary, #6b7280);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.modal-btns {
  display: flex;
  gap: 10px;
}
.modal-btns .btn {
  flex: 1;
  justify-content: center;
  padding: 12px;
  font-size: 14px;
  border-radius: 12px;
}

/* ── Progress bar ── */
.progress-bar-wrap {
  background: var(--border-color, #e5e7eb);
  border-radius: 50px;
  height: 8px;
  margin: 0 0 8px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--primary-color, #1d4ed8);
  border-radius: 50px;
  transition: width .3s ease;
}
.progress-msg {
  font-size: 13px;
  color: var(--text-secondary, #6b7280);
  text-align: center;
  min-height: 20px;
}

/* ── Botões ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-green { background: var(--success-color, #059669); color: #fff; }
.btn-red   { background: var(--error-color, #dc2626);   color: #fff; }
.btn-blue  { background: var(--primary-color, #1d4ed8); color: #fff; }
.btn-gray  { background: var(--bg-tertiary, #f3f4f6); color: var(--text-secondary, #4b5563); border: 1px solid var(--border-color, #e5e7eb); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #111827;
  color: #fff;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 13px;
  z-index: 20000;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  transition: opacity .3s, transform .3s;
}
.toast.toast-success { background: #065f46; }
.toast.toast-error   { background: #991b1b; }
.toast.toast-warning { background: #92400e; }
.toast.toast-info    { background: var(--primary-color, #1d4ed8); }

/* ── Dark mode (.dark-theme) ── */
.dark-theme .modal-box {
  background: var(--bg-secondary, #1e293b);
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.dark-theme .modal-body h3 { color: var(--text-primary, #f1f5f9); }
.dark-theme .modal-body p  { color: var(--text-secondary, #94a3b8); }
.dark-theme .btn-gray {
  background: var(--bg-tertiary, #334155);
  color: var(--text-secondary, #cbd5e1);
  border-color: var(--border-color, #475569);
}
.dark-theme .progress-bar-wrap { background: var(--bg-tertiary, #334155); }

/* ── Aliases para compatibilidade com classes do deploy ── */
.btn-green { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 4px 15px rgba(16,185,129,.2); }
.btn-green:hover { opacity:.95; transform:translateY(-2px); }
.btn-red   { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 4px 15px rgba(239,68,68,.2); }
.btn-red:hover   { opacity:.95; transform:translateY(-2px); }
.btn-blue  { background: linear-gradient(135deg, var(--primary-color,#2464ee), #3b82f6); color: #fff; }
.btn-blue:hover  { opacity:.95; transform:translateY(-2px); }
