html:has(body.webkit-browser)::-webkit-scrollbar,
html:has(body.webkit-browser) *::-webkit-scrollbar {
    width: 8px; /* Ширина всего элемента навигации */
}

html:has(body.webkit-browser)::-webkit-scrollbar-track,
html:has(body.webkit-browser) *::-webkit-scrollbar-track {
    background: var(--primary); /* Цвет дорожки */
}

html:has(body.webkit-browser)::-webkit-scrollbar-thumb,
html:has(body.webkit-browser) *::-webkit-scrollbar-thumb {
    background-color: #6B6B89; /* Цвет бегунка */
    border-radius: 0; /* Округление бегунка */
}

html:has(body.not-webkit-browser),
html:has(body.not-webkit-browser) * {
    scrollbar-color: #6B6B89 var(--primary);
    scrollbar-width: thin;
}

:root {
    --primary: rgb(52, 53, 121);
    --secondary: rgb(221, 189, 147);
    --white-ish: rgb(241, 240, 230);
    --default-border-radius: 16px;
}

body {
    overflow-x: hidden;
}

.user-notices {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.user-notices .reply-mark,
.user-notices .mention-mark,
.user-notices .comment-mark {
    content: "";
    width: 10px;
    height: 10px;
    background-color: darkred;
    border-radius: 10px;
}

.user-notices .reply-mark.flashing,
.user-notices .mention-mark.flashing,
.user-notices .comment-mark.flashing {
    animation-name: flashing;
    animation-iteration-count: infinite;
    animation-duration: 2s;
}

@keyframes flashing {
    0% {
        opacity: 1
    }
    50% {
        opacity: 0
    }
    100% {
        opacity: 1
    }
}

.user-notices .reply-mark {
    background-color: darkred;
}

.user-notices .mention-mark {
    background-color: darkgreen;
}

.user-notices .comment-mark {
    background-color: darkblue;
}

#comments,
#replies {
    display: block !important;
    width: 100%;
}

.comment {
    position: relative;
}

.children {
    padding-left: 20px;
}

.comment:has(.children) > .children > .comment {
    padding-bottom: 0;
}

.comment:has(.children) > .children > .comment::before {
    content: '';
    height: 100%;
    width: 1px;
    background-color: var(--primary);
    opacity: 0.5;
    position: absolute;
    top: 10px;
    left: 0;
    z-index: 1;
}

.comment:has(.children) > .children > .comment:last-child::before {
    height: 40px;
}

.comment:has(.children) > .children > .comment::after {
    content: '';
    height: 1px;
    width: 10px;
    background-color: var(--primary);
    opacity: 0.5;
    position: absolute;
    top: 50px;
    left: 0;
    z-index: 1;
}

.comment-link-to {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    display: block;
}

.jb-comments__replies {
    position: relative;
    display: flex;
    flex-direction: row;
    margin-left: auto;
    pointer-events: none;
    align-items: center;
    gap: 4px;
}

.jb-comments__replies .jb-comments__replies-icon {
    position: relative;
    width: 24px;
    height: 24px;
}

.jb-comments__replies .jb-comments__replies-icon svg {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.2s ease;
}

.jb-comments__replies .jb-comments__replies-icon svg:last-child {
    opacity: 0;
}

@media (max-width: 400px) {
    .jb-comments__replies .jb-comments__replies-title {
        display: none;
    }
}

.jb-comments__replies.new-reply .jb-comments__replies-icon svg:first-child {
    opacity: 0;
}

.jb-comments__replies.new-reply .jb-comments__replies-icon svg:last-child {
    opacity: 1;
}

