/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 2;

  display: flex;
  flex-direction: row;

  --vertical-padding: 12px;

  max-height: calc(80px - 2 * var(--vertical-padding));
  box-shadow: 0px 12px 18px -6px rgba(0, 0, 0, 0.3);
  background-color: white;

  padding: var(--vertical-padding) 128px;

  /* Tablet */
  @media only screen and (min-width: 704px) and (max-width: 1183px) {
    padding: var(--vertical-padding) 32px;
  }

  /* Mobile */
  @media only screen and (max-width: 703px) {
    --vertical-padding-mobile: 4px;

    max-height: calc(58px - 2 * var(--vertical-padding-mobile));
    padding: var(--vertical-padding-mobile) 32px;
  }
}

.header__link {
  text-decoration: none;

  width: -webkit-fill-available;
  width: -moz-available;
}

.header__img {
  object-fit: cover;
  height: 100%;
  width: auto;
}

/* MAIN */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 64px;

  /* Mobile */
  @media only screen and (max-width: 703px) {
    gap: 32px;
  }

  padding: 64px 0;
}

/* STEPPER */
.stepper {
  display: flex;
  flex-direction: column;
  gap: 8px;

  width: 80vw;
}

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

.stepper__step {
  display: flex;
  flex-direction: column;
  gap: 16px;

  flex: 1;
}

.step__header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;

  i {
    width: var(--icon-medium);
    height: var(--icon-medium);
    font-size: var(--icon-medium);
  }

  /* Mobile */
  @media only screen and (max-width: 703px) {
    display: none;
  }
}

.stepper__header--mobile {
  display: none;

  /* Mobile */
  @media only screen and (max-width: 703px) {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }
}

.step__label {
  font-family: var(--font-family-bold);
  font-size: var(--cta-font-size);
  line-height: var(--cta-line-height);
  color: var(--color-secondary);
}

.step__progress {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.step__dot {
  border-radius: 50%;
  background-color: var(--color-secondary6);

  width: 24px;
  height: 24px;

  /* Mobile */
  @media only screen and (max-width: 703px) {
    display: none;
  }
}

.stepper__step.current-step .step__dot {
  border: 2px solid var(--color-primary);
  background-color: white;
}

.stepper__step.past-step .step__dot {
  background-color: var(--color-primary);
}

.step__line {
  background-color: var(--color-secondary6);

  width: 100%;
  height: 4px;
}

.progress__line {
  width: 0;
  transition: width 1.5s ease;
}

.stepper__step.current-step .progress__line {
  background-color: var(--color-primary);

  width: 50%;
  height: 4px;

  /* Mobile */
  @media only screen and (max-width: 703px) {
    width: 0;
  }
}

.stepper__step.past-step .progress__line {
  background-color: var(--color-primary);

  width: 100%;
  height: 4px;
}

/* FIRST STEP */
.first-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;

  width: 100%;
}

.form__section-title {
  font-family: var(--font-family-bold);
  font-size: var(--titles8-font-size);
  line-height: var(--titles8-line-height);
  color: var(--color-secondary);

  /* Mobile */
  @media only screen and (max-width: 703px) {
    font-size: var(--titles9-font-size);
    line-height: var(--titles9-line-height);
  }
}

.input-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 300px);
  gap: 24px 32px;

  /* Mobile */
  @media only screen and (max-width: 703px) {
    display: flex;
    flex-direction: column;
    gap: 24px;

    width: 80%;
  }
}

/* SECOND STEP */
.second-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 56px;
  gap: 32px;
  background: var(--color-secondary5-deprecated);
  border-radius: 8px;
  box-sizing: border-box;
  width: 100%;
  height: fit-content;

  max-width: 60dvw;

  /* Mobile */
  @media only screen and (max-width: 703px) {
    padding: 24px;

    max-width: 90%;
  }
}

.summary__section {
  display: flex;
  flex-direction: column;
  padding: 0px;
  width: 100%;
  height: fit-content;
}

.summary__original-price {
  align-self: center;
  text-decoration: line-through;

  font-family: var(--font-family-medium);
  font-size: var(--titles8-font-size);
  line-height: var(--titles8-line-height);
  color: var(--color-secondary);
}

