.alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.alert-dialog {
  width: min(500px, 100%);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 32px 64px rgba(0, 0, 0, 0.28);
  animation: alert-pop 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes alert-pop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* macOS sheet */
.alert-dialog--mac {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.alert-dialog--mac .alert-dialog__titlebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #ebebeb 0%, #d8d8d8 100%);
  border-bottom: 1px solid #b0b0b5;
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
}

.alert-titlebar-icon {
  width: 18px;
  height: 18px;
  background: #ff9500;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 800;
}

.alert-titlebar-icon::after {
  content: '!';
}

/* Windows Defender style */
.alert-dialog--win {
  font-family: 'Segoe UI', sans-serif;
  background: #fff;
  border: 1px solid #d1d1d1;
  border-radius: 8px;
}

.alert-dialog--win .alert-dialog__titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #0078d4, #106ebe);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.alert-dialog--win .alert-titlebar-icon {
  background: #fff;
  color: #0078d4;
}

.alert-dialog--win .alert-titlebar-icon::after {
  content: '🛡';
  font-size: 10px;
}

.alert-dialog__body {
  padding: 22px 24px 18px;
  background: #fff;
}

.alert-dialog--mac .alert-dialog__body {
  background: #fff;
  margin: 12px 12px 0;
  border-radius: 10px 10px 0 0;
}

.alert-shield-row {
  text-align: center;
  margin-bottom: 16px;
}

.alert-dialog__icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.alert-dialog__headline {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #d70015;
  line-height: 1.35;
}

.alert-dialog--win .alert-dialog__headline {
  color: #a80000;
}

.alert-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e5ea;
}

.alert-dialog--win .alert-data-table {
  border-color: #edebe9;
}

.alert-data-table th,
.alert-data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e5e5ea;
}

.alert-data-table tr:last-child th,
.alert-data-table tr:last-child td {
  border-bottom: none;
}

.alert-data-table th {
  width: 38%;
  font-weight: 600;
  color: #6e6e73;
  background: #f5f5f7;
}

.alert-dialog--win .alert-data-table th {
  background: #faf9f8;
  color: #605e5c;
}

.alert-data-table td {
  font-weight: 600;
  color: #1d1d1f;
}

.alert-mono {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.alert-dialog__warn {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
  color: #424245;
  padding: 10px 12px;
  background: #fff8e6;
  border-radius: 8px;
  border: 1px solid #ffd60a;
}

.alert-dialog--win .alert-dialog__warn {
  background: #fff4ce;
  border-color: #ffb900;
  color: #323130;
}

.alert-dialog__footer {
  padding: 14px 20px 20px;
  text-align: center;
  background: #f5f5f7;
}

.alert-dialog--mac .alert-dialog__footer {
  margin: 0 12px 12px;
  border-radius: 0 0 10px 10px;
}

.alert-dialog--win .alert-dialog__footer {
  background: #faf9f8;
  border-top: 1px solid #edebe9;
}

.alert-btn-ok {
  min-width: 200px;
  padding: 11px 32px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: #fff;
  transition: transform 0.1s, filter 0.15s;
}

.alert-btn-ok:active {
  transform: scale(0.98);
}

.alert-dialog--mac .alert-btn-ok {
  background: #0071e3;
  border-radius: 980px;
}

.alert-dialog--mac .alert-btn-ok:hover {
  filter: brightness(1.05);
}

.alert-dialog--win .alert-btn-ok {
  background: #0067c0;
  border-radius: 4px;
}

.alert-dialog--win .alert-btn-ok:hover {
  background: #005a9e;
}