.jb-comments__reactions {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.comment-emoji svg path {
    fill: var(--secondary);
}

.comment-emoji,
.post-reaction {
    opacity: 1;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.comment-emoji.updating,
.post-reaction.updating {
    animation: block-updating;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

@keyframes block-updating {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.comment-emoji.loading,
.post-reaction.loading {
    opacity: 0.5;
}

.comment-emoji.active svg path,
.post-reaction.active svg path {
    fill: var(--primary);
}

.post-reaction.jb-post__stars.active svg path {
    stroke: var(--primary);
}

.jb-pagination {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .jb-pagination .jb-button--back,
    .jb-pagination .jb-button--next {
        width: 32px;
        height: 32px;
        font-size: 0 !important;
    }
}

.comment-respond {
    padding: 24px;
    border: 1px solid var(--primary);
    border-radius: var(--default-border-radius);
}

.comment .comment-respond {
    border-width: 0;
    padding: 24px;
}

.comment-reply-login {
    cursor: pointer;
}

.comment-respond .comment-reply-title {
    /*font-size: 0;*/
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    text-align: right;
    font-weight: 500;
}

.comment .comment-respond .comment-reply-title {
    text-align: left;
    border-width: 0;
    padding: 24px 0 0 0;
    margin-bottom: 16px;
}

/*@media (max-width: 768px) {*/
/*    .comment .comment-respond .comment-reply-title {*/
/*        flex-direction: column-reverse;*/
/*        align-items: flex-start;*/
/*        gap: 6px;*/
/*        text-align: left;*/
/*    }*/
/*}*/

.comment-respond .comment-reply-title small {
    display: inline-block;
    background-color: transparent;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2em;
    color: var(--primary);
}

/*@media (max-width: 768px) {*/
/*    .comment-respond .comment-reply-title small {*/
/*        margin-left: auto;*/
/*    }*/
/*}*/

.comment-respond .comment-reply-title small a {
    background-color: var(--primary);
    color: var(--white-ish);
    border-radius: 24px;
    border: 1px solid var(--primary);
    display: inline-block;
    padding: 8px 24px;
    text-decoration: none;
}

.comment-respond .comment-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-respond .comment-form-comment textarea {
    width: 100%;
    border-radius: var(--default-border-radius);
    display: block;
    resize: none;
    border: 0;
    padding: 12px 16px;
    background-color: rgb(225, 225, 220);
    outline: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2em;
    color: var(--primary);
}

.comment-respond .comment-form .form-submit {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
}

@media (max-width: 500px) {
    .comment-respond .comment-form .form-submit {
        align-items: flex-start;
    }
}

.comment-respond .comment-form .custom-comment-error {
    color: #800;
    margin-right: auto;
}

.comment-respond .comment-form .form-submit input {
    border-radius: 24px;
    border: 1px solid var(--primary);
    background-color: transparent;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2em;
    padding: 8px 24px;
    color: var(--primary);
    cursor: pointer;
}

#jb-notices {
    display: flex;
    flex-direction: column;
}

#jb-notices .jb-select,
#jb-notices .select2,
#favorites .jb-select,
#orders .jb-select {
    margin-bottom: 1.5rem;
}

#jb-comments__mention-users-list {
    display: block;
    position: absolute;
    top: 200px;
    left: 200px;
    width: 200px;
    height: 200px;
    background: rgba(225, 225, 220, 0.9);
    border: 1px solid var(--primary);
    border-radius: var(--default-border-radius);
}

.jb-comments__item {
    padding-right: 0;
}

/*.jb-comments__item.depth-1 {*/
/*    padding-right: 1.5rem;*/
/*}*/

.jb-header__notification a {
    display: inherit;
}

#archive,
#search {
    gap: 24px;
}

.jb-articles__cards.jb-articles__wall {
    display: flex;
    flex-wrap: wrap;
    padding: 1px;
    /* gap: 1px; */
}

.jb-articles__cards.jb-articles__wall .jb-card {
    /* width: calc(50% - 0.5px); */
    /* flex: 0 0 calc(50% - 0.5px); */
    flex: 0 0 50%;
    border: 1px solid;
}

@media (max-width: 600px) {
    .jb-articles__cards.jb-articles__wall .jb-card {
        width: 100%;
        flex: 0 0 100%;
    }
}

.jb-articles:last-child .swiper {
    margin-bottom: 0;
}

.jb-articles__cards:has(.jb-articles__empty) {
    background-color: transparent;
}

.avatar {
    border-radius: 1000px;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: center;
}

