/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal__content {
    background-color: #D9D9D9; /* Changed to match the image */
    padding: calc(var(--index) * 4);
    width: 100%;
    height: 100%;
    max-width: 100%; /* Limiting width */
    color: #333; /* Adjust text color for contrast */
    position: relative;
}

.modal__close {
    position: absolute;
    top: calc(var(--index) * 0.5);
    right: calc(var(--index) * 3.7);
    font-size: 6rem;
    cursor: pointer;
    color: #333;
}

.modal__header {
    text-align: left;
    margin-bottom: calc(var(--index) * 1);
}

.modal__header h2 {
    font-size: 2rem;
    margin-top: calc(var(--index) * 0.5);
    color: #333; /* Adjust header text color */
}

.modal__logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Два столбца одинаковой ширины */
    gap: calc(var(--index) * 2);
    align-items: start;
}

.modal__left {
    padding-right: calc(var(--index) * 2); /* Отступ справа */
}

.modal__left h2 {
    font-size: 4rem;
    margin-top: calc(var(--index) * 2);
    color: #333;
}

.modal__form {
    padding-left: calc(var(--index) * 2); /* Отступ слева */
    font-size: 3rem;
}

.form__group {
    margin-bottom: calc(var(--index) * 0.75);
}

.form__group label {
    display: block;
    font-size: 1.6rem;
    margin-bottom: calc(var(--index) * 0.25);
    color: #555;
}

.form__group input,
.form__group textarea {
    width: 100%;
    padding: calc(var(--index) * 0.25) 0; /* Уменьшаем вертикальный отступ */
    border: none; /* Убираем рамку */
    border-bottom: 1px solid #aaaaaa; /* Добавляем нижнюю границу */
    border-radius: 0; /* Убираем скругление углов */
    font-size: 1.1rem;
    transition: border-color 0.6s ease;
    background-color: transparent; /* Делаем фон прозрачным */
    color: #333; /* Ensure the text is visible */
}

.form__group input:focus,
.form__group textarea:focus {
    border-bottom-color: #444444; /* Изменяем цвет нижней границы при фокусе */
    outline: none; /* Убираем стандартное выделение при фокусе */
}

.form__group textarea {
    height: 150px;
    resize: vertical;
}

.form__group--inline {
    display: flex;
    gap: calc(var(--index) * 0.5);
}

.form__group--half {
    flex: 1;
}

.checkbox {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    color: #555;
}

.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox span {
    position: relative;
}

/* Custom Checkbox Styling */
.checkbox span::before {
    content: "";
    position: absolute;
    top: 0;
    left: -35px;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 3px;
    transition: background-color 0.5s ease;
}

/* On mouse-over, add a grey background color */
.checkbox:hover input ~ span::before {
    background-color: #ddd;
}

/* When the checkbox is checked, add a blue background */
.checkbox input:checked ~ span::before {
    background-color: #1f1f1f;
    border-radius: 3px;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkbox span::after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.checkbox input:checked ~ span::after {
    display: block;
}

/* Style the checkmark/indicator */
.checkbox span::after {
    left: -26px;
    top: 4px;
    width: 7px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}


.button {
    background-color: #1f1f1f;
    color: #fff;
    padding: calc(var(--index) * 0.75) calc(var(--index) * 2);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #555;
}

.form__group a {
  color: #555;
}

@media (max-width: 767px) {
    .modal__content {
      padding: 20px;
      overflow-y: auto;
      max-height: 100vh; /* Важно ограничить высоту */
    }
  
    .modal__close {
      top: 0px;
      right: 18px;
      font-size: 4rem;
    }
  
    .modal__grid {
      grid-template-columns: 1fr;
    }
  
    .modal__left {
      padding-right: 0;
      margin-bottom: 20px;
      text-align: left;
    }
  
    .modal__left h2 {
      font-size: 2rem;
      margin-top: 10px;
    }
  
    .modal__form {
      padding-left: 0;
    }
  
    .form__group {
      margin-bottom: 15px;
    }
  
    .form__group label {
      font-size: 0.9rem;
    }
  
    .form__group input {
      font-size: 0.9rem;
    }

    .form__group textarea {
        height: 110px;
      }
  
    .form__group--inline {
      flex-direction: column;
    }
  
    .form__group--half {
      width: 100%;
    }
  
    .form__group--half:first-child {
      margin-bottom: 15px;
    }
  
    .checkbox {
      font-size: 0.8rem;
      padding-left: 25px;
    }
  
    .checkbox span::before {
      left: -25px;
      width: 20px;
      height: 20px;
    }
  
    .checkbox span::after {
      left: -19px;
      top: 3px;
      width: 5px;
      height: 10px;
    }
  
    .button {
      font-size: 0.9rem;
    }
}
  
