.modal-form {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

.modal-form.active {
  display: block;
}

.modal-form form {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  /* padding: 30px; */
  padding: 15px;
  border-radius: 5px;
}

.modal-form form .close {
  cursor: pointer;
  position: absolute;
  right: -14px;
  top: -20px;
  font-size: 28px;
  font-weight: bold;
  color: #bc262c;
}

.modal-form form .button {
  border-radius: 4px;
  background-color: rgb(195, 43, 64);
  font-size: 20px;
  font-family: "Roboto";
  color: rgb(255, 255, 255);
  text-align: center;
  cursor: pointer;
  padding: 8px 0;
}

.modal-form .row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.modal-form .row .name {
  width: 80px;
  margin-right: 10px;
}

.modal-form .row .value {
  flex: 1;
}

.modal-form .input {
  width: 100%;
  padding: 5px;
  border: 1px solid #ccc;
}

.modal-form .privacy-row label {
  display: flex;
  align-items: center;
}

.modal-form .privacy-row a {
  margin-left: 5px;
}

.modal-form .privacy-row input[type="checkbox"] {
  margin-right: 5px;
}

.modal-form .privacy-row input[type="checkbox"]:checked {
  accent-color: #c32b40;
}

.modal-form .privacy-row {
  margin-top: 10px; 
}

/* Всплывашка */
.quiz-popup {
    position: fixed;
    z-index: 100;
    width: 300px;
    height: 350px;
    bottom: -350px;
    right: 60px;
    background: #fff;
    border-radius: 15px 15px 0 0;
}
.quiz-popup__close-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #fff;
    color: #c32b40;
    font-weight: bold;
    border: none;
    border-radius: 100%;
    cursor: pointer;
    transition: all .25s ease;
}
.quiz-popup__img {
    width: 100%;
    height: 50%;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
}
.quiz-popup__content {
    background: #fff;
    padding: 20px 20px 0;
    margin-bottom: auto;
}
.quiz-popup__title {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
}
.quiz-popup__btn {
    font-size: 16px;
    padding: 10px 30px;
    margin-top: 20px;
    width: 100%;
    color: #fff;
    background: #c32b40;
    border: none;
    cursor: pointer;
    border-radius: 20px;
    transition: background .5s ease;
}
.quiz-popup_open {
    bottom: 0;
    transition: bottom 1s ease;
}
@media (max-width: 767px) {
    .quiz-popup {
        width: 260px;
        height: 84px;
        right: calc((100% - 260px) / 2);
        bottom: -84px;
        background: transparent;
        border-radius: 20px 20px 0 0;
    }
    .quiz-popup__close-btn {
        display: none;
    }
    .quiz-popup__img {
        display: none;
    }
    .quiz-popup__content {
        background: transparent;
        padding: 0;
        margin-bottom: 0;
        border-radius: 20px 20px 0 0;
    }
    .quiz-popup__title {
        display: none;
    }
    .quiz-popup__btn {
        margin-top: 0;
        border-radius: 20px 20px 0 0;
    }
    .quiz-popup_open {
        bottom: -42px;
    }
}
@media (hover: hover) {
    .quiz-popup__close-btn:hover {
        background: #c32b40;
        color: #fff;
    }
    .quiz-popup__btn:hover {
        background: #ff2544;
    }
}


