/* Component: core UI overlays (confirmation dialogs and notifications).
 * These elements are created directly under <body> by assets/js/core.js,
 * so their styles must not be scoped to .wpar-app.
 */

.wpar-notification-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wpar-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 17, 23, .55);
  pointer-events: auto;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  animation: wpar-confirm-fade-in 160ms ease-out both;
}

.wpar-confirm {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  margin: 0;
  padding: 24px;
  border: 1px solid #dbe1f3;
  border-radius: 16px;
  background: #fff;
  color: #0a0f3d;
  box-shadow: 0 20px 60px rgba(15, 17, 23, .24);
  font: inherit;
  animation: wpar-confirm-card-in 180ms ease-out both;
}

.wpar-confirm__title {
  margin: 0;
  color: #0a0f3d;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.wpar-confirm__message {
  margin: 10px 0 0;
  color: #5a6288;
  font-size: 14px;
  line-height: 1.55;
}

.wpar-confirm__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.wpar-confirm__actions .wpar-button {
  flex: 0 0 auto;
  min-height: 40px;
  margin: 0;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.wpar-confirm__actions .wpar-button--quiet {
  background: #fff;
  color: #0a0f3d;
  border-color: #dbe1f3;
}

.wpar-confirm__actions .wpar-button--quiet:hover {
  background: #eff2fa;
  border-color: #c5cdea;
}

.wpar-confirm__actions .wpar-button--solid {
  background: #2f3fbf;
  color: #fff;
}

.wpar-confirm__actions .wpar-button--solid:hover {
  background: #03075b;
  color: #fff;
}

/* Destructive confirmations (for example, Move to Trash).
 * Keep these rules scoped to the confirmation component and override generic
 * theme button/hover rules, including rules that target button text. */
.wpar-confirm__actions button.wpar-button.wpar-button--danger,
.wpar-confirm__actions button.wpar-button.wpar-button--danger:hover,
.wpar-confirm__actions button.wpar-button.wpar-button--danger:focus,
.wpar-confirm__actions button.wpar-button.wpar-button--danger:focus-visible,
.wpar-confirm__actions button.wpar-button.wpar-button--danger:active {
  background: #b3261e !important;
  background-color: #b3261e !important;
  border-color: #b3261e !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: none !important;
}

.wpar-confirm__actions button.wpar-button.wpar-button--danger:hover,
.wpar-confirm__actions button.wpar-button.wpar-button--danger:focus-visible {
  background: #8f1d18 !important;
  background-color: #8f1d18 !important;
  border-color: #8f1d18 !important;
}

.wpar-notification {
  position: absolute;
  top: 20px;
  right: 20px;
  width: min(380px, calc(100vw - 32px));
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 14px 14px 16px;
  border: 1px solid #dbe1f3;
  border-radius: 14px;
  background: #fff;
  color: #0a0f3d;
  box-shadow: 0 12px 36px rgba(15, 17, 23, .18);
  pointer-events: auto;
  animation: wpar-notification-in 180ms ease-out both;
}

.wpar-notification > div {
  min-width: 0;
  flex: 1;
}

.wpar-notification__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.wpar-notification__message {
  margin: 3px 0 0;
  color: #5a6288;
  font-size: 13px;
  line-height: 1.45;
}

.wpar-notification__close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: -2px -2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5a6288;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.wpar-notification__close:hover {
  background: #eff2fa;
  color: #0a0f3d;
}

.wpar-notification--success { border-color: #b8d9c3; }
.wpar-notification--error { border-color: #e7b8b5; }
.wpar-notification--warning { border-color: #ead6a4; }

.wpar-notification.is-leaving {
  animation: wpar-notification-out 180ms ease-in both;
}

@keyframes wpar-confirm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wpar-confirm-card-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wpar-notification-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wpar-notification-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

@media (max-width: 560px) {
  .wpar-confirm-backdrop { padding: 16px; }
  .wpar-confirm { width: min(100%, 440px); padding: 20px; }
  .wpar-confirm__actions { justify-content: stretch; }
  .wpar-confirm__actions .wpar-button { flex: 1 1 0; }
  .wpar-notification { top: 12px; right: 12px; width: calc(100vw - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .wpar-confirm-backdrop,
  .wpar-confirm,
  .wpar-notification,
  .wpar-notification.is-leaving {
    animation: none;
  }
}
