/**
 * Bootstrap 4 toasts for Drupal status messages, in the theme's colours.
 *
 * The toast itself is Bootstrap's default .toast design (main.css); this file
 * only positions the stack and applies the theme colours.
 */

/* Stack in the top-right corner. Fixed, so it does not matter where a page
   template prints {{ page.status_messages }}. */
[data-drupal-messages] {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1090;
  width: 350px;
  max-width: calc(100vw - 2rem);
  margin: 0;
  pointer-events: none;
}

.eppeso-toast {
  --toast-accent: var(--desktop-link, #d4b139);

  pointer-events: auto;
  background-color: #ffffff;
  color: var(--desktop-text, #2f3756);
}

.eppeso-toast--warning {
  --toast-accent: var(--warning, #ffc107);
}

.eppeso-toast--error {
  --toast-accent: var(--danger, #dc3545);
}

.eppeso-toast .toast-header {
  background-color: #ffffff;
  color: var(--desktop-headings, #2f3756);
}

/* Small coloured square, as in Bootstrap's toast example. */
.eppeso-toast__marker {
  display: inline-block;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  background-color: var(--toast-accent);
}

.eppeso-toast .toast-body a {
  color: var(--desktop-link, #d4b139);
  font-weight: 600;
  text-decoration: underline;
}

.eppeso-toast .toast-body a:hover,
.eppeso-toast .toast-body a:focus {
  color: var(--desktop-link-hover, #2f3755);
}

.eppeso-toast .toast-body ul {
  margin: 0;
  padding-left: 1.1rem;
}

@media (max-width: 575.98px) {
  [data-drupal-messages] {
    right: 1rem;
    left: 1rem;
    width: auto;
    max-width: none;
  }

  .eppeso-toast {
    max-width: none;
  }
}
