* {
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
  min-height: 100vh;
}

.form {
  max-width: 400px;
  width: 100%; /* всегда растягивается на всю ширину родительского элемента */
  border: 2px solid #ccccccae;
  border-radius: 10px;
  padding: 30px 60px 30px 20px;
  background-color: rgb(240, 240, 235);
}

.form fieldset {
  margin-bottom: 15px;
  padding: 0;
  border: 0;
}

legend {
  font-size: 20px;
  font-variant: small-caps;
  font-weight: 700;
  padding: 0;
  margin-bottom: 20px;
}

.form-group {
  display: block;
  margin-bottom: 20px;
  cursor: pointer;
}

.form-input {
  display: block;
  margin-top: 5px;
  padding: 10px;
  border-radius: 8px;
}

.form-textarea {
  display: block;
  min-height: 50px;
  max-height: 150px;
  margin: 5px 0 15px;
  resize: vertical;
}

.form-input,
.form-textarea {
  width: 100%;
  outline: none;
}

.form-input:disabled,
.form-textarea:disabled {
  opacity: 0.6;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #a0a0a0;
  font-style: italic;
  font-size: 13px;
}

.form-checkbox-label {
  display: inline-block;
  cursor: pointer;
  position: relative;
}

.form-checkbox {
  /* префиксы для кроссбраузерности c этим свойством  */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: absolute;
  outline: none;
  cursor: pointer;

  /* или
    position:absolute;
    width:1px;
    height:1px;
    overflow: hidden;
    clip: rect (0 0 0 0); */

  /* или
    position:absolute;
    width:0;
    height:0;
    opacity:0; */
}

/* кастомный чекбокс через span */
.form-checkbox-mod {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1px solid;
  border-radius: 3px;
  background-color: white;
}

.form-checkbox:checked + .form-checkbox-mod {
  /* background-image: url(./check-icon.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px 15px; */

  background: url(./check-icon.svg) no-repeat center / 15px 15px #2c718d;
}

/* атрибут disabled надо ставить инпуту, а не спану */
.form-checkbox:disabled + .form-checkbox-mod {
  opacity: 0.3;
  cursor: default;
}

.checkbox-text {
  display: inline-block;
  margin-left: 30px;
}

.btn-wrap {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.btn {
  padding: 10px 20px;
  cursor: pointer;
  min-width: 150px;
  border: 1px solid rgb(213, 209, 209);
  border-radius: 8px;
  background-color: #2c718d;
  color: aliceblue;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.7;
}

.btn:not(:disabled):active {
  background-color: #2eb698;
}

.btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.form-input:focus-visible,
.form-textarea:focus-visible,
.form-checkbox:focus-visible + .form-checkbox-mod,
.btn:focus-visible {
  outline: 2px solid #006c55;
  outline-offset: 1px;
}

