/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@100;500&display=swap');

/* Base Styles */
:root {
  /* Purple */
  --purple_300: #A459DD;
  --purple_500: #662D91;
  --purple_600: #56267B;
  --purple_700: #481D68;
  --purple_900: #1B0F3B;

  /* White to black */
  --white_30: #F8F7F7;
  --gray_100: #E7E7E7;
  --gray_300: #ADB5BD;
  --gray_400: #818283;
  --gray_500: #495057;
  --gray_700: #2C2C2C;
  --black_1000: #121212;

  /* Other */
  --red_500: #BE2828;

  --font-main: "Raleway";

  --h1-size: 46px;
  --h2-size: 36px;
  --h3-size: 24px;
  --h4-size: 20px;
  --h5-size: 18px;

  --body-size: 16px;
  --menu-size: 16px;
  --btn-size: 18px;
  --input-size: 14px;
  --label-size: 18px;

  --line-14: 1.4;
  --line-135: 1.35;

  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;
  --space-120: 120px;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  color: var(--gray_700);
  font-family: var(--font-main);
  box-sizing: border-box;
}
main{
  width:100%
}
footer{
  flex-shrink: 0;
}

a {
  color: inherit;
}

@font-face {
  font-family: "Raleway";
  src: url("../fonts/Raleway-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("../fonts/Raleway-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("../fonts/Raleway-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("../fonts/Raleway-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("../fonts/Raleway-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("../fonts/Raleway-MediumItalic.ttf") format("truetype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("../fonts/Raleway-SemiBoldItalic.ttf") format("truetype");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("../fonts/Raleway-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}


.shell {
  width: min(1248px, calc(100% - 192px));
  margin: 0 auto;
}
/* button */
.btn {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 40px;
  border-radius: 10px;
  text-decoration: none;
  font-family: inherit;
  font-size: var(--btn-size);
  line-height: var(--line-135);
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  text-transform: uppercase;
}
.btn:disabled{
  background-color: var(--gray_400) !important;
  color: var(--white_30) !important;
  cursor: not-allowed;
  /* pointer-events: none; */
}
.btn:focus:not(:disabled){
  box-shadow: inset 0 0 0 1px var(--purple_300);
}

/* button Primary */
.btn--primary{
  background-color: var(--purple_500);
  color: var(--white_30);
}
.btn--primary:hover:not(:disabled) {
  background-color: var(--purple_600);
}
.btn--primary:active:not(:disabled){
  background-color: var(--purple_700);
}

/* button Secondary */
.btn--secondary{
  background-color: #FBF7C3;
  color: var(--black_1000);
}
.btn--secondary:hover:not(:disabled) {
  background-color: #D9D494;
}
.btn--secondary:active:not(:disabled) {
  background-color: #FFF793;
}

/* button Icon */
.btn--icon{
  border-radius: 50%;
  display: flex;
  padding: 12px;
  width: 48px;
  background-color: var(--white_30);
  color: var(--black_1000);
}
.btn--icon:not(:disabled):hover{
  background-color: var(--purple_500);
  color: var(--white_30);
}
.btn--icon:not(:disabled):focus{
  box-shadow: inset 0 0 0 1px var(--purple_300);
}
.btn--icon:not(:disabled):active{
  background-color: var(--purple_700);
  color: var(--white_30);
}

/* button CTA */
@property --color-1 {
  syntax: '<color>';
  inherits: false;
  initial-value: #D49BFF;
}

@property --color-2 {
  syntax: '<color>';
  inherits: false;
  initial-value: #481D68;
}
.btn--cta{
  min-height: 56px;
}
.btn--cta:not(:disabled) {
  background: linear-gradient(90deg, var(--color-1) 0%, var(--color-2) 100%);
  color: var(--white_30);
  transition: --color-1 0.2s ease, --color-2 0.2s ease;
  border: none;
  cursor: pointer;
}
.btn--cta:hover:not(:disabled) {
  --color-1: #8F49C5;
  --color-2: #1B0F3B;
}
.btn--cta:active:not(:disabled) {
  --color-1: #481D68;
  --color-2: #1B0F3B;
}
.file-remove{
  position: absolute;
  top: 8px;
  right: 8px;
  box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 25%);
}

p,h1,h2,h3,h4,h5,h6,li,ul{
  transition: margin 0.4s ease;
}

h1,h2,h3,h4,h5,
.h1,.h2,.h3,.h4,.h5 {
  margin: 0 0 20px;
}

h1,.h1 {
  font-size: var(--h1-size);
  line-height: var(--line-14);
  font-weight: 700;
  margin-bottom: var(--space-16);
}
h2,.h2 {
  font-size: var(--h2-size);
  line-height: var(--line-14);
  font-weight: 700;
  margin-bottom: var(--space-16);
}
h3,.h3 {
  font-size: var(--h3-size);
  line-height: var(--line-14);
  font-weight: 600;
  margin-bottom: var(--space-12);
}
h4,.h4 {
  font-size: var(--h4-size);
  line-height: var(--line-14);
  font-weight: 600;
  margin-bottom: var(--space-12);
}
h5,.h5 {
  font-size: var(--h5-size);
  line-height: var(--line-135);
  font-weight: 600;
  margin-bottom: var(--space-8);
}

p:not(:last-child), ul:not(:last-child) {
  margin-bottom: var(--space-8);
  margin-top: 0;
}
p:last-child{
  margin-bottom: 0 !important;
}
p, ul:not(.unstyle) li{
  font-size: var(--body-size);
  line-height: var(--line-14);
  font-weight: 400;
}
p > strong, p > b{
  font-weight: 500;
}

ul:not(.unstyle) {
  margin: 0 0 var(--space-32);
  padding: 0;
}
ul{
  margin: 0;
  padding: 0;
  list-style: none;
}
ul li:not(:last-child){
  margin-bottom: 4px;
}
ul:not(.unstyle) li {
  margin-left: var(--space-32);
  /* margin-bottom: 2px; */
}

ul:not(.unstyle) li::marker {
  font-size: 18px;
}

a,
.a-link {
  font-weight: 400;
  font-size: var(--body-size);
  line-height: var(--line-14);
  text-decoration: none;
  color: var(--purple_600);
}
a:not(.btn):hover,
.a-link:not(.btn):hover{
  text-decoration: underline;
}
.a-link {
  padding: 0;
  background-color: transparent;
  border: none;
}

.field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label{
  font-size: var(--label-size);
  font-weight: 500;
  line-height: var(--line-135);
}
.field input,
.field textarea {
  outline: none;
  width: 100%;
  font-weight: 400;
  font-size: var(--input-size);
  line-height: var(--line-14);
  font-family: inherit;
  border-radius: 6px;
  box-shadow: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color: var(--black_1000);
  transition: border-color 0.2s ease;
  background-color: var(--white_30);
  border: 1px solid var(--gray_300);
}
.field textarea {
  min-height: 68px;
  padding: 16px;
  resize: vertical;
}
.field input {
  height: 36px;
  padding-right: 16px;
  padding-left: 16px;
}
.field input:not(:disabled)::placeholder,
.field textarea:not(:disabled)::placeholder {
  color: var(--gray_300);
  transition: color 0.3s ease;
}

/* Hover */
.field input:hover:not(:disabled),
.field textarea:hover:not(:disabled) {
  border-color: var(--gray_400);
}
.field input:not(:disabled):hover::placeholder,
.field textarea:not(:disabled):hover::placeholder {
  color: var(--gray_400);
}
/* Typing*/
.field input:not(:placeholder-shown),
.field textarea:not(:placeholder-shown) {
  border-color: var(--purple_600);
}

/* Focus */
.field input:focus:not(:disabled),
.field textarea:focus:not(:disabled) {
  outline: none;
  border-color: var(--purple_300);
  box-shadow: 0 0 0 3px rgba(164, 89, 221, 0.15);
}

.field.is-error input,
.field.is-error textarea {
  border-color: var(--red_500);
}

/* Error */
.field.is-error input:focus:not(:disabled),
.field.is-error textarea:focus:not(:disabled) {
  border-color: var(--red_500);
  box-shadow: 0 0 0 3px rgba(190, 40, 40, 0.15);
}
.field-text__help-text.error{
  display: none;
}
.field-text__help-text{
  font-size: var(--input-size);
  line-height: var(--line-135);
  color: var(--gray_500);
}

/* Показываем текст ошибки, только если он не пустой */
.field-text__help-text.error:not(:empty) {
  display: block;
  color: var(--red_500)
}

/* Disabled */
.field input:disabled,
.field textarea:disabled {
  background-color: var(--gray_100);
  border-color: var(--gray_300);
  cursor: not-allowed;
}
.field input:disabled::placeholder,
.field textarea:disabled::placeholder {
  color: var(--gray_300);
}

/* Group: @media (max-width: 1199px) */
/* @media (max-width: 1199px) {
:root {
    --h1-size: 48px;
    --h1-line: 52px;
    --h2-size: 40px;
    --h2-line: 48px;
    --h3-size: 28px;
    --h3-line: 34px;
    --body-size: 20px;
    --body-line: 28px;
    --btn-size: 18px;
    --btn-line: 28px;

    --menu-size: 20px;
    --menu-line: 28px;
  }
} */

/* Group: @media (max-width: 767px) */
/* @media (max-width: 767px) {
:root {
    --h1-size: 36px;
    --h1-line: 40px;
    --h2-size: 32px;
    --h2-line: 36px;
    --h3-size: 24px;
    --h3-line: 28px;
    --body-size: 18px;
    --body-line: 26px;
    --btn-size: 18px;
    --btn-line: 28px;

    --menu-size: 18px;
    --menu-line: 26px;
  }
} */

.alert{
  padding: 16px;
  background-color: var(--white_30);
  box-shadow: 0 0 4px 0 rgba(0,0,0,0.25);
  display: flex;
  gap: 8px;
  border-radius: 6px;
  align-items: center;
  color: var(--gray_500);
  font-size: var(--body-size);
  line-height: var(--line-14);
  font-weight: 500;
}
.alert svg{
  width: 28px;
  height: 28px;
  color: var(--gray_400);
  flex-shrink: 0;
}



.otp-inputs {
  display: flex;
  justify-content: space-between;
}

.field.otp-group .otp-input {
  width: 38px;
  height: 38px;
  padding: 0;
  text-align: center;
}
.field.otp-group{
  width: 200px;
}

/* Hover */
.field.otp-group .otp-input:hover:not(:disabled) {
  border-color: var(--gray_400);
}

/* Focus */
.field.otp-group .otp-input:focus:not(:disabled) {
  outline: none;
  border-color: var(--purple_300);
  box-shadow: 0 0 0 3px rgba(164, 89, 221, 0.15);
}

/* Typing */
.field.otp-group .otp-input:not(:placeholder-shown) {
  border-color: var(--purple_600);
}

/* Error (помилка на всю групу) */
.field.otp-group.is-error .otp-input {
  border-color: var(--red_500);
}
.field.otp-group.is-error .otp-input:focus:not(:disabled) {
  box-shadow: 0 0 0 3px rgba(190, 40, 40, 0.15);
}

/* Disabled */
.field.otp-group .otp-input:disabled {
  background-color: var(--gray_100);
  border-color: var(--gray_300);
  cursor: not-allowed;
}
.checkbox-container {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-family: sans-serif;
  user-select: none;
}

.checkbox-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: self-start;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  flex-shrink: 0;
}

/* Hiding the standard system input */
.checkbox-wrapper input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Unchecked state */
.checkmark {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  background-color: #fff;
  border: 1px solid #E7E7E7;
  border-radius: 2px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

/* Checked state */
.checkmark::after {
  content: "";
  display: none;
  width: 10px;
  height: 8px;
  /* Encoded SVG with color #F8F7F7 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' fill='none' viewBox='0 0 10 8'%3E%3Cpath stroke='%23F8F7F7' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 1 3.5 6.5 1 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.checkbox-wrapper input:checked ~ .checkmark {
  background-color: #662D91;
  border-color: #662D91;
}

.checkbox-wrapper input:checked ~ .checkmark::after {
  display: block;
}

/* Unchecked & Checked */
.checkbox-wrapper input:disabled ~ .checkmark {
  background-color: #E7E7E7;
  border-color: #ADB5BD;
  cursor: not-allowed;
}

.checkbox-wrapper input:disabled:checked ~ .checkmark::after {
  display: block;
  /* Encoded SVG with color #ADB5BD */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' fill='none' viewBox='0 0 10 8'%3E%3Cpath stroke='%23ADB5BD' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 1 3.5 6.5 1 4'/%3E%3C/svg%3E");
}

.checkbox-container:has(input:disabled) {
  cursor: not-allowed;
}







.stage{
  display: none;
  align-items: center;
  flex-direction: column;
  gap: var(--space-64);
  margin: 0 32px;
}
.stage.active{
  display: flex;
  
}
.page{
  max-width: 1120px;
}

.stage__container{
  max-width: 704px;
  width: 100%;
  box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 25%);
  padding:64px;
  border-radius: 20px;
  display: flex;
  justify-content: center;
}
.stage__wrapper{
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  width: 273px;
}
.stage__wrapper .btn{
  align-self: center;
}
#stage-form .stage__wrapper .btn:not(.btn--cta){
  align-self: flex-start;
}
.alert:has(span:empty) {
  display: none;
}
.stage__header{
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stage__header h3{
  margin: 0;
}
.arrow{
  display: flex;
  align-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background-color: transparent;
  text-decoration: none;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 0.2s ease;
}
.arrow.arrow--right{
  justify-content: start;
}
.arrow.arrow--left{
  justify-content: end;
}
.arrow.arrow--right:not(:disabled):hover{
  transform: translateX(-4px);
}
.arrow.arrow--left svg{
  transform: rotate(180deg);
}
.arrow.arrow--left:not(:disabled):hover{
  transform: translateX(2px);
}
.arrow:disabled{
  opacity: 0;
  pointer-events: none;
}
.stage__form{
  display: flex;
  flex-direction: column;
}
.stage__form button[type="submit"]{
  margin: 40px auto;
  margin-bottom: 0;
}
@media(min-width:767px){
  .stage__form .field{
    margin: 0 20px;
  }
}


.stage__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
#stage-policy .stage__wrapper{
  width: auto;
}
.policy-card{
  box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 25%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
}
.policy-label{
  color: var(--gray_500);
  font-size: var(--body-size);
  line-height: var(--line-14);
  font-weight: 400;
}
.policy-value{
  margin: 0;
}
.br-mobile{
  display: none;
}

.result__block span{
  font-size: var(--body-size);
  font-weight: 600;
  line-height: var(--line-14);
}
.result__block p{
  font-size: var(--body-size);
  font-weight: 400;
  line-height: var(--line-14);
  margin-top: 4px;
}
.gap-16__wrapper{
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}
.gap-12__wrapper{
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}
.gap-16__wrapper p,
.gap-12__wrapper p{
  margin: 0;
}
#stage-result .stage__wrapper,
#stage-form .stage__wrapper{
  width: 100%;
  gap: var(--space-40);
}
#stage-result h3,
#stage-result h4,
#stage-form h4{
  margin: 0;
}
.attention__block{
  display: flex;
  gap: var(--space-8);
}

.attention__block span{
  width: 33px;
  height: 33px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--gray_400);
  flex-shrink: 0;
}
.attention__block p{
  width: 100%;
  margin: 0;
}

