/* 포털 로그인 오류 알림 — 라이트/다크 공통 */
.pla-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.pla-alert__svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  display: block;
}

.pla-alert__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.05rem;
  border-radius: 0.5rem;
}

.pla-alert__content {
  min-width: 0;
  flex: 1;
}

.pla-alert__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.5;
}

/* 단순 오류 — 수강생 로그인 등 */
.pla-alert--compact {
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #fecdd3;
  background: #fff;
  color: #9f1239;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.06);
}

.pla-alert--compact .pla-alert__title {
  font-weight: 500;
  color: #be123c;
}

.pla-alert__svg--inline {
  color: #e11d48;
}

/* 횟수 포함 오류 */
.pla-alert--error:not(.pla-alert--compact) {
  border: 1px solid #fecdd3;
  background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
  color: #9f1239;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.05);
}

.pla-alert--error:not(.pla-alert--compact) .pla-alert__icon {
  background: #ffe4e6;
  color: #e11d48;
}

.pla-alert--error:not(.pla-alert--compact) .pla-alert__title {
  margin-bottom: 0.4rem;
  color: #be123c;
}

.pla-alert__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.pla-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pla-stat strong {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pla-stat--fail {
  background: #ffe4e6;
  color: #be123c;
}

.pla-stat--left {
  background: #f1f5f9;
  color: #475569;
}

.pla-stat__dot {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 999px;
  background: #cbd5e1;
}

.pla-alert__extra {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: #b45309;
}

/* ── 로그인 잠금 안내 ── */
.pla-alert--lockout {
  border: 1px solid #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
  color: #92400e;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}

.pla-alert__icon--lockout {
  background: #fef3c7;
  color: #d97706;
}

.pla-lockout-intro {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.pla-lockout-intro__chip {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #fef3c7;
  color: #b45309;
}

.pla-lockout-intro__reason {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  color: #78350f;
}

.pla-lockout-intro__headline {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #92400e;
}

.pla-lockout-intro__guide {
  margin: 0.1rem 0 0;
  padding-top: 0.35rem;
  border-top: 1px solid #fde68a;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  color: #a16207;
}

/* 다크 모드 */
html.dark .pla-alert--compact,
html[data-theme="dark"] .pla-alert--compact,
html[data-admin-theme="dark"] .pla-alert--compact,
.dark .pla-alert--compact {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html.dark .pla-alert--compact .pla-alert__title,
html[data-theme="dark"] .pla-alert--compact .pla-alert__title,
html[data-admin-theme="dark"] .pla-alert--compact .pla-alert__title,
.dark .pla-alert--compact .pla-alert__title {
  color: #fecdd3;
}

html.dark .pla-alert__svg--inline,
html[data-theme="dark"] .pla-alert__svg--inline,
html[data-admin-theme="dark"] .pla-alert__svg--inline,
.dark .pla-alert__svg--inline {
  color: #fb7185;
}

html.dark .pla-alert--error:not(.pla-alert--compact),
html[data-theme="dark"] .pla-alert--error:not(.pla-alert--compact),
html[data-admin-theme="dark"] .pla-alert--error:not(.pla-alert--compact),
.dark .pla-alert--error:not(.pla-alert--compact) {
  border-color: rgba(248, 113, 113, 0.3);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.35) 0%, rgba(69, 10, 10, 0.2) 100%);
  color: #fecaca;
}

html.dark .pla-alert--error:not(.pla-alert--compact) .pla-alert__icon,
html[data-theme="dark"] .pla-alert--error:not(.pla-alert--compact) .pla-alert__icon,
html[data-admin-theme="dark"] .pla-alert--error:not(.pla-alert--compact) .pla-alert__icon,
.dark .pla-alert--error:not(.pla-alert--compact) .pla-alert__icon {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
}

html.dark .pla-stat--fail,
html[data-theme="dark"] .pla-stat--fail,
html[data-admin-theme="dark"] .pla-stat--fail,
.dark .pla-stat--fail {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

html.dark .pla-stat--left,
html[data-theme="dark"] .pla-stat--left,
html[data-admin-theme="dark"] .pla-stat--left,
.dark .pla-stat--left {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

html.dark .pla-alert--lockout,
html[data-theme="dark"] .pla-alert--lockout,
html[data-admin-theme="dark"] .pla-alert--lockout,
.dark .pla-alert--lockout {
  border-color: rgba(251, 191, 36, 0.28);
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.35) 0%, rgba(69, 26, 3, 0.2) 100%);
  color: #fde68a;
}

html.dark .pla-alert__icon--lockout,
html[data-theme="dark"] .pla-alert__icon--lockout,
html[data-admin-theme="dark"] .pla-alert__icon--lockout,
.dark .pla-alert__icon--lockout {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
}

html.dark .pla-lockout-intro__chip,
html[data-theme="dark"] .pla-lockout-intro__chip,
html[data-admin-theme="dark"] .pla-lockout-intro__chip,
.dark .pla-lockout-intro__chip {
  background: rgba(251, 191, 36, 0.18);
  color: #fde68a;
}

html.dark .pla-lockout-intro__reason,
html[data-theme="dark"] .pla-lockout-intro__reason,
html[data-admin-theme="dark"] .pla-lockout-intro__reason,
.dark .pla-lockout-intro__reason {
  color: #fde68a;
}

html.dark .pla-lockout-intro__headline,
html[data-theme="dark"] .pla-lockout-intro__headline,
html[data-admin-theme="dark"] .pla-lockout-intro__headline,
.dark .pla-lockout-intro__headline {
  color: #fffbeb;
}

html.dark .pla-lockout-intro__guide,
html[data-theme="dark"] .pla-lockout-intro__guide,
html[data-admin-theme="dark"] .pla-lockout-intro__guide,
.dark .pla-lockout-intro__guide {
  color: #fcd34d;
  border-top-color: rgba(251, 191, 36, 0.18);
}

#portalLoginLockoutModal .pla-lockout-intro {
  margin-top: 0.35rem;
  gap: 0.35rem;
}

#portalLoginLockoutModal .pla-lockout-intro__guide {
  margin-top: 0.1rem;
}
