/* ============================================================
   layout/alerts.css — Flash dialog, inline alerts, confirm
   ------------------------------------------------------------
   Shared by public pages and the dashboard (loaded by both
   layouts). All colors reference theme.css tokens.
   ============================================================ */

/* ---- Flash overlay dialog (JrlConfirm / JrlFlash) ---- */
.jrl-flash-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--overlay); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: jrlFlashFadeIn 0.2s ease;
}
.jrl-flash-dialog {
  background: var(--bg-section); border-radius: 16px;
  padding: 36px 32px 28px; max-width: 400px; width: 90%; text-align: center;
  box-shadow: var(--shadow-xl);
  animation: jrlFlashSlideUp 0.25s ease;
}
.jrl-flash-icon {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 18px;
}
.jrl-flash-icon.success { background: rgba(var(--emerald-rgb), 0.12); color: var(--emerald); }
.jrl-flash-icon.error { background: rgba(var(--danger-rgb), 0.12); color: var(--danger); }
.jrl-flash-icon.warning { background: rgba(var(--warning-rgb), 0.12); color: var(--warning); }
.jrl-flash-dialog h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.jrl-flash-dialog p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 24px; line-height: 1.5; }
.jrl-flash-dialog .btn-ok {
  padding: 10px 36px; border: none; border-radius: 10px; font-weight: 600;
  font-size: 0.88rem; cursor: pointer; color: var(--white); transition: all 0.2s;
}
.jrl-flash-dialog .btn-ok.success { background: var(--emerald); }
.jrl-flash-dialog .btn-ok.success:hover { background: var(--emerald-600); }
.jrl-flash-dialog .btn-ok.error { background: var(--danger); }
.jrl-flash-dialog .btn-ok.error:hover { background: var(--danger-600); }
.jrl-confirm-actions { display: flex; gap: 12px; justify-content: center; margin-top: 0; }
.jrl-confirm-actions .btn-cancel {
  padding: 10px 24px; border-radius: 10px; font-weight: 600; font-size: 0.88rem;
  border: 1px solid var(--input-border); background: var(--input-bg);
  color: var(--text); cursor: pointer; transition: all 0.2s;
}
.jrl-confirm-actions .btn-cancel:hover { background: var(--bg-section); }
.jrl-confirm-actions .btn-danger {
  padding: 10px 24px; border: none; border-radius: 10px; font-weight: 600;
  font-size: 0.88rem; cursor: pointer; color: var(--white); background: var(--danger); transition: all 0.2s;
}
.jrl-confirm-actions .btn-danger:hover { background: var(--danger-600); }
@keyframes jrlFlashFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes jrlFlashSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Inline flash alerts ---- */
.jrl-alert {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
  font-size: 0.9rem; font-weight: 500;
  animation: jrlAlertSlideIn 0.25s ease;
}
.jrl-alert-content { display: flex; align-items: center; gap: 10px; }
.jrl-alert-icon { font-size: 1.1rem; flex-shrink: 0; }
.jrl-alert-text { line-height: 1.4; }
.jrl-alert-close {
  background: none; border: none; font-size: 1.3rem; line-height: 1;
  cursor: pointer; opacity: 0.6; transition: opacity 0.2s; padding: 0 0 0 12px;
  color: inherit;
}
.jrl-alert-close:hover { opacity: 1; }
.jrl-alert-success {
  background: rgba(var(--emerald-rgb), 0.10); color: var(--green-700);
  border: 1px solid rgba(var(--emerald-rgb), 0.25);
}
[data-theme=dark] .jrl-alert-success { color: var(--emerald-400); }
.jrl-alert-success .jrl-alert-icon { color: var(--emerald); }
.jrl-alert-error {
  background: rgba(var(--danger-rgb), 0.10); color: var(--danger-700);
  border: 1px solid rgba(var(--danger-rgb), 0.25);
}
[data-theme=dark] .jrl-alert-error { color: var(--danger-400); }
.jrl-alert-error .jrl-alert-icon { color: var(--danger); }
@keyframes jrlAlertSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