/* ===================== File thumbnails ===================== */
#reelee-auth-widget .files-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#reelee-auth-widget .file-thumb {
  position: relative;
  width: 140px;
  height: 140px;
  border: 1px solid var(--white-30);
  border-radius: 10px;
  box-shadow: var(--shadow-4);
  overflow: hidden;
  background: var(--white-30);
  display: flex;
  align-items: center;
  justify-content: center;
}

#reelee-auth-widget .file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#reelee-auth-widget .file-thumb .file-doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  color: var(--gray-500);
}

#reelee-auth-widget .file-thumb .file-doc .file-ext {
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--purple-500);
}

#reelee-auth-widget .file-thumb .file-doc .file-label {
  font-size: 12px;
  word-break: break-word;
  line-height: 1.2;
  max-height: 44px;
  overflow: hidden;
}


@media (max-width:768px){
  .br-mobile{
    display: block;
  }
  .stage{
    gap: var(--space-24);
    margin: 0 16px;
  }
  .stage__container{
    padding: 24px;
  }
  .stage__wrapper{
    /* width: 100% !important; */
  }
  .stage:not(#stage-policy) .btn[type="submit"]{
    padding: 0;
    width: 100%;
  }
  .stage__grid{
    grid-template-columns: 1fr;
  }
  #reelee-auth-widget .file-thumb{
    width: 100px;
    height: 100px;
  }
}
#stage-loading .stage__container--loading{
  max-width: 300px;
  padding: 50px;
  border-radius: 6px;
  gap: 24px;
  flex-direction: column;
  align-items: center;
}
#stage-loading .logo{
  filter: invert(1);
  width: 133px;
}
#stage-loading p{
  text-align: center;
  color: var(--purple_900);
  margin: 0;
}
.loader {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader-ring {
  animation: spin 1s linear infinite;
}


/* сброс дефолтных отступов у списков */
.result__block ul,
.result__block ol {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* базовый вертикальный ритм: 16px сверху у каждого блока,
   кроме первого — margin-top гораздо надёжнее, чем margin-bottom,
   т.к. не участвует в схлопывании margin'ов между соседями */
.result__block h3,
.result__block h4,
.result__block p,
.result__block ul,
.result__block ol,
.result__block li,
.result__block blockquote,
.result__block pre {
  margin: 16px 0 0 0 !important;
}

/* первый элемент внутри контейнера — без отступа сверху */
.result__block > *:first-child,
.result__block div > *:first-child,
.result__block li > *:first-child {
  margin-top: 0 !important;
}

/* если элемент идёт сразу после заголовка — отступ всего 4px, а не 16 */
.result__block h3 + *,
.result__block h4 + * {
  margin-top: 4px !important;
}

/* заголовки-лейблы: тот же вес, что на скрине */
.result__block h3,
.result__block h4 {
  font-size: 16px !important;
  font-weight: 700 !important;
  margin-top: 16px !important;
}

/* пункты списка ведут себя как отдельные "блоки" — тот же 16px ритм */
.result__block li {
  margin-top: 16px !important;
}
.result__block li:first-child {
  margin-top: 0 !important;
}

/* вложенный список внутри пункта — как "контент" под лейблом, отступ 4px */
.result__block li > ul,
.result__block li > ol {
  margin-top: 4px !important;
}

/* если пункт списка начинается с жирного лейбла — переносим его
   на отдельную строку с 4px-отступом от текста ниже */
.result__block li > strong:first-child {
  display: block !important;
  margin-bottom: 4px !important;
}