@import './variables.scss';
@import './transitions.scss';
@import './breakpoints.scss';

* {
  box-sizing: border-box;

  &::-webkit-scrollbar {
    width: 0.5rem;
    background: theme(scrollbar-background);
  }

  &::-webkit-scrollbar-track {
    background: theme(scrollbar-background);
    border-radius: $border-radius;
    border: 1px solid $c-fiord;
  }

  &::-webkit-scrollbar-thumb {
    background-color: theme(scrollbar-thumb-background);
    border-radius: $border-radius;
    max-height: 4.375rem;
  }

  &::-moz-scrollbar-thumb {
    border-radius: 0.625rem;
  }

  scrollbar-width: thin;
  scrollbar-color: theme(scrollbar-thumb-background) theme(scrollbar-background);
}

html {
  min-width: 100%;
  height: 100%;
  font-size: 16px;

  @include rem-scaling;
}

body {
  height: 100%;
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: theme(background-gradient);
  color: theme(text-primary);
}

// Fixes this bug in DEV mode:
// https://stackoverflow.com/questions/70499543/create-react-app-creates-this-iframe-that-prevents-me-from-clicking-or-editing
body > iframe {
  pointer-events: none;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 'Ubuntu Mono';
}

::placeholder {
  color: theme(text-secondary);
  opacity: 1;
}

a {
  text-decoration: none;
  color: #ccc;
  transition: color 0.1s ease-in-out;

  &:hover {
    color: $c-titan-white;
  }
}

button {
  background-color: transparent;
  border: none;
  color: inherit;
  font: inherit;
}

.error {
  color: $danger-color;
  font-weight: 400;
  text-align: center;
}

.validation-error {
  font-weight: 500;
  color: $danger-color;
  text-align: left;

  svg {
    margin-right: 0.3125rem;
  }
}

#root {
  height: 100%;
  position: relative;
}

select {
  border: 0;
  outline: 0;
  color: $c-titan-white;
  padding: 0.9375rem;
  background-color: rgba(0, 0, 0, 0.3);
}

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5625rem;
  padding: 1.875rem;
  padding-top: 1.5625rem;
  background-color: theme(background-terniary);
  box-sizing: border-box;

  .title {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: bold;
  }

  .content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5625rem;
  }
}

.flex-row {
  display: flex;
  flex-direction: row;
}

.align-right {
  margin-left: auto;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 3rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.ms-4 {
  margin-left: 1rem;
}

.notification-hollow {
  border-radius: $border-radius;
  padding: 0.8125rem 0.625rem;
  background: mix($c-turquoise, $c-ebony-clay, 5%);
  border: 1px solid $c-turquoise;
  transition: 0.3s ease-out opacity;

  &.warning {
    background-color: #fef5db;
    border-left: 7px solid #ffbc00;
    color: $c-martinique-light;
  }

  &.success {
    background-color: $c-ebony-clay;
    border-left: 7px solid $c-turquoise;
  }

  &.info {
    background: mix($tertiary-accent-color, $c-ebony-clay, 5%);
    border: 1px solid $tertiary-accent-color;
    color: $tertiary-accent-color;
  }

  &.action {
    cursor: pointer;

    &.warning:hover {
      opacity: 0.8;
    }
  }
}

.notification-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

// Mobile
@include lg-breakpoint {
  .panel {
    gap: 1rem;
    padding: 1.25rem;
    padding-top: 1.25rem;
  }
}
