/* NCR shell only. Message/editor styles and print output remain owned by Elastic. */
:root {
  --ncr-bg: #08080b;
  --ncr-surface: #111116;
  --ncr-raised: #17171d;
  --ncr-line: #292932;
  --ncr-text: #f7f7f8;
  --ncr-muted: #9a9aa6;
  --ncr-pink: #ff007a;
  --ncr-purple: #a900e4;
  --ncr-accent-text: #ff75b8;
  --ncr-selected: #301329;
}

html.dark-mode {
  color-scheme: dark;
  scrollbar-color: #454550 var(--ncr-bg);
}

html.dark-mode body {
  background: var(--ncr-bg);
  color: var(--ncr-text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

html.dark-mode #layout-menu,
html.dark-mode #layout-sidebar,
html.dark-mode #layout-list,
html.dark-mode #layout-content {
  background: var(--ncr-surface);
  border-color: var(--ncr-line);
}

html.dark-mode #layout-menu {
  background: #0d0d12;
}
html.dark-mode #layout-menu .special-buttons a:not(:focus) {
  background: #0d0d12;
}
html.dark-mode #logo {
  opacity: 1;
  height: auto;
}
html.dark-mode #layout-menu #logo {
  max-width: 76px;
  max-height: 28px;
}
.ncr-sidebar-brand {
  display: inline-flex;
}

html.dark-mode #taskmenu a.ncr-admin {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

html.dark-mode #taskmenu a.ncr-admin svg {
  fill: currentColor;
  height: 1.75rem;
  margin-bottom: 0.25rem;
  width: 1.75rem;
}

html.dark-mode #taskmenu a.ncr-admin .inner::before {
  content: none;
}

html.dark-mode #layout > div > .header,
html.dark-mode #layout > div > .footer,
html.dark-mode .searchbar,
html.dark-mode .listing li,
html.dark-mode .listing tbody td,
html.dark-mode .listing li ul {
  border-color: var(--ncr-line);
}

html.dark-mode #layout > div > .header {
  background: var(--ncr-raised);
}
html.dark-mode #layout > div > .header .header-title {
  font-weight: 800;
  letter-spacing: -0.025em;
}

html.dark-mode #taskmenu a,
html.dark-mode .menu.toolbar a {
  color: #b8b8c3;
}
html.dark-mode #taskmenu a {
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
html.dark-mode #taskmenu a.selected,
html.dark-mode #taskmenu a:hover,
html.dark-mode .listing li.selected,
html.dark-mode .listing li.selected > a,
html.dark-mode .listing tr.selected td,
html.dark-mode .menu a:not(.disabled):hover,
html.dark-mode .menu a:not(.disabled):focus {
  background: var(--ncr-selected);
  color: var(--ncr-accent-text);
}

html.dark-mode #taskmenu .action-buttons a.compose,
html.dark-mode .floating-action-buttons a.button,
html.dark-mode .btn-primary {
  background: linear-gradient(110deg, #d50065, #9400c8);
  border-color: transparent;
  color: #fff;
  font-weight: 750;
}

html.dark-mode .btn {
  border-radius: 999px;
}
html.dark-mode .btn-primary:hover:not(:disabled),
html.dark-mode .floating-action-buttons a.button:hover,
html.dark-mode #taskmenu .action-buttons a.compose:hover {
  background: linear-gradient(110deg, #ba0059, #8100b0);
  color: #fff;
}

html.dark-mode .btn-secondary {
  background: var(--ncr-raised);
  border-color: #454550;
  color: var(--ncr-text);
}

html.dark-mode .form-control,
html.dark-mode .custom-select,
html.dark-mode .input-group-text {
  background-color: var(--ncr-bg);
  border-color: #454550;
  color: var(--ncr-text);
}

html.dark-mode .form-control::placeholder {
  color: var(--ncr-muted);
  opacity: 1;
}
html.dark-mode .recipient-input,
html.dark-mode .html-editor .editor-toolbar {
  background-color: var(--ncr-raised);
  border-color: #454550;
  color: var(--ncr-text);
}

html.dark-mode .custom-control-input:checked ~ .custom-control-label::before {
  background-color: #d50065;
  border-color: #d50065;
}

html.dark-mode .form-control:focus,
html.dark-mode .custom-select:focus {
  background-color: var(--ncr-bg);
  border-color: var(--ncr-accent-text);
  color: var(--ncr-text);
  box-shadow: 0 0 0 3px rgb(255 0 122 / 16%);
}

html.dark-mode :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--ncr-accent-text);
  outline-offset: 3px;
}

html.dark-mode .folderlist li.mailbox .unreadcount {
  background: var(--ncr-selected);
  color: var(--ncr-accent-text);
}