.jb-comments__author-name a {
    pointer-events: none;
}

#change-avatar-method + .nice-select {
    margin-bottom: 24px;
}

.wp-block-woocommerce-mini-cart-contents .wc-block-components-notices,
.wp-block-woocommerce-mini-cart-title-items-counter-block,
.wc-block-cart-item__total,
.wc-block-components-totals-item__description {
    display: none !important;
}

.wp-block-woocommerce-mini-cart-contents {
    background-color: var(--white-ish);
}

.wc-block-mini-cart__badge {
    background-color: transparent !important;
    color: var(--primary);
    margin-left: 0 !important;
    transform: none !important;
    min-width: 1px !important;
    width: auto !important;
}

h2.wc-block-mini-cart__title {
    mask-image: none !important;
    margin: 24px 24px 0 !important;
    padding-bottom: 16px !important;
}

h2.wc-block-mini-cart__title,
.wp-block-woocommerce-mini-cart-title-label-block {
    font-size: 24px !important;
    line-height: 1 !important;
}

.wc-block-components-button.wc-block-components-drawer__close {
    right: 24px !important;
    top: 24px !important;
}

.wc-block-components-drawer__close-wrapper svg {
    color: var(--primary);
}

.wc-block-mini-cart__items {
    padding: 0 24px !important;
}

.wc-block-cart-items__row {
    grid-template-columns: 102px 132px !important;
    border-bottom: 1px solid rgba(52, 53, 121, 0.3);
    padding-top: 24px !important;
    padding-bottom: 16px !important;
}

.wc-block-cart-item__image {
    width: 84px;
}

.wc-block-cart-item__image a,
.wc-block-cart-item__image img {
    display: block;
    width: inherit;
    height: 56px;
    border-radius: 8px;
}

.wc-block-cart-item__image img {
    object-fit: cover;
    object-position: center;
}

.wc-block-cart-item__product {
    width: 100%;
}

.wc-block-components-product-name {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    line-height: 1.2 !important;
    color: var(--primary) !important;
}

.wc-block-components-product-name::before {
    content: '' !important;
    width: 18px !important;
    height: 18px !important;
    background-image: url("../img/icons/book.svg") !important;
    background-size: auto !important;
    background-position: top !important;
    background-repeat: no-repeat !important;
    flex: 1 0 auto;
}

.wc-block-cart-item__prices .price span {
    line-height: 1 !important;
    background-color: var(--secondary);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--default-border-radius);
}

.wc-block-components-product-price__value {
    float: left;
}

.wc-block-cart-item__quantity {
    padding-right: 0 !important;
}

.wc-block-cart-item__remove-link {
    float: right !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 0 !important;
    background-image: url("../img/icons/cart-delete.svg") !important;
    background-size: auto !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.wc-block-mini-cart__footer {
    padding: 1.5rem 1.5rem 2rem 1.5rem !important;
}

.wc-block-mini-cart__footer::after {
    margin: 0 1.5rem;
    border-color: var(--primary) !important;
    opacity: 1 !important;
}

.wc-block-mini-cart__footer .wc-block-formatted-money-amount,
.wc-block-mini-cart__footer .wc-block-components-totals-item__label::after {
    font-size: 1.5rem;
    font-family: Prata, sans-serif;
    font-weight: 400;
    line-height: 1;
    color: var(--primary);
}

.wc-block-mini-cart__footer-actions a {
    min-height: 0 !important;
    padding: 8px 0;
    border-radius: 1.5rem;
    box-shadow: inset 0 0 0 1px var(--primary) !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
    color: var(--primary) !important;
}

.wc-block-mini-cart__footer-actions a:hover {
    background-color: var(--primary) !important;
    color: var(--white-ish) !important;
}

.wc-block-mini-cart__footer-actions .wc-block-components-button__text {
    color: inherit !important;
}

.wp-block-woocommerce-mini-cart-contents .wc-block-components-totals-item__label {
    font-size: 0;
}

.wp-block-woocommerce-mini-cart-contents .wc-block-components-totals-item__label::after {
    content: "Итого";
}

.woocommerce-form-coupon {
    display: none;
}

.wc-block-mini-cart__empty-cart-wrapper p {
    font-size: 1.5rem;
    font-family: Prata, sans-serif;
    font-weight: 400;
    line-height: 1;
    color: var(--primary);
}

h1.wp-block-heading {
    font-size: 2rem;
    font-family: Prata, sans-serif;
    font-weight: 400;
    line-height: 1;
    margin: 0;
    padding-bottom: 1.5rem;
}

h1.wp-block-heading.border-bottom-blue {
    border-bottom: 1px solid var(--primary);
}

h2.wp-block-heading {
    margin-bottom: 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--primary);
}