.summary__final-price {
  align-self: center;

  font-family: var(--font-family-medium);
  font-size: var(--titles7-font-size);
  line-height: var(--titles7-line-height);
  color: var(--color-secondary);
}

.summary__button {
  width: 100%;
}

.section__header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;

  i {
    width: var(--icon-small);
    height: var(--icon-small);
    font-size: var(--icon-small);

    color: var(--color-secondary);

    cursor: pointer;
  }
}

.section__title {
  font-family: var(--font-family-medium);
  font-size: var(--titles9-font-size);
  line-height: var(--titles9-line-height);
  color: var(--color-secondary);
}

.section__fields {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: fit-content;
  max-height: 0;
  overflow: hidden;
  box-sizing: border-box;

  transition: all 0.5s ease-in-out;
}

.section__fields.displayed {
  max-height: 500px;
  padding-top: 24px;
}

.section__field {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 16px 0px;
  gap: 24px 8px;
  width: 100%;
  height: fit-content;
  border-bottom: 1px solid var(--color-secondary4-deprecated);
}

.field__key {
  font-family: var(--font-family-medium);
  font-size: var(--accelerators-tables-font-size);
  line-height: var(--accelerators-tables-line-height);
  color: var(--color-secondary2);
}

.field__value {
  font-family: var(--font-family-bold);
  font-size: var(--cta-font-size);
  line-height: var(--cta-line-height);
  color: var(--color-secondary);
}

/* TEXT FIELD */
.text-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  height: 100%;
}

.text-field__label {
  font-family: var(--font-family);
  font-size: var(--text-captionM-font-size);
  line-height: var(--text-captionM-line-height);
  color: var(--color-secondary2);
}

.text-field__input {
  padding: 8px;
  box-sizing: border-box;
  width: 100%;
  resize: none;
  background: white;
  border: 1px solid var(--color-grey2);
  border-radius: 2px;
  font-family: var(--font-family);
  font-size: var(--cta-font-size);
  line-height: var(--cta-line-height);
  color: var(--color-secondary2);
}

.text-field.error .text-field__input {
  background-color: var(--color-state-error-background);
}

.text-field__input::placeholder {
  color: var(--color-secondary3);
}

.text-field__input:hover {
  border-color: var(--color-grey3);
}

.text-field__input:focus-visible {
  border-color: var(--color-secondary3);
}

.text-field__helper-text {
  font-family: var(--font-family);
  font-size: var(--text-captionS-font-size);
  line-height: var(--text-captionS-line-height);
  color: var(--color-secondary2);

  text-wrap: wrap;
}

.text-field.error .text-field__helper-text {
  color: var(--color-state-error);
}

