/* Styles for EshebaNotify (dashboard-notify.js) on pages that do not load dashboard.css. */

body.ap-modal-open {
  overflow: hidden;
}

.ap-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ap-modal[hidden] {
  display: none !important;
}

.ap-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.ap-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--esheba-border);
  background: var(--esheba-surface);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}

.ap-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--esheba-border);
}

.ap-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--esheba-navy);
}

.ap-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--esheba-bg-alt);
  color: var(--esheba-muted);
  cursor: pointer;
}

.ap-modal__close:hover {
  color: var(--esheba-navy);
}

.ap-modal__body {
  padding: 1rem 1.1rem;
  overflow-y: auto;
}

.ap-modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--esheba-border);
}

.ap-toast-host {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 13000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
}

.ap-toast {
  min-width: 220px;
  max-width: min(90vw, 420px);
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}

.ap-toast--show {
  opacity: 1;
  transform: translateY(0);
}

.ap-toast--success {
  background: #15803d;
}

.ap-toast--error {
  background: #b91c1c;
}

.ap-toast--info {
  background: #0b3d4c;
}

.dash-notify-toast-host {
  z-index: 10050;
}

.dash-notify-toast {
  font-size: 0.92rem;
  line-height: 1.65;
  padding: 0.9rem 1.25rem;
  max-width: min(92vw, 480px);
}

.dash-notify-modal__dialog {
  max-width: 440px;
}

.dash-notify-modal__message {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.85;
  color: var(--esheba-text);
  white-space: pre-line;
  text-align: right;
}

.dash-notify-modal--warning .dash-notify-modal__message {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: color-mix(in srgb, #f59e0b 14%, var(--esheba-surface, #fff));
  border: 1px solid color-mix(in srgb, #f59e0b 40%, var(--esheba-border, #e5e7eb));
  color: var(--esheba-text);
}

.dash-notify-modal--error .dash-notify-modal__message {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: color-mix(in srgb, #ef4444 12%, var(--esheba-surface, #fff));
  border: 1px solid color-mix(in srgb, #ef4444 35%, var(--esheba-border, #e5e7eb));
  color: var(--esheba-text);
}

.dash-notify-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

.dash-notify-modal__ok {
  min-width: 7rem;
}

.dash-notify-modal--error .ap-modal__title {
  color: #ef4444;
}

.dash-notify-modal--success .ap-modal__title {
  color: #22c55e;
}

.dash-notify-modal--warning .ap-modal__title {
  color: #f59e0b;
}