h4.wp-block-heading {
    font-size: 1rem;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
    margin: 0;
}

figure.wp-block-image {
    margin-bottom: 0;
}

blockquote.wp-block-quote {
    padding: 0;
    margin: 0;
    font-style: italic;
    font-size: 1.5rem;
    line-height: 1.3;
}

.jb-pagination:last-child {
    margin-bottom: 0;
}

.nice-select {
    float: none;
}

.jb-settings__input-container .nice-select {
    flex-grow: 1;
}

.woocommerce-checkout #customer_details,
.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-totals-block,
.woocommerce-checkout .wc-block-components-order-summary-item__individual-price,
.woocommerce-checkout .woocommerce-order-details,
.woocommerce-checkout .woocommerce-customer-details {
    display: none;
}

.wp-block-woocommerce-mini-cart-contents * {
    outline: 0;
}

#block-7.widget_block {
    display: none;
}

html:not(:has(.admin-bar)) * {
    user-select: none;
}

html:not(:has(.admin-bar)) img {
    pointer-events: none;
}

.jb-post,
.page-template-page-only-content:not(.woocommerce-checkout) .jb-main {
    font-size: 20px;
}

.jb-post p,
.jb-post details,
.jb-post summary,
.jb-post div {
    font-size: inherit;
}

.jb-post details p {
    margin: 20px 0;
}

.has-inter-font-family {
    font-family: "Inter", "sans-serif";
}

.has-cardo-font-family {
    font-family: "Cardo", "sans-serif";
}

.jb-favorite--updating-to-on svg path {
    animation: favorite-on;
    animation-duration: 0.75s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

@keyframes favorite-on {
    0% {
        stroke: #F1F0E6;
        fill: transparent;
    }

    50% {
        stroke: #DDBD93;
        fill: #DDBD93;
    }

    100% {
        stroke: #F1F0E6;
        fill: transparent;
    }
}

.jb-favorite--updating-to-off svg path {
    animation: favorite-off;
    animation-duration: 0.75s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

@keyframes favorite-off {
    0% {
        stroke: #DDBD93;
        fill: #DDBD93;
    }

    50% {
        stroke: #F1F0E6;
        fill: transparent;
    }

    100% {
        stroke: #DDBD93;
        fill: #DDBD93;
    }
}

select.jb-select {
    background-color: #F1F0E6;
    border-radius: 0.5rem;
    border: 1px solid rgba(52, 53, 121, 0.3);
    box-sizing: border-box;
    clear: both;
    cursor: pointer;
    display: block;
    float: left;
    font-family: inherit;
    font-size: 16px;
    font-weight: normal;
    height: 38px;
    line-height: 36px;
    outline: none;
    padding-left: 18px;
    padding-right: 30px;
    position: relative;
    text-align: left !important;
    transition: all .2s ease-in-out;
    user-select: none;
    white-space: nowrap;
    width: 100%;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

@media (min-width: 1200px) {
    select.jb-select {
        width: auto;
    }

    select.jb-select--full-width {
        width: 100%;
    }
}

.jb-main ul[class=''],
.jb-main ul.wp-block-list,
.jb-main ol[class=''],
.jb-main ol.wp-block-list {
    padding-left: 40px;
}

.jb-main ul[class=''],
.jb-main ul.wp-block-list {
    list-style: disc;
}

.jb-main ol[class=''],
.jb-main ol.wp-block-list {
    list-style: decimal;
}

.woocommerce-error, .woocommerce-info, .woocommerce-message {
    border-radius: 1rem;
    border: 1px solid rgba(52, 53, 121, 0.3);
    height: max-content;
    background: transparent;
}

.woocommerce-error:focus-visible,
.woocommerce-info:focus-visible,
.woocommerce-message:focus-visible {
    outline: 0;
}

#cookie-notice {
    display: none;
    justify-content: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: var(--primary);
    z-index: 9999;
    opacity: 0.95;
}

#cookie-notice .jb-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 2.0625rem;
    padding: 24px 0;
}

@media (max-width: 1200px) {
    #cookie-notice .jb-container {
        margin: 0 4.5625rem;
    }
}

