/* Global “leaving site” confirmation — public website only */

.elw-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(17, 24, 39, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.elw-backdrop.elw-backdrop--open {
  opacity: 1;
  visibility: visible;
}

.elw-dialog {
  width: 100%;
  max-width: 26rem;
  background: #fff;
  border-radius: 1.125rem;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 20px 40px rgba(0, 0, 0, 0.12);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #111827;
  text-align: left;
}

.elw-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 0;
}

.elw-dialog__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
}

.elw-dialog__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.25rem -0.25rem 0 0;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  color: #374151;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.elw-dialog__close:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

.elw-dialog__body {
  padding: 1rem 1.5rem 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #374151;
}

.elw-dialog__body p {
  margin: 0 0 0.75rem;
}

.elw-dialog__body p:last-child {
  margin-bottom: 0;
}

.elw-dialog__host {
  font-weight: 700;
  color: #111827;
}

.elw-dialog__actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0 1.5rem 1.5rem;
}

.elw-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.elw-btn--primary {
  background: #4f46e5;
  color: #fff;
}

.elw-btn--primary:hover {
  background: #4338ca;
}

.elw-btn--secondary {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #e5e7eb;
}

.elw-btn--secondary:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

body.elw-modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .elw-backdrop {
    transition: none;
  }
}