/* PHONE TEXT FIELD */
.phone-text-field__inputs {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.text-field__input.phone-text-field__input {
  width: 56px;
}

/* DROPDOWN */
.text-field.dropdown .dropdown__wrapper {
  position: relative;

  display: flex;
  flex-direction: column;

  i {
    position: absolute;
    top: 8px;
    right: 8px;

    width: var(--icon-small);
    height: var(--icon-small);
    font-size: var(--icon-small);
    color: var(--color-secondary2);

    cursor: pointer;
  }
}

.text-field:not(.dropdown) i {
  display: none;
}

.text-field.dropdown.displayed .dropdown__wrapper .text-field__input {
  border-color: var(--color-secondary3) !important;
}

.text-field.dropdown .dropdown__wrapper .text-field__input {
  cursor: default;

  padding-right: 32px;
  caret-color: transparent;
}

.text-field.dropdown .dropdown__wrapper:hover .text-field__input {
  border-color: var(--color-grey3);
}

.text-field .dropdown__options {
  display: none;
}

.text-field.dropdown.displayed .dropdown__options {
  position: absolute;
  top: calc(2 * 8px + var(--icon-small));
  z-index: 2;

  display: flex;
  flex-direction: column;

  background-color: white;
  width: -webkit-fill-available;
  width: -moz-available;
  max-height: 200px;
  overflow-y: overlay;

  border-radius: 0 0 4px 4px;
  border-left: 1px solid var(--color-secondary3);
  border-right: 1px solid var(--color-secondary3);
  border-bottom: 1px solid var(--color-secondary3);
}

.text-field.dropdown .dropdown__option {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;

  padding: 0 16px;
  font-family: var(--font-family);
  font-size: var(--cta-font-size);
  line-height: var(--cta-line-height);
  color: var(--color-secondary2);

  cursor: pointer;
}

.text-field.dropdown .dropdown__option:hover, .text-field.dropdown .dropdown__option:focus {
  background-color: var(--color-secondary4-deprecated);
}

.text-field.dropdown .dropdown__option.selected {
  color: white;
  background-color: var(--color-secondary2);
}

/* BUTTON */
.button {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4px;

  height: 56px;
  min-width: 150px;
  padding: 16px;

  border: none;
  border-radius: 8px;
  cursor: pointer;

  background-color: var(--color-primary);
  color: white;

  i {
    width: var(--icon-small);
    height: var(--icon-small);
    font-size: var(--icon-small);
    color: inherit;
  }
}

.button:hover {
  background-color: var(--color-primary3);
}

.button:active {
  background-color: var(--color-primary2);
}

.button__label {
  font-family: var(--font-family-bold);
  font-size: var(--cta-font-size);
  line-height: var(--cta-line-height);
  color: inherit;
  order: 0;
  width: max-content;
}

.button.disabled {
  background-color: var(--color-secondary4-deprecated);
  color: var(--color-secondary2);

  cursor: auto;
}

.button.loading {
  .button__label, i {
    display: none;
  }
}

/* NOTIFICATION */
.notification {
  position: fixed;
  top: 16px;
  z-index: 3;

  animation-duration: 1s;
  animation-name: slidein;

  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;

  width: 40%;

  padding: 16px;
  border-radius: 6px;
  box-shadow: var(--shadow3);

  /* Tablet */
  @media only screen and (min-width: 704px) and (max-width: 1183px) {
    width: 60%;
  }

  /* Mobile */
  @media only screen and (max-width: 703px) {
    width: 80%;
  }
}

@keyframes slidein {
  from {
    translate: 0 -150vh;
    scale: 200% 1;
  }

  to {
    translate: 0 0;
    scale: 100% 1;
  }
}

.notification.success {
  background-color: var(--color-state-success-background);
  border: 1px solid var(--color-state-success);

  .notification__status-icon {
    color: var(--color-state-success);
  }
}

.notification.error {
  background-color: var(--color-state-error-background);
  border: 1px solid var(--color-state-error);

  .notification__status-icon {
    color: var(--color-state-error);
  }
}

.notification__status-icon {
  width: var(--icon-medium);
  height: var(--icon-medium);
  font-size: var(--icon-medium);
}

.notification__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.notification__title {
  font-family: var(--font-family-medium);
  font-size: var(--titles11-font-size);
  line-height: var(--titles11-line-height);
  color: var(--color-secondary);
}

.notification__label {
  font-family: var(--font-family);
  font-size: var(--titles11-font-size);
  line-height: var(--titles11-line-height);
  color: var(--color-secondary);
}

.notification__close-icon {
  width: var(--icon-small);
  height: var(--icon-small);
  font-size: var(--icon-small);

  cursor: pointer;
  margin-left: auto;
}

/* DISCOUNT TEXT FIELD */
.text-field__discount {
  max-width: 200px;
  position: relative;

  i {
    position: absolute;
    top: 8px;
    right: 8px;

    width: var(--icon-small);
    height: var(--icon-small);
    font-size: var(--icon-small);
    color: var(--color-secondary2);

    cursor: pointer;
  }

  .text-field__input.loading ~ i {
    display: none
  }
}

/* FOOTER */
footer {
  margin-top: auto;

  position: relative;

  padding: 80px 120px;

  /* Tablet and mobile */
  @media only screen and (max-width: 1183px) {
    padding: 64px 40px;
  }
}

.footer__content {
  display: flex;
  flex-direction: column;
  gap: 16px;

  border-top: 1px solid var(--color-grey3);

  padding: 64px 0;
}

.footer__icons {
  align-self: flex-end;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;

  /* Tablet and mobile */
  @media only screen and (max-width: 1183px) {
    align-self: center;
  }
}

.footer__icon-link {
  text-decoration: none;

  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px;

  color: white;
  background-color: var(--color-secondary3);
  border-radius: 6px;

  transition: all 0.4s ease-in-out;

  i {
    width: var(--icon-small);
    height: var(--icon-small);
    font-size: var(--icon-small);
  }
}

.footer__icon-link:hover {
  opacity: 0.7;
}

.footer__links {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;

  /* Tablet and mobile */
  @media only screen and (max-width: 1183px) {
    justify-content: center;
  }
}

.footer__text,
.footer__link {
  font-family: var(--font-family);
  font-size: var(--text-captionM-font-size);
  line-height: var(--text-captionM-line-height);
  color: var(--color-secondary);
  
  text-align: center;
}

.footer__link {
  text-decoration: none;

  transition: all 0.4s ease-in-out;
}

.footer__link:hover {
  opacity: 0.7;
}

.footer__red-corner {
  position: absolute;
  right: 0;
  bottom: 0;

  display: block;
  width: 0;
  height: 0;
  border-bottom: 160px solid var(--color-primary);
  border-left: 126px solid transparent;
  visibility: visible;

  content: '';
  z-index: 2;

  /* Tablet and mobile */
  @media only screen and (max-width: 1183px) {
    border-bottom: 80px solid var(--color-primary);
    border-left: 70px solid transparent;
  }
}

/* SPINNER */
.button.loading .spinner {
  color: var(--color-secondary2);
  display: inline-block;
}

.button.loading .spinner:after {
  content: " ";
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2.4px solid currentColor;
  border-color: currentColor transparent currentColor transparent;
  animation: lds-dual-ring 1.2s linear infinite;
  box-sizing: border-box;
}

div#loader.loading .spinner {
  color: var(--color-primary);
  display: inline-block;
}