html.dark-mode .messagelist tr.unread:not(.deleted) td.subject span.subject a {
  color: var(--ncr-text);
  font-weight: 800;
}

html.dark-mode .messagelist tr:not(.flagged):not(.deleted) td.subject :is(.date, .fromto, .size) {
  color: #b0b0bc;
}

html.dark-mode .popover,
html.dark-mode .popover-header,
html.dark-mode .ui-dialog,
html.dark-mode .ui-dialog .ui-dialog-titlebar,
html.dark-mode .ui-dialog .ui-dialog-buttonpane {
  background: var(--ncr-raised);
  border-color: var(--ncr-line);
  color: var(--ncr-text);
}

html.dark-mode .ui-dialog {
  border-radius: 16px;
}
html.dark-mode #messagestack .alert {
  color: var(--ncr-text);
}
html.dark-mode #messagestack .alert-info {
  background: #2d2144;
}
html.dark-mode #messagestack .alert-danger {
  background: #4b1929;
}
html.dark-mode #messagestack .alert-warning {
  background: #493619;
}
html.dark-mode #messagestack .alert-success {
  background: #173b2c;
}
html.dark-mode .nav-tabs {
  border-color: var(--ncr-line);
}
html.dark-mode .nav-tabs .nav-link.active {
  background: var(--ncr-selected);
  border-color: var(--ncr-line);
  color: var(--ncr-accent-text);
}

/* Login uses the same contained card, wordmark and typography as the NCR portal. */
html.dark-mode body.task-login #layout-content {
  background:
    radial-gradient(ellipse at 50% 0, rgb(169 0 228 / 15%), transparent 55%), var(--ncr-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  overflow-y: auto;
}

.ncr-login-card {
  background: var(--ncr-surface);
  border: 1px solid var(--ncr-line);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgb(0 0 0 / 40%);
  flex: 0 1 440px;
  margin: auto;
  max-width: 440px;
  padding: 40px;
  text-align: center;
  width: 100%;
}

.ncr-brand {
  display: inline-flex;
  max-width: 100%;
}
html.dark-mode body.task-login #logo {
  position: static;
  inset: auto;
  transform: none;
  width: 220px;
  max-width: 100%;
  max-height: none;
  padding: 0;
  margin: 0 0 34px;
}

.ncr-eyebrow {
  color: #db50cf;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.18em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.ncr-login-card h1 {
  color: var(--ncr-text);
  font-size: 34px;
  font-style: italic;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0;
  text-transform: uppercase;
}

.ncr-intro {
  color: var(--ncr-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 16px 0 26px;
}
html.dark-mode body.task-login #login-form {
  position: static;
  inset: auto;
  transform: none;
  max-width: none;
  width: 100%;
  margin: 0;
}
html.dark-mode body.task-login #login-form .form-control {
  min-height: 46px;
}
html.dark-mode body.task-login #login-form .input-group-text {
  color: var(--ncr-muted);
}
html.dark-mode body.task-login #login-form .btn {
  min-height: 46px;
}
html.dark-mode body.task-login #login-footer {
  color: var(--ncr-muted);
  font-size: 11px;
  line-height: 1.6;
  margin-top: 24px;
}
.ncr-login-note {
  display: block;
}
.ncr-return {
  display: inline-block;
  color: #c4c4cf;
  font-size: 12px;
  margin-top: 24px;
  text-underline-offset: 4px;
}
.ncr-return:hover {
  color: var(--ncr-accent-text);
}

@media screen and (min-width: 1025px) {
  html.dark-mode #layout-menu {
    flex: 0 0 100px;
    width: 100px;
  }
  html.dark-mode #layout-menu .special-buttons {
    width: 100%;
  }
  html.dark-mode #taskmenu a {
    border-radius: 10px;
    margin: 4px 6px;
    width: calc(100% - 12px);
  }
  html.dark-mode #taskmenu a .inner {
    font-size: 12px;
  }
}

@media screen and (max-width: 480px) {
  html.dark-mode body.task-login #layout-content {
    padding: 20px 12px;
  }
  .ncr-login-card {
    padding: 30px 22px;
  }
  .ncr-login-card h1 {
    font-size: 30px;
  }
  html.dark-mode #layout-menu {
    background: var(--ncr-surface);
  }
  html.dark-mode #taskmenu a.ncr-admin {
    flex-direction: row;
    justify-content: flex-start;
  }
  html.dark-mode #taskmenu a.ncr-admin svg {
    height: 1.2em;
    margin: 0 0.5rem 0 0;
    width: 1.2em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.dark-mode #taskmenu a {
    transition: none;
  }
}
