@charset "UTF-8";

// overrides variables

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

// 1. Sticky footer

html {
  max-width: 100%;
  font-size: 62.5%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  @include text-base;

  background: #fff;
  font-family: $font-family-text;
  color: $color-base;

  @if $enable-mq == false {
    min-width: $width;
  }

  // custom styles for templates

  &[data-background='gradient-dark'] {
    height: 100%;
    background-color: #f2f2f2;

    .app > div > img,
    .app > img {
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
      width: 100%;
      height: 60rem;
      vertical-align: top;
      object-fit: cover;

      @include mq(sm) {
        @include mq-custom(max, 440px) {
          top: -7rem;
        }

        @include mq-custom(max, 380px) {
          top: -5rem;
        }
      }

      @include mq(sx) {
        height: 70rem;
      }

      @include mq(md) {
        height: auto;
      }
    }

    .site-header {
      z-index: 101;
    }

    > .app > main {
      z-index: 100; // for tooltips
    }
  }

  &[data-color-type='gazprombank-blue'] {
    height: 100%;

    &::before {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      content: '';
    }

    .site-header {
      z-index: 101;
    }

    .app > div > main,
    .app > main,
    .app > div[data-app-page-name] > main {
      z-index: 100; // for tooltips
      padding-top: map_get($mq-container-indents, 'sx') * 0.25;

      @include mq(sx) {
        padding-top: map_get($mq-container-indents, 'sx') * 0.5;
      }
    }
  }

  &[data-background='gradient-medium-dark'] {
    background: #f3f3f3;

    &::before {
      position: absolute;
      top: -10rem;
      right: 0;
      left: 0;
      height: 62.4rem;
      background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
      content: '';
    }
  }

  &[data-background='promo'] {
    background-color: #f2f2f2;

    .site-header {
      background: transparent;
    }
  }

  &[data-background='lightest-secondary'] {
    background: $color-lightest-secondary;

    .site-header {
      background: #fff;
    }
  }

  &[data-background='new-loyalty-program'] {
    background: $brand-steelblue-light;
  }

  .app {
    display: flex; // 1
    flex-direction: column; // 1
    max-width: 100vw;
    min-height: 100vh;
    width: 100%;
    height: auto;
    opacity: 1 !important;

    @include mq-custom(max, 768px) {
      padding-top: env(safe-area-inset-right);
      padding-right: env(safe-area-inset-right);
      padding-left: env(safe-area-inset-left);
    }

    &--hidden {
      @include mq(sm) {
        overflow: hidden; // for model
      }
    }
  }
}

main,
.main {
  // 1
  position: relative; // for tooltips
  z-index: 100; // for tooltips
  min-height: 400px;
  flex: 1;

  > .section {
    max-width: 100vw;

    &--grey {
      background-color: $color-lightest-secondary;
    }
  }

  &[data-layout='brand'] {
    //z-index: 56 !important; // for tooltips
  }

  &.on-top {
    position: relative;
    z-index: 9999 !important; // helper fo popup in mobile
  }
}

a::-moz-focus-inner,
button::-moz-focus-inner {
  border: 0;
  outline: none;

  &:active,
  &:focus,
  &:-moz-focusring {
    border: 0;
    outline: none;
  }
}

a {
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: outline 0ms;
  color: inherit;

  &:not([class]) {
    @include interact(text-decoration, underline);
  }

  &:focus {
    outline: none;
    text-decoration: underline;
  }

  &:active {
    outline: 0;
    text-decoration: inherit;
  }
}

button {
  cursor: pointer;
}

button,
input,
select,
textarea {
  @include text-base;

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  background: none;
  color: inherit;
  font-family: inherit;
}

fieldset {
  margin: 0;
  padding: 0;
  border: none;
}

select {
  border-radius: 0;

  &::-ms-expand {
    // IE11
    display: none;
  }
}

textarea {
  resize: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

hr {
  height: 1px;
  border: none;
  background: $color-lightest;
}

iframe {
  border: none;
}

img {
  max-width: 100%;

  &[width],
  &[height] {
    max-width: none;
  }
}

figure {
  margin: 0;
}

ol,
ul {
  list-style: none;
}

small {
  @include text-minimal();
}

svg {
  vertical-align: top;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

:disabled {
  cursor: not-allowed;
}

a,
button,
input {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

/* Chrome, Safari, Edge, Opera */

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */

input[type='number'] {
  -moz-appearance: textfield;
}