div#loader.loading .spinner:after {
  content: " ";
  display: block;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 8px solid currentColor;
  border-color: currentColor transparent currentColor transparent;
  animation: lds-dual-ring 1.2s linear infinite;
  box-sizing: border-box;
}

.text-field__input.loading ~ .spinner {
  color: var(--color-primary);
  display: inline-block;

  position: absolute;
  top: 8px;
  right: 8px;
}

.text-field__input.loading ~ .spinner:after {
  content: " ";
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2.4px solid currentColor;
  border-color: currentColor transparent currentColor transparent;
  animation: lds-dual-ring 1.2s linear infinite;
  box-sizing: border-box;
}

@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* LOADER */
div#loader.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;

  padding: 32px;
  
  height: 80dvh;
}

.loading__label {
  font-family: var(--font-family-medium);
  font-size: var(--titles9-font-size);
  line-height: var(--titles9-line-height);
  color: var(--color-secondary);
  text-align: center;
}

/* CHECKBOX */
.checkbox {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0 32px;
  cursor: pointer;
}
 
.checkbox:hover .checkbox__background, .checkbox__label:hover ~ .checkbox__background {
  border-color: var(--color-grey3);
}
 
.checkbox__input {
  position: absolute;
  width: 0;
  height: 0;
  margin: 0;
}
 
.checkbox__tick {
  align-self: flex-start;
  justify-self: flex-start;
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 4px;
  width: 0;
  height: 0;
  -moz-transition: height .4s;
  -o-transition: height .4s;
  -webkit-transition: height .4s;
  transition: height .4s;
  border-bottom: 2px solid white;
  border-right: 2px solid white;
  transform: rotate(40deg) translateY(-70%);
}
 
.checkbox__input:checked ~ .checkbox__tick {
  border-bottom-color: var(--color-state-success);
  border-right-color: var(--color-state-success);
  width: 6px;
  height: 12px;
}
 
.checkbox__background {
  position: absolute;
  z-index: 1;
  width: 24px;
  height: 24px;
  background-color: white;
  border: 1px solid var(--color-grey2);
  border-radius: 2px;
}
 
.checkbox__label {
  max-width: 600px;
  margin-left: 32px;
  cursor: pointer;

  font-family: var(--font-family);
  font-size: var(--accelerators-tables-font-size);
  line-height: var(--accelerators-tables-line-height);
  color: var(--color-secondary2);
}

/* HIDDEN */
*.hidden {
  display: none !important;
}

.hidden__icon-label {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
    color: black;
}

.hidden__icon-label:focus {
    clip: auto;
    height: auto;
    overflow: auto;
    position: absolute;
    width: auto;
}