@use 'sass:color';
@use '../variables.scss' as *;

.notification {
  margin: 0 0 8px;
  width: 350px;
  box-shadow: 0 -1px 24px 4px #222;

  @include phone-portrait {
    width: 100%;
  }
}

.inner {
  color: var(--theme-text);
  box-sizing: border-box;
  border-top: 4px solid black;
  pointer-events: all;
  user-select: none;

  transition: transform 150ms ease-in-out;

  @include interactive($hover: true) {
    transform: scale(1.02);
  }
}

.contents {
  display: flex;
  flex-direction: row;
  padding: 8px;
}

.icon {
  flex-shrink: 0;
  margin-right: 8px;
}
.trailer {
  margin-left: 8px;
  flex-shrink: 0;
  display: flex;
}

.timer {
  height: 1px;
  background-color: rgb(255, 255, 255, 0.5);
}

.details {
  flex: 1;
  display: flex;
  flex-direction: column;
  > div {
    white-space: pre-wrap;
  }
}

.title {
  font-weight: bold;
  margin-bottom: 4px;
}

.info,
.progress {
  border-top-color: #2f96b4;
  background-color: color.scale(#2f96b4, $lightness: -90%);
}

.error {
  border-top-color: $red;
  background-color: color.scale($red, $lightness: -90%);
}

.warning {
  border-top-color: #f89406;
  background-color: color.scale(#f89406, $lightness: -90%);
}

.success {
  border-top-color: $green;
  background-color: color.scale($green, $lightness: -90%);
}
