/**
 * @license
 * Scale https://github.com/telekom/scale
 *
 * Copyright (c) 2021 Egor Kirpichev and contributors, Deutsche Telekom AG
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

:host {
  --width: 100%;
  --radius: var(--scl-radius-8);

  /* Token not available, up for discussion */
  --background-error: hsla(353.79999999999995, 100%, 88.6%, 0.35);
  --background-warning: hsla(33.5, 100%, 75.1%, 0.3);
  --background-informational: hsla(190.20000000000005, 100%, 92%, 0.75);
  --background-success: hsl(98.80000000000001, 49.7%, 61%, 0.2);
}

.notification-banner {
  border-radius: var(--radius);
  width: var(--width);
  position: relative;
  box-shadow: var(--scl-shadow-level-1);
  min-height: 48px;
}

.notification-banner--variant-error {
  background-color: var(--background-error);
}
.notification-banner--variant-warning {
  background-color: var(--background-warning);
}
.notification-banner--variant-informational {
  background-color: var(--background-informational);
}
.notification-banner--variant-success {
  background-color: var(--background-success);
}

.notification-banner__heading {
  margin: 14px 48px 14px 48px;
  font-weight: var(--scl-font-weight-bold);
  line-height: 48px;
}

.notification-banner__text ::slotted(*) {
  margin: -10px 0px -25px 0px;
  line-height: 16px;
  padding-bottom: 15px;
}

.notification-banner--has-no-text .notification-banner__link ::slotted(*) {
  margin: 0;
  padding: 0px 0px 0px 16px;
}

.notification-banner--has-text .notification-banner__link ::slotted(*) {
  margin: 20px 0 0 0;
  padding-bottom: 15px;
  line-height: 20px;
}

::slotted(*) {
  font-weight: var(--scl-font-weight-regular);
}

.notification-banner__button-close {
  position: absolute;
  top: 8px;
  right: 13.5px;
  color: #191919;
  border: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
  background: transparent;
}

.notification-banner__button-close svg {
  height: 19px;
  width: 19px;
  padding: 6.5px;
  border-radius: 20%;
}

.notification-banner__button-close:hover svg {
  background-color: white;
  color: var(--scl-color-primary-hover);
}

.notification-banner__icon-success {
  position: absolute;
  top: 12.5px;
  left: 17px;
  height: 20px;
  width: 20px;
  color: var(--scl-color-background-success);
}

.notification-banner__icon-error {
  position: absolute;
  top: 12px;
  left: 17px;
  height: 20px;
  width: 20px;
  color: var(--scl-color-background-error);
}

.notification-banner__icon-information {
  position: absolute;
  top: 12px;
  left: 17px;
  height: 20px;
  width: 20px;
  color: var(--scl-color-text-info);
}

@media screen and (forced-colors: active), (-ms-high-contrast: active) {
  .notification-banner__icon-close {
    color: white;
  }
}