@media (max-width: 768px) {
    #cookie-notice .jb-container {
        flex-direction: column;
        margin: 0;
        padding: 24px 1.25rem;
    }
}

#cookie-notice p {
    color: var(--white-ish);
}

#cookie-notice button {
    width: auto;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    #cookie-notice button {
        width: 100%;
    }
}

.jb-header__banner--secondary .jb-header__banner-info {
    font-size: 20px;
}

@media (max-width: 768px) {
    .jb-header__banner--secondary .jb-header__banner-info {
        font-size: 16px;
    }
}

.closed .comment-emoji,
.closed .post-reaction {
    pointer-events: none !important;
}

.lost_reset_password {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
}

body:has(.jb-post__content.dark-theme) .jb-header__with-actions .jb-button--back:before {
    background-image: url("../img/icons/button-arrow-white.svg");
}

body:has(.jb-post__content.dark-theme) .jb-header__with-actions .jb-button--back:hover:before {
    background-image: url("../img/icons/button-arrow.svg");
}

/* #jb-scroll-to-top {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    border-radius: 64px;
    background-color: var(--primary);
    outline: 1px solid var(--white-ish);
    position: fixed;
    bottom: calc(var(--cookie-notice-height) + 24px);
    right: 24px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;

    & svg {
        transform: rotate(90deg);
    }

    &.active {
        opacity: 1;
        cursor: pointer;
        pointer-events: auto;
    }
} */

/* ==========================================================================
   Ссылки внутри контента
   Глобальный сброс в _defaults.scss задаёт a { color: inherit; text-decoration: none },
   из-за чего ссылки в тексте ничем не отличались от обычных абзацев.
   :not([class]) отсекает интерфейс темы — у его ссылок всегда есть класс
   (jb-*, wp-block-button__link, menu-item и т.п.).
   ========================================================================== */

.jb-post__content a[href]:not([class]),
.page-template-page-only-content .jb-main__container a[href]:not([class]) {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    text-decoration-color: rgba(52, 53, 121, 0.45);
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.jb-post__content a[href]:not([class]):hover,
.page-template-page-only-content .jb-main__container a[href]:not([class]):hover {
    text-decoration-color: var(--primary);
    /* гасим глобальный a:hover { opacity: 0.8 } */
    opacity: 1;
}

.jb-post__content a[href]:not([class]):focus-visible,
.page-template-page-only-content .jb-main__container a[href]:not([class]):focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Картинка, обёрнутая в ссылку, — не текстовая ссылка: подчёркивание убираем. */
.jb-post__content a[href]:not([class]):has(img),
.page-template-page-only-content .jb-main__container a[href]:not([class]):has(img) {
    text-decoration: none;
}

/* Тёмная тема читалки: фон #1c1c31, синий на нём нечитаем.
   Специфичность (0,4,1) перебивает .jb-post__content.dark-theme * из style.css. */
.jb-post__content.dark-theme a[href]:not([class]) {
    color: var(--secondary);
    text-decoration-color: rgba(221, 189, 147, 0.5);
}

.jb-post__content.dark-theme a[href]:not([class]):hover {
    text-decoration-color: var(--secondary);
}

/* Имя пользователя в шапке личного кабинета стало h1 (раньше div) —
   снимаем дефолтные отступы заголовка, чтобы вёрстка не поехала. */
h1.jb-header__banner-user-name {
    margin: 0;
}
