.faq {
    margin: 30px 0;
    color: #231f20;
    text-align: left;
}

.faq__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    margin-bottom: 16px;
}

.faq__title {
    margin: 0;
}

.faq__tabs {
    margin-bottom: 16px;
}

.faq__list {
    border-top: 1px solid #d5d5d5;
}

.faq__item {
    border-bottom: 1px solid #d5d5d5;
}

.faq__question {
    position: relative;
    padding: 16px 40px 16px 0;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.faq__question::-webkit-details-marker {
    display: none;
}

.faq__question::after {
    content: '+';
    position: absolute;
    top: 50%;
    right: 8px;
    color: #626262;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-50%);
    transition: transform .25s ease;
}

/* Плюс поворачивается в крестик. При закрытии возвращается сразу, не дожидаясь конца анимации. */
.faq__item[open]:not(.faq__item--closing) > .faq__question::after {
    transform: translateY(-50%) rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
    .faq__question::after {
        transition: none;
    }
}

.faq__question:hover,
.faq__question:focus-visible {
    color: #626262;
}

/* Высота анимируется на внешнем блоке, отступы — на внутреннем, иначе в конце анимации будет рывок. */
.faq__answer {
    overflow: hidden;
}

.faq__answer-inner {
    padding: 0 40px 16px 0;
    line-height: 1.5;
}

.faq__answer-inner > :first-child {
    margin-top: 0;
}

.faq__answer-inner > :last-child {
    margin-bottom: 0;
}

.faq__empty {
    margin: 16px 0;
}

.faq__all {
    color: #231f20;
    font-weight: 600;
    text-decoration: underline;
}

.faq__all:hover {
    color: #626262;
}

@media screen and (max-width: 767px) {
    .faq__question {
        padding: 14px 32px 14px 0;
    }

    .faq__question::after {
        right: 4px;
    }

    .faq__answer-inner {
        padding-right: 0;
    }
}
