/* NexoVirt core on themed portal pages. A theme restyles these through the variables or the classes. */
:root {
  --nx-core-bg: #ffffff;
  --nx-core-fg: #18181b;
  --nx-core-accent: #206bc4;
  --nx-core-danger: #d63939;
  --nx-core-success: #2fb344;
  --nx-core-warning: #f59f00;
  /* The provider's accent colour; NexoVirt overrides these in a <style id="nx-brand"> block when one is set. */
  --nx-brand: #2563eb;
  --nx-brand-contrast: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --nx-brand: #3b82f6;
  }
}

.nx-toasts {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 22rem;
}

.nx-toast {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--nx-core-bg);
  color: var(--nx-core-fg);
  border-left: 4px solid var(--nx-core-accent);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  font: 14px/1.4 system-ui, sans-serif;
}
.nx-toast span { flex: 1; }
.nx-toast-success { border-left-color: var(--nx-core-success); }
.nx-toast-warning { border-left-color: var(--nx-core-warning); }
.nx-toast-error { border-left-color: var(--nx-core-danger); }
.nx-toast-close {
  background: none;
  border: 0;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.nx-dialog {
  max-width: 28rem;
  width: calc(100% - 2rem);
  padding: 1.25rem;
  background: var(--nx-core-bg);
  color: var(--nx-core-fg);
  border: 0;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
  font: 14px/1.5 system-ui, sans-serif;
}
.nx-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.nx-dialog p { margin: 0 0 1rem; }
.nx-dialog-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1rem;
  padding: .5rem;
  font: inherit;
}
.nx-dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.nx-dialog-actions button { padding: .4rem .9rem; font: inherit; cursor: pointer; }
.nx-dialog-ok { background: var(--nx-core-accent); color: #fff; border: 0; border-radius: 4px; }
.nx-dialog-danger .nx-dialog-ok { background: var(--nx-core-danger); }

.nx-theme-banner,
.nx-return-admin {
  position: fixed;
  left: 1rem;
  z-index: 2147483000;
  margin: 0;
  padding: .5rem .75rem;
  background: var(--nx-core-warning);
  color: #000;
  border-radius: 4px;
  font: 13px/1.4 system-ui, sans-serif;
}
.nx-theme-banner { bottom: 1rem; }
.nx-return-admin { bottom: 3.5rem; padding: 0; }
.nx-return-admin button {
  padding: .5rem .75rem;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
