/* Reusable notification badge and alert outlines.
   Change badge size/position/glow here and every button badge follows. */
:root {
  --notification-badge-edge: 5%;
  --notification-badge-size: 20px;
  --notification-badge-dot-size: 14px;
  --notification-badge-padding-x: 6px;
  --notification-badge-font-size: 0.66rem;

  --alert-yellow: #facc15;
  --alert-yellow-soft: rgba(250, 204, 21, 0.28);
  --alert-yellow-border: rgba(250, 204, 21, 0.74);
  --alert-yellow-glow-strong: 0 0 9px rgba(250, 204, 21, 0.98);
  --alert-yellow-glow-soft: 0 0 22px rgba(250, 204, 21, 0.58);
  --alert-yellow-glow-wide: 0 0 38px rgba(250, 204, 21, 0.22);

  --alert-red: #ef4444;
  --alert-red-soft: rgba(248, 113, 113, 0.24);
  --alert-red-border: rgba(248, 113, 113, 0.82);
  --alert-red-glow-strong: 0 0 9px rgba(248, 113, 113, 0.98);
  --alert-red-glow-soft: 0 0 22px rgba(248, 113, 113, 0.58);
  --alert-red-glow-wide: 0 0 38px rgba(248, 113, 113, 0.22);
}

.has-notification-badge,
.module-card,
.data-card {
  position: relative !important;
}

.notification-badge,
.menu-alert-dot {
  position: absolute !important;
  top: var(--notification-badge-edge) !important;
  right: var(--notification-badge-edge) !important;
  min-width: var(--notification-badge-size) !important;
  height: var(--notification-badge-size) !important;
  padding: 0 var(--notification-badge-padding-x) !important;
  border-radius: 999px !important;
  display: inline-grid !important;
  place-items: center !important;
  font-size: var(--notification-badge-font-size) !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  z-index: 8 !important;
  pointer-events: none !important;
  transform: translate(0, 0) !important;
}

.notification-badge--dot {
  width: var(--notification-badge-dot-size) !important;
  min-width: var(--notification-badge-dot-size) !important;
  height: var(--notification-badge-dot-size) !important;
  padding: 0 !important;
  font-size: 0 !important;
}

.notification-badge--yellow,
.menu-alert-dot--yellow {
  color: #422006 !important;
  background: radial-gradient(circle at 35% 30%, #fef9c3 0%, #fde047 38%, #facc15 72%, #eab308 100%) !important;
  border: 1px solid rgba(254, 240, 138, 0.96) !important;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.84),
    var(--alert-yellow-glow-strong),
    var(--alert-yellow-glow-soft),
    var(--alert-yellow-glow-wide) !important;
}

.notification-badge--red,
.menu-alert-dot--red {
  color: #450a0a !important;
  background: radial-gradient(circle at 35% 30%, #fee2e2 0%, #f87171 38%, #ef4444 72%, #dc2626 100%) !important;
  border: 1px solid rgba(254, 202, 202, 0.96) !important;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.84),
    var(--alert-red-glow-strong),
    var(--alert-red-glow-soft),
    var(--alert-red-glow-wide) !important;
}

.has-notification-badge--yellow,
.module-card.has-menu-alert,
.module-card.has-notification-badge--yellow {
  border-color: rgba(250, 204, 21, 0.58) !important;
}

.has-notification-badge--red,
.data-card.has-notification-badge--red {
  border-color: rgba(248, 113, 113, 0.72) !important;
}

/* Reusable card outline alerts. Manage Trainings uses outlines instead of dots. */
.training-urgency-outline--yellow,
.alert-outline--yellow {
  border-color: var(--alert-yellow-border) !important;
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.38),
    0 0 0 1px rgba(250, 204, 21, 0.18),
    0 0 18px rgba(250, 204, 21, 0.16) !important;
}

.training-urgency-outline--red,
.alert-outline--red {
  border-color: var(--alert-red-border) !important;
  box-shadow:
    inset 0 0 0 1px rgba(248, 113, 113, 0.42),
    0 0 0 1px rgba(248, 113, 113, 0.22),
    0 0 18px rgba(248, 113, 113, 0.18) !important;
}

.training-set-warning-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin: 0 0 14px;
  border: 1px solid var(--alert-yellow-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.16), transparent 34%),
    rgba(15, 23, 42, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.18),
    0 0 24px rgba(250, 204, 21, 0.12);
}

.training-set-warning-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.training-set-warning-pill,
.training-set-no-worker-pill {
  background: var(--alert-yellow-soft) !important;
  color: #fef08a !important;
  border: 1px solid rgba(250, 204, 21, 0.32) !important;
}

.training-set-warning-group {
  display: grid;
  gap: 8px;
}

.training-set-warning-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.training-set-warning-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.26);
  background: rgba(250, 204, 21, 0.11);
  color: #fef9c3;
  font-size: 0.84rem;
  font-weight: 800;
}

/* Generic warning panels reused by setup pages such as Areas and Users. */
.app-warning-panel,
.setup-warning-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin: 0 0 14px;
  border: 1px solid var(--alert-yellow-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.16), transparent 34%),
    rgba(15, 23, 42, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.18),
    0 0 24px rgba(250, 204, 21, 0.12);
}

.app-warning-panel__head,
.setup-warning-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-warning-panel p,
.setup-warning-panel p {
  margin: 0;
}