/* Форма */
.quiz-form {
    padding: 0 !important;
    width: 50vw;
}
.quiz-form .close {
    width: 28px;
    height: 28px;
    top: -38px !important;
    right: 0 !important;
    background: #ededeb;
    border-radius: 100%;
    transition: background .25s ease;
}
.quiz-form .close::before, .quiz-form .close::after {
    content: "";
    display: block;
    width: 4px;
    height: 14px;
    background: #c32b40;
    position: absolute;
    left: 12px;
    top: 7px;
    transform-origin: center;
    transition: background .25s ease;
}
.quiz-form .close::before {
    transform: rotate(-45deg);
}
.quiz-form .close::after {
    transform: rotate(45deg);
}
.quiz-form__container {
    width: 100%;
    height: 100%;
    padding: 30px 15px;
    background: #ededeb;
    display: flex;
    flex-direction: column;
}
.quiz-form__questions fieldset {
    display: none;
    border: none;
}
.quiz-form__questions fieldset.quiz-form_current {
    display: block;
}
.quiz-form__questions fieldset legend {
    font-size: 40px;
    color: #3d3d40;
}
.quiz-form__answers {
    display: grid;
    grid-template-columns: repeat(2, minmax(40%, 23vw));
    gap: 10px;
    width: 100%;
    margin: 20px 0 100px;
}
.quiz-form__answer {
    padding: 20px 10px;
    border: 2px solid #c32b40;
    width: 100%;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: background .5s ease;
    border-radius: 10px;
}
.quiz-form__answer input[type="radio"] {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 1px solid #c32b40;
    background: #fff;
    border-radius: 50%;
    display: grid;
    place-content: center;
}
.quiz-form__answer input[type="radio"]::before {
    content: "";
    width: 14px;
    height: 14px;
    background: #c32b40;
    border-radius: 50%;
    transform: scale(0);
    transition: transform .25s ease;
}
.quiz-form__answer input[type="radio"]:checked::before {
    transform: scale(1);
}
.quiz-form__answer label {
    padding-left: 10px;
    color: #3d3d40;
    transition: color .5s ease;
}
.quiz-form__answer input, .quiz-form__answer label {
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}
.quiz-form__bottom {
    height: 20%;
    margin-top: auto;
    padding-top: 40px;
    border-top: 1px solid #c32b40;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    column-gap: 40px;
    user-select: none;
    -webkit-user-select: none;
}
.quiz-form__navigation {
    margin-right: 20px;
    display: flex;
    flex-direction: row;
    column-gap: 20px;
}
.quiz-form__navigation button[disabled] {
    background: none;
    border: 1px solid #3d3d40;
    color: #3d3d40;
    cursor: not-allowed;
}
.quiz-form__prev-btn, .quiz-form__next-btn {
    cursor: pointer;
    height: 48px;
    transition: all .5s ease;
    font-size: 18px;
}
.quiz-form__prev-btn {
    width: 48px;
    background: unset;
    border: 1px solid #c32b40;
    border-radius: 50%;
    display: grid;
    place-content: center;
    color: #c32b40;
}
.quiz-form__prev-btn::before {
    content: "\f060";
}
.quiz-form__next-btn {
    width: fit-content;
    padding: 10px 20px;
    background: #c32b40;
    border: none;
    border-radius: 25px;
    color: #fff;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.quiz-form__progress {
    position: relative;
    display: flex;
    align-items: center;
    --offset: -9px;
    --transition-time: 1s;
    flex: 1;
}
.quiz-form__progress-bar {
    position: relative;
    margin-left: 20px;
    min-width: 100px;
    width: 95%;
    height: 12px;
    background: #999;
    border-radius: 5px;
}
.quiz-form__progress-bar::before {
    content: "";
    position: absolute;
    height: 12px;
    background: linear-gradient(to right, #3a0d13, #ff2544);
    border-radius: 5px;
    width: calc(var(--offset) + 9px);
    transition: width var(--transition-time) ease;
}
.quiz-form__progress-bar::after {
    content: "";
    position: absolute;
    background: #c32b40;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    top: -25%;
    transform: translateX(var(--offset));
    transition: transform var(--transition-time) ease;
}
.quiz-form__counter {
    position: absolute;
    left: 12px;
    top: -10px;
    font-weight: bold;
    color: #c32b40;
    transform: translateX(var(--offset));
    transition: transform var(--transition-time) ease;
}
.quiz-form__budget {
    width: 100%;
    margin: 20px 0 100px;
}
.quiz-form__budget input[type="number"] {
    width: 180px;
    font-size: 20px;
    color: transparent;
    background: none;
    border: 1px solid #c32b40;
    padding: 10px 20px;
    border-radius: 5px;
    -moz-appearance: textfield;
}
.quiz-form__budget input[type="number"]::placeholder {
    color: #3d3d40;
}
.quiz-form__budget input[type="number"]:focus {
    outline: 0;
    color: #3d3d40;
    -moz-appearance: auto;
}
.quiz-form__budget input[type="range"] {
    margin-top: 20px;
    width: 100%;
    appearance: none;
    background: transparent;
    position: relative;
    --range-fill: 0;
    --border-radius-fill: 10px 0 0 10px;
}
.quiz-form__budget input[type="range"]::-webkit-slider-thumb,
.quiz-form__budget input[type="range"]::-webkit-slider-runnable-track,
.quiz-form__budget input[type="range"]::before {
    cursor: pointer;
}
.quiz-form__budget input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 8px;
    height: 28px;
    border-radius: 2px;
    background: #fff;
    margin: 6px 4px 0 0;
    opacity: .5;
    z-index: 2;
}
.quiz-form__budget input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 40px;
    background: #999;
    border-radius: 10px;
    padding: 0 8px;
}
.quiz-form__budget input[type="range"]::before {
    content: "";
    position: absolute;
    height: 40px;
    border-radius: var(--border-radius-fill);
    background: #c32b40;
    width: var(--range-fill);
}
.quiz-form__budget input[type="range"]::-moz-range-thumb,
.quiz-form__budget input[type="range"]::-moz-range-track,
.quiz-form__budget input[type="range"]::-moz-range-progress {
    cursor: pointer;
}
.quiz-form__budget input[type="range"]::-moz-range-thumb {
    appearance: none;
    width: 4px;
    height: 32px;
    border-radius: 2px;
    background: #fff;
    opacity: .5;
    z-index: 2;
}
.quiz-form__budget input[type="range"]::-moz-range-track,
.quiz-form__budget input[type="range"]::-moz-range-progress {
    height: 32px;
    border-radius: 2px;
}
.quiz-form__budget input[type="range"]::-moz-range-track {
    width: 100%;
    background: #999;
}
.quiz-form__budget input[type="range"]::-moz-range-progress {
    background: #c32b40;
}
.quiz-form__budget-markers {
    display: flex;
    justify-content: space-between;
    color: #3d3d40;
    font-size: 14px;
}
.quiz-form__questions fieldset#final legend {
    color: #3d3d40;
    margin: 0 auto 20px; /* Не text-align, чтобы и на moz центрировался */
}
.quiz-form__final-msg {
    color: #3d3d40;
    text-align: center;
    margin-bottom: 20px;
}
.quiz-form__final-container {
    width: clamp(300px, 60%, 90%);
    margin: 0 auto 50px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    row-gap: 20px;
    border: 1px solid #3d3d40;
    box-shadow: 0 0 16px -5px #3d3d40;
    position: relative;
}
.quiz-form__final-container label[for="final-tel"] {
    margin-bottom: -15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    font-weight: bold;
    color: #3d3d40;
}
.quiz-form__final-container input[type="tel"] {
    background: none;
    padding: 20px 0 20px 60px;
    color: #3d3d40;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid #c32b40;
}
.quiz-form__final-container input[type="tel"]:focus {
    outline: 0;
}
.quiz-form__final-container .tel-icon {
    color: #c32b40;
    position: absolute;
    top: 65px;
    left: 40px;
    font-size: 24px;
}
.quiz-form__submit-btn {
    width: 80%;
    padding: 10px;
    min-height: 48px;
    background: #c32b40;
    border: none;
    border-radius: 25px;
    color: #fff;
    font-weight: bold;
    transition: all .5s ease;
    font-size: 18px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.quiz-form__policy-checkbox {
    display: inline-flex;
    column-gap: 5px;
    align-items: flex-start;
    user-select: none;
    -webkit-user-select: none;
}
.quiz-form__policy-checkbox a {
    color: #c32b40;
}
.quiz-form__policy-checkbox input, .quiz-form__policy-checkbox label {
    cursor: pointer;
}
.quiz-form__policy-checkbox input {
    margin: 5px 0 0 0;
    min-width: 14px;
    min-height: 14px;
    border: 1px solid #c32b40;
    background: #fff;
    position: relative;
}
.quiz-form__policy-checkbox input:checked {
    background: #c32b40;
}
.quiz-form__policy-checkbox input:checked::before {
    content: url("/upload/fa-checkmark-white.svg");
    width: 10px;
    height: 10px;
    position: absolute;
    top: -2px;
    left: 1px;
}
@media (max-width: 1279px) {
    .quiz-form__answers {
        display: block;
    }
    .quiz-form__answer:not(:first-child) {
        margin-top: 10px;
    }
}
@media (max-width: 1023px) {
    .quiz-form__questions fieldset legend {
        font-size: 24px;
    }
}
@media (max-width: 767px) {
    .quiz-form {
        width: 90%;
    }
}
@media (max-width: 479px) {
    .quiz-form__container {
        padding: 30px 5px;
    }
    .quiz-form__bottom {
        column-gap: 20px;
    }
    .quiz-form__navigation {
        column-gap: 10px;
    }
    .quiz-form__next-btn, .quiz-form__prev-btn {
        font-size: 12px;
        height: 36px;
    }
    .quiz-form__prev-btn {
        width: 36px;
    }
    .quiz-form__counter {
        top: -16px;
    }
}
@media (hover: hover) {
    .quiz-form .close:hover {
        background: #c32b40;
    }
    .quiz-form .close:hover::before, .quiz-form .close:hover::after {
        background: #fff;
    }
    .quiz-form__answer:hover {
        background: #c32b40;
    }
    .quiz-form__answer:hover label {
        color: #fff;
    }
    .quiz-form__next-btn:hover, .quiz-form__prev-btn:hover {
        background: #ff2544;
    }
    .quiz-form__prev-btn:hover {
        border: none;
        color: #fff;
    }
    .quiz-form__submit-btn:hover {
        background: #ff2544;
    }
}
