/* Moart 전역 이벤트 알림 모달 + 이미지 확대 라이트박스 (라이트/다크 모드 지원, 순수 SVG 아이콘) */
.moart-alert-backdrop,
.moart-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: moartModalFadeIn 0.16s ease-out;
}

@keyframes moartModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.moart-alert-dialog {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  overflow: hidden;
  animation: moartModalPopIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes moartModalPopIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.moart-alert-body {
  padding: 24px 24px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.moart-alert-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.moart-alert-icon--error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.moart-alert-icon--success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.moart-alert-icon--warn {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.moart-alert-icon--info {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
}

.moart-alert-content {
  flex: 1;
  min-width: 0;
}

.moart-alert-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.moart-alert-message {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #334155;
  white-space: pre-line;
  word-break: keep-all;
}

.moart-alert-foot {
  padding: 14px 20px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}

.moart-alert-btn {
  height: 38px;
  padding: 0 20px;
  border-radius: 10px;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.moart-alert-btn:active {
  transform: translateY(1px);
}

.moart-alert-btn--error {
  background: #dc2626;
  color: #ffffff;
}
.moart-alert-btn--error:hover { background: #b91c1c; }

.moart-alert-btn--success {
  background: #059669;
  color: #ffffff;
}
.moart-alert-btn--success:hover { background: #047857; }

.moart-alert-btn--warn {
  background: #d97706;
  color: #ffffff;
}
.moart-alert-btn--warn:hover { background: #b45309; }

.moart-alert-btn--info {
  background: #4f46e5;
  color: #ffffff;
}
.moart-alert-btn--info:hover { background: #4338ca; }

/* 이미지 확대보기 라이트박스 */
.moart-lightbox-dialog {
  width: min(92vw, 980px);
  max-height: 90vh;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.34);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: moartModalPopIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.moart-lightbox-head {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
}

.moart-lightbox-meta {
  min-width: 0;
}

.moart-lightbox-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moart-lightbox-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
}

.moart-lightbox-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.moart-lightbox-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.moart-lightbox-stage {
  flex: 1;
  overflow: auto;
  background: #f1f5f9;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.moart-lightbox-stage img {
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
  background: #ffffff;
  display: block;
}

/* 다크 모드 대응 */
[data-theme="dark"] .moart-alert-dialog,
body.dark-mode .moart-alert-dialog,
[data-theme="dark"] .moart-lightbox-dialog,
body.dark-mode .moart-lightbox-dialog {
  background: #0f172a;
  color: #f8fafc;
  border-color: #334155;
}

[data-theme="dark"] .moart-alert-title,
body.dark-mode .moart-alert-title,
[data-theme="dark"] .moart-lightbox-title,
body.dark-mode .moart-lightbox-title {
  color: #f8fafc;
}

[data-theme="dark"] .moart-alert-message,
body.dark-mode .moart-alert-message {
  color: #cbd5e1;
}

[data-theme="dark"] .moart-alert-foot,
body.dark-mode .moart-alert-foot,
[data-theme="dark"] .moart-lightbox-head,
body.dark-mode .moart-lightbox-head {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .moart-lightbox-sub,
body.dark-mode .moart-lightbox-sub {
  color: #94a3b8;
}

[data-theme="dark"] .moart-lightbox-close,
body.dark-mode .moart-lightbox-close {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme="dark"] .moart-lightbox-stage,
body.dark-mode .moart-lightbox-stage {
  background: #020617;
}

[data-theme="dark"] .moart-alert-icon--error,
body.dark-mode .moart-alert-icon--error {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(248, 113, 113, 0.35);
  color: #f87171;
}

[data-theme="dark"] .moart-alert-icon--success,
body.dark-mode .moart-alert-icon--success {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
}

[data-theme="dark"] .moart-alert-icon--warn,
body.dark-mode .moart-alert-icon--warn {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fbbf24;
}

[data-theme="dark"] .moart-alert-icon--info,
body.dark-mode .moart-alert-icon--info {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(129, 140, 248, 0.35);
  color: #a5b4fc;
}
