/* A rendered header advert already supplies the space above the catalogue. */
body .rrm-richtext a:not(.button) { color: inherit; }
body.single-rr_material .single-material__description.single-material__description--complete {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}

body .site-layout__main:has(> .rr-ad:not([hidden])) > .catalog-page.section {
	padding-top: 0;
}

body.single-rr_material .material-share-slot {
    margin-top: var(--layout-gap);
}

body.single-rr_material .material-share-slot > .material-share {
    top: calc(12px + var(--wp-admin--admin-bar--height, 0px));
    width: max-content;
    margin: 0;
    background: #fff;
}

body.single-rr_material .material-share-slot > .material-share.is-pinned {
    position: fixed;
    z-index: 6;
}

body.single-rr_material .single-material > .shell > .single-material__instructions {
    margin-top: var(--layout-gap);
}

@media (max-width: 680px) {
	body.single-rr_material .material-share-slot > .material-share {
		top: calc(var(--mobile-bar-height, 56px) + var(--mobile-safe-top, 0px) + var(--mobile-admin-top, 0px));
	}
}

/* Public information pages use the same surface and heading insets. */
@media (min-width: 681px) {
    body .site-layout {
        --rr-page-inset: 26px;
        margin-top: var(--layout-gap);
    }

    body #main-content > .rr-yandex-top:not([hidden]) + .site-layout {
        margin-top: 0;
    }

    body .site-layout__main > :is(.standard-page, .contacts-page, .game-navigator-page, .faq-page, .holiday-calendar, .catalog-page.section, .single-material) {
        padding-block: 0;
    }

    body .site-layout__main > :is(.standard-page, .contacts-page, .game-navigator-page, .faq-page, .catalog-page) > .shell,
    body .site-layout__main > .holiday-calendar > .holiday-calendar__surface {
        box-sizing: border-box;
        max-width: none;
        padding: 30px var(--rr-page-inset);
        border: 0;
    }

    body .site-layout__main > .standard-page > .shell,
    body .site-layout__main > .contacts-page > .shell {
        box-shadow: none;
    }

    body .site-layout__main :is(.standard-page h1, .contacts-page__header h1, .catalog-page__title),
    body.home .home-catalog #home-catalog-title {
        margin: 0 0 24px;
        font-size: 38px !important;
        line-height: 1.2 !important;
    }

    body.home .home-catalog > .shell {
        padding: 30px 26px;
        border: 0;
    }

    body.home .home-catalog #home-catalog-title {
        padding: 0;
        text-align: left;
    }

    body #main-content > .rr-yandex-top {
        margin-block: var(--layout-gap);
    }

    body #main-content > .rr-yandex-top:not([hidden]) ~ .home-layout {
        margin-top: 0;
    }

    body :is(.catalog-page, .home-catalog) .catalog-tools {
        position: sticky;
        top: var(--wp-admin--admin-bar--height, 0px);
        z-index: 12;
        padding-block: 8px;
        background: #fff;
    }

    body :is(.catalog-page, .home-catalog) .catalog-tools > details[open] > .catalog-filters__groups {
        max-height: min(50vh, 460px);
        overflow-y: auto;
    }
}

@media (min-width: 1081px) {
    body :is(.home-layout, .site-layout) > .home-sidebar-column {
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
        margin-top: 0;
    }

    body :is(.home-layout, .site-layout) .home-store-products {
        width: 100%;
        min-width: 0;
    }

    .game-navigator-page .game-navigator__alphabet {
        min-height: 104px;
    }
}

@media (max-width: 1080px) {
    body :is(.catalog-page, .home-catalog) .catalog-tools > details[open] {
        grid-row: 2;
    }

    body :is(.catalog-page, .home-catalog) .catalog-tools > button.catalog-filters--reset {
        grid-area: 1 / 2;
    }

    body :is(.catalog-page, .home-catalog) .catalog-tools > .catalog-favorites-link {
        grid-area: 1 / 3;
    }
}

@media (max-width: 680px) {
    body.home .home-catalog > .shell {
        padding: 20px 16px 16px;
    }

    body.home .home-catalog #home-catalog-title {
        margin: 0 0 20px;
        padding: 0;
        font-size: 34px !important;
        line-height: 1.2 !important;
        text-align: left;
    }

    body #main-content > .rr-yandex-top:not([hidden]) + .site-layout :is(.holiday-calendar, .faq-page) {
        padding-top: 0;
    }
}

body .catalog-tools > .catalog-filters--reset {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    color: var(--rr-color-text);
    font-size: 16px !important;
    font-weight: 700;
    text-decoration: none;
}

body .catalog-tools > .catalog-filters--reset[hidden] {
    display: none;
}

body .catalog-tools > button.catalog-filters--reset {
    cursor: pointer;
}

body .catalog-tools > details.catalog-filters:not([open]):is(:hover, :has(> summary:focus-visible)),
body .catalog-tools > .catalog-filters--reset:is(:hover, :focus-visible),
body .catalog-tools > .catalog-favorites-link:is(:hover, :focus-visible) {
    background-color: #f0e7fa;
}

body :is(.home-catalog, .catalog-page) .catalog-tools .search-form {
    background: #f8f5fc;
}

body :is(.home-catalog, .catalog-page) .catalog-tools .search-form input {
    background: transparent;
}

body .site-quick-nav a[aria-current="page"] {
    background: #f0e7fa;
}

body .header-language__options .header-language__current {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-radius: 4px;
    background: #f0e7fa;
}

.header-language__current::after,
.mobile-language [aria-current]::after {
    content: "✓";
}

body .mobile-language [aria-current] {
    opacity: 1;
    background: #f0e7fa;
    color: #45346f !important;
}

.mobile-language [aria-current]::after {
    margin-inline-start: 8px;
}

body .header-language__options .rrm-language-switch:not(:hover, :focus-visible) {
    background: #fff;
    text-decoration: none;
}

body .standard-page .rrm-subscription__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    color: #ffad16 !important;
    font-size: 14px !important;
    font-weight: 700;
    letter-spacing: .04em;
}

.rrm-subscription__eyebrow img {
    flex: none;
    width: 32px;
    height: 32px;
    object-fit: contain;
}
