@import "../shared/styles/variables";

body {
  padding: 0;
  margin: 0;
  height: 100%;
  font-size: 14px;
  line-height: 16px;
  font-family: $font-family-sans-serif;

  @include themify($themes) {
    color: themed("textColor");
    background-color: themed("backgroundColor");
  }
}

.outer-wrapper {
  padding: 0 10px;
  border-bottom: 2px solid transparent;
  display: grid;
  grid-template-columns: 24px auto 55px;
  grid-column-gap: 10px;
  box-sizing: border-box;
  min-height: 42px;

  @include themify($themes) {
    border-bottom-color: themed("primaryColor");
  }

  &.success-event {
    @include themify($themes) {
      border-bottom-color: themed("successColor");
    }
  }

  &.error-event {
    @include themify($themes) {
      border-bottom-color: themed("errorColor");
    }
  }
}

.inner-wrapper {
  display: grid;
  grid-template-columns: auto max-content;
}

.outer-wrapper > *,
.inner-wrapper > * {
  align-self: center;
}

img {
  border: 0;
  margin: 0;
  padding: 0;
}

#logo {
  width: 24px;
  height: 24px;
  display: block;
}

#close-button {
  margin-right: 10px;
}

#close {
  display: block;
  width: 16px;
  height: 16px;

  > path {
    @include themify($themes) {
      fill: themed("textColor");
    }
  }
}

#close-button:hover {
  @include themify($themes) {
    border-color: rgba(themed("textColor"), 0.2);
    background-color: rgba(themed("textColor"), 0.2);
  }
}

button {
  padding: 0.35rem 15px;
  border-radius: $border-radius;
  border: 1px solid transparent;
  cursor: pointer;
}

button.primary:not(.neutral) {
  @include themify($themes) {
    background-color: themed("primaryColor");
    color: themed("textContrast");
    border-color: themed("primaryColor");
  }

  &:hover {
    @include themify($themes) {
      background-color: darken(themed("primaryColor"), 1.5%);
      color: darken(themed("textContrast"), 6%);
    }
  }
}

button.secondary:not(.neutral) {
  @include themify($themes) {
    background-color: themed("backgroundColor");
    color: themed("mutedTextColor");
    border-color: themed("mutedTextColor");
  }

  &:hover {
    @include themify($themes) {
      background-color: themed("backgroundOffsetColor");
      color: darken(themed("mutedTextColor"), 6%);
    }
  }
}

button.link,
button.neutral {
  @include themify($themes) {
    background-color: transparent;
    color: themed("primaryColor");
  }

  &:hover {
    text-decoration: underline;

    @include themify($themes) {
      background-color: transparent;
      color: darken(themed("primaryColor"), 6%);
    }
  }
}

select {
  padding: 0.35rem;
  border: 1px solid #000000;
  border-radius: $border-radius;

  @include themify($themes) {
    color: themed("textColor");
    background-color: themed("inputBackgroundColor");
    border-color: themed("inputBorderColor");
  }
}

select,
button {
  font-size: $font-size-base;
  font-family: $font-family-sans-serif;
}

.success-message {
  display: flex;
  align-items: center;
  align-content: center;
  justify-content: center;

  @include themify($themes) {
    color: themed("successColor");
  }

  svg {
    margin-right: 8px;

    path {
      @include themify($themes) {
        fill: themed("successColor");
      }
    }
  }
}

.error-message {
  @include themify($themes) {
    color: themed("errorColor");
  }
}

@media screen and (max-width: 768px) {
  #select-folder {
    display: none;
  }
}

@media print {
  body {
    display: none;
  }
}

.notification-bar-redesign {
  button {
    padding: 4px 8px;
  }

  select {
    padding: 4px 6px;
  }

  .outer-wrapper {
    display: block;
    position: relative;
    padding: 8px;
    border-top: 1px solid transparent;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    border-radius: 4px;

    @include themify($themes) {
      border-top-color: themed("borderColor");
      border-left-color: themed("borderColor");
      border-right-color: themed("borderColor");
    }
  }

  .logo {
    position: absolute;
    top: 8px;
    left: 10px;
    overflow: hidden;
  }

  .notification-close {
    position: absolute;
    top: 6px;
    right: 6px;

    #close-button {
      display: flex;
      align-content: center;
      align-items: center;
      justify-content: center;
      width: 30px;
      height: 30px;
      padding: 0;
      margin: 0;
    }
  }

  #content .inner-wrapper {
    display: flex;
    align-items: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;

    .notification-body {
      width: 100%;
      padding: 4px 38px 24px 42px;
      font-weight: 400;
    }
    .notification-actions {
      display: flex;
      align-items: stretch;
      align-content: stretch;
      justify-content: flex-end;
      width: 100%;

      #never-save {
        margin-right: auto;
        padding: 0;
        font-size: 16px;
        font-weight: 500;
        letter-spacing: 0.5px;
      }

      #select-folder {
        width: 125px;
        margin-right: 6px;
        font-size: 12px;
        appearance: none;
        background-size: 16px;
        background-position: center right 4px;
        background-repeat: no-repeat;

        @include themify($themes) {
          color: themed("mutedTextColor");
          border-color: themed("mutedTextColor");
        }

        &:not([disabled]) {
          display: block;
        }
      }

      .primary,
      .secondary {
        font-size: 12px;
      }

      .secondary {
        margin-right: 6px;
        border-width: 1px;
      }

      .primary {
        margin-right: 2px;
      }

      &.success-message,
      &.error-message {
        padding: 4px 36px 6px 42px;
      }
    }
  }

  .success-event,
  .error-event {
    .notification-body {
      display: none;
    }
  }
}

.theme_light {
  .notification-bar-redesign #content .inner-wrapper {
    #select-folder {
      background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHhtbG5zOnhsaW5rPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rJyB3aWR0aD0nMTYnIGhlaWdodD0nMTYnIGZpbGw9J25vbmUnPjxwYXRoIHN0cm9rZT0nIzIxMjUyOScgZD0nbTUgNiAzIDMgMy0zJy8+PC9zdmc+");
    }
  }
}

.theme_dark {
  .notification-bar-redesign #content .inner-wrapper {
    #select-folder {
      background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxNicgaGVpZ2h0PScxNicgZmlsbD0nbm9uZSc+PHBhdGggc3Ryb2tlPScjZmZmZmZmJyBkPSdtNSA2IDMgMyAzLTMnLz48L3N2Zz4=");
    }
  }
}

.theme_solarizedDark {
  .notification-bar-redesign #content .inner-wrapper {
    #select-folder {
      background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxNicgaGVpZ2h0PScxNicgZmlsbD0nbm9uZSc+PHBhdGggc3Ryb2tlPScjZWVlOGQ1JyBkPSdtNSA2IDMgMyAzLTMnLz48L3N2Zz4=");
    }
  }
}

.theme_nord {
  .notification-bar-redesign #content .inner-wrapper {
    #select-folder {
      background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxNicgaGVpZ2h0PScxNicgZmlsbD0nbm9uZSc+PHBhdGggc3Ryb2tlPScjRTVFOUYwJyBkPSdtNSA2IDMgMyAzLTMnLz48L3N2Zz4=");
    }
  }
}
