/*
 * То, что попапу даёт base.css лендинга, — только внутри попапа: на старых страницах (main.php)
 * base.css не подключается, его reset сломал бы их вёрстку.
 * :where(.popup) не добавляет специфичности: reset весит как селектор тега, как в base.css,
 * и стили компонентов (.button, .request-form__input) его перекрывают.
 */

body.is-scroll-locked {
    overflow: hidden;
}

:where(.popup),
:where(.popup) *,
:where(.popup) *::before,
:where(.popup) *::after {
    box-sizing: border-box;
}

:where(.popup) {
    font-family: var(--font-base);
    font-size: var(--fs-body);
    font-weight: 300;
    line-height: 1.38;
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

:where(.popup) :where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure) {
    margin: 0;
}

:where(.popup) :where(h1, h2, h3, h4, h5, h6) {
    font-weight: 500;
    color: var(--color-ink);
}

:where(.popup) :where(img, svg) {
    display: block;
    max-width: 100%;
}

:where(.popup) a {
    color: inherit;
    text-decoration: none;
}

:where(.popup) :where(button, input, textarea, select) {
    font: inherit;
    color: inherit;
}

:where(.popup) button {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

:where(.popup) :focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

:where(.popup) .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

:where(.popup) .icon {
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    fill: currentColor;
}
