/* Lenta: feed in social network style */

/* Page background below the top menu (the menu itself has its own white background) */
body {
    background-color: #f0f2f5;
}

.fb-feed {
    --fb-bg: #f0f2f5;
    --fb-card: #ffffff;
    --fb-text: #050505;
    --fb-muted: #65676b;
    --fb-divider: #ced0d4;
    --fb-hover: #f2f2f2;
    --fb-blue: #1877f2;
    --fb-quote-bg: #f0f2f5;

    padding: 0;
}

/* Feed takes the whole standard right column of the site (col-lg-9) */
.fb-feed__column {
    padding: 0;
}

/* Feed filter: title + filter icon, dropdown with checkboxes */
.fb-filter {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 12px;
}

.fb-filter__toggle {
    height: 36px;
    min-width: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    color: #050505;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.fb-filter__toggle:hover {
    background: #f2f2f2;
}

/* Drop-down triangle */
.fb-filter__caret {
    font-size: 12px;
    color: #65676b;
    transition: transform .15s;
}

.fb-filter__toggle[aria-expanded="true"] .fb-filter__caret {
    transform: rotate(180deg);
}

/* Not all sections selected */
.fb-filter__toggle.is-filtered .fb-filter__icon-main {
    color: #1877f2;
}

.fb-filter__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 100;
    min-width: 260px;
    padding: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .2), 0 2px 4px rgba(0, 0, 0, .1);
}

.fb-filter__menu[hidden] {
    display: none;
}

.fb-filter__menu-title {
    padding: 4px 8px 8px;
    color: #65676b;
    font-size: 13px;
    font-weight: 600;
}

.fb-filter__item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 8px;
    border-radius: 6px;
    color: #050505;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.fb-filter__item:hover {
    background: #f2f2f2;
}

.fb-filter__item input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #1877f2;
    cursor: pointer;
}

/* Nothing checked: the feed is not changed until a section is chosen */
.fb-filter__hint {
    padding: 4px 8px 0;
    color: #d93025;
    font-size: 13px;
}

.fb-filter__hint[hidden] {
    display: none;
}

.fb-filter__actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 8px 0;
    border-top: 1px solid #ced0d4;
}

.fb-filter__action {
    flex: 1 1 0;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: #e4e6eb;
    color: #050505;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.fb-filter__action:hover {
    background: #d8dadf;
}

.fb-filter__icon {
    width: 20px;
    text-align: center;
    color: #65676b;
}

#lenta {
    transition: opacity .15s;
}

/* Left column stays in view: it scrolls exactly by its own height, then stops.
   The top offset is calculated in show.html (depends on the column height) */
@media (min-width: 992px) {
    #sidebar {
        position: sticky;
        top: 8px;
        align-self: flex-start;
    }
}

.fb-feed__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fb-text);
    margin: 0 0 12px 4px;
}

/* Card */
.fb-post {
    min-width: 0;
    max-width: 100%;
    background: var(--fb-card);
    border-radius: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    margin-bottom: 16px;
    color: var(--fb-text);
    font-size: 15px;
    line-height: 1.34;
    overflow: hidden;
}

.fb-post a {
    color: inherit;
}

/* Header */
.fb-post__header {
    display: flex;
    align-items: center;
    padding: 12px 16px 0;
}

.fb-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    color: #fff;
    font-size: 18px;
    text-decoration: none !important;
}

.fb-avatar {
    position: relative;
}

.fb-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fb-avatar__letter {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
}

.fb-avatar--news { background: #1877f2; }
.fb-avatar--shop { background: #42b72a; }
.fb-avatar--cadastre { background: #8a5cd6; }
.fb-avatar--catalog { background: #0f8b8d; }

/* User name inside the grey action text (catalog: "Каталог · valis додав(ла) 2 банкноти") */
.fb-post__user {
    color: var(--fb-text) !important;
    font-weight: 600;
}

/* Catalog group of a banknote - link to the group */
.fb-list-item__group {
    display: block;
    color: var(--fb-muted) !important;
}

.fb-list-item__group:hover {
    color: var(--fb-blue) !important;
    text-decoration: underline;
}
.fb-avatar--history { background: #e4a11b; }

/* Pinned card: today in the history calendar */
.fb-post--history .fb-post__header {
    position: relative;
    padding-right: 56px;
}

.fb-post__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #65676b;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fb-post__close:hover {
    background: #f2f2f2;
}

.fb-history-event {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #f0f2f5;
}

.fb-history-event:first-of-type {
    border-top: 0;
}

.fb-history-event__year {
    flex: 0 0 auto;
    min-width: 48px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #fdf1d8;
    color: #9a6a00;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    align-self: flex-start;
}

.fb-history-event__title {
    font-weight: 600;
}

.fb-history-event__title:hover,
.fb-history-event__more:hover {
    text-decoration: underline;
}

.fb-history-event__text {
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.4;
    color: #050505;
    overflow-wrap: anywhere;
}

.fb-history-event__text p,
.fb-history-event__text ul,
.fb-history-event__text ol {
    margin: 0 0 .5em;
}

/* Site styles shrink every <p> (p { font-size: .66em }) - keep the card font size */
.fb-post p,
.fb-post li {
    font-size: inherit;
    line-height: inherit;
}

.fb-history-event__text > :last-child {
    margin-bottom: 0;
}

.fb-history-event__text a {
    color: #1877f2;
}

/* Three lines, fading out */
/* Collapsed texts: history event - 3 lines, news - 10 lines; fade only when text is longer */
.js-collapsible.is-collapsed {
    overflow: hidden;
}

.fb-history-event__text.is-collapsed {
    max-height: calc(1.4em * 3);
}

.js-collapsible.is-collapsed.is-overflowing {
    /* Fade only the last visible line */
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.4em), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 1.4em), transparent);
}

/* News: 10 lines, the first picture on the right */
.fb-news__text {
    line-height: 1.4;
}

.fb-news__text.is-collapsed {
    max-height: calc(1.4em * 10);
}

.fb-news__text::after {
    content: "";
    display: block;
    clear: both;
}

.fb-news__image {
    float: right;
    max-width: 40%;
    margin: 0 0 8px 16px;
    cursor: zoom-in;
}

.fb-news__image img {
    max-width: 100%;
    /* Fits into the 10 collapsed lines together with the bottom margin */
    max-height: calc(1.4em * 10 - 8px);
    border-radius: 6px;
}

/* Other pictures of the news - under the text, shown by "Read more" */
.fb-news__gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.fb-news__gallery[hidden] {
    display: none;
}

.fb-news__gallery a {
    display: block;
    cursor: zoom-in;
}

.fb-news__gallery img {
    height: 160px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
}

@media (max-width: 575px) {
    .fb-news__image {
        float: none;
        display: block;
        max-width: 100%;
        margin: 0 0 8px;
        text-align: center;
    }
}

.fb-history-event__more {
    border: 0;
    background: none;
    padding: 0;
    margin-top: 2px;
    color: #65676b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.fb-history-event__more[hidden] {
    display: none;
}

.fb-post__meta {
    min-width: 0;
}

.fb-post__author {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.33;
}

.fb-post__author a:hover,
.fb-post__sub a:hover,
.fb-post__title:hover {
    text-decoration: underline;
}

.fb-post__arrow {
    color: var(--fb-muted);
    font-size: 12px;
    margin: 0 2px;
}

.fb-post__action {
    font-weight: 400;
    color: var(--fb-muted);
}

.fb-post__sub {
    font-size: 13px;
    color: var(--fb-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fb-post__sub a {
    color: var(--fb-muted);
}

.fb-post__sub .fa-clock {
    font-size: 11px;
}

/* Body */
.fb-post__body {
    padding: 4px 16px 12px;
    margin-top: 8px;
}

.fb-post__title {
    display: block;
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 4px;
}

.fb-post__text {
    overflow-wrap: anywhere;
}

.fb-post__text img {
    max-width: 100%;
    height: auto;
}

.fb-post__text img.forum-smile {
    vertical-align: middle;
    max-height: 24px;
}

.fb-post__text .forum-quote {
    background: var(--fb-quote-bg);
    border: 0 !important;
    border-left: 3px solid var(--fb-divider) !important;
    border-radius: 0 8px 8px 0;
    padding: 8px 12px !important;
    margin: 4px 0 !important;
    color: var(--fb-text) !important;
    font-size: 14px;
}

.fb-post__text .forum-code pre {
    background: var(--fb-quote-bg);
    border: 0 !important;
    white-space: pre-wrap;
    font-size: 13px;
}

.fb-post__text a {
    color: var(--fb-blue);
}

/* Media: full width */
.fb-media {
    display: grid;
    gap: 2px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.fb-media--count-1 {
    grid-template-columns: minmax(0, 1fr);
}

.fb-media--count-3 .fb-media__cell:first-child {
    grid-column: 1 / 3;
}

.fb-media__cell {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: zoom-in;
}

.fb-media--count-3 .fb-media__cell:first-child {
    aspect-ratio: 2 / 1;
}

.fb-media__cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .15s;
}

.fb-media__cell:hover img {
    opacity: .9;
}

/* Single image: whole picture, not cropped */
.fb-media--count-1 .fb-media__cell {
    aspect-ratio: auto;
    text-align: center;
}

.fb-media--count-1 .fb-media__cell img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 500px;
}

/* Banknotes must not be cropped: cell takes the picture height */
.fb-media--contain {
    align-items: center;
}

.fb-media--contain .fb-media__cell,
.fb-media--contain.fb-media--count-3 .fb-media__cell:first-child {
    aspect-ratio: auto;
}

.fb-media--contain .fb-media__cell img {
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.fb-media__more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-file {
    display: block;
    margin: 0 16px 8px;
    padding: 8px 12px;
    background: var(--fb-bg);
    border-radius: 8px;
    color: var(--fb-text) !important;
    font-size: 14px;
}

/* Site buttons (btn-main btn-dark-blue / btn-success) inside the feed: readable size */
.fb-post .btn-main,
.fb-modal .btn-main {
    font-size: 14px;
    padding: 6px 14px;
    border-radius: .18rem;
    text-decoration: none !important;
}

/* "Buy" in the action bar of a single shop item */
.fb-buy {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px 8px;
}

/* Lists inside one card: banknotes of one user, shop novelties */
.fb-list-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid var(--fb-bg);
}

.fb-list-item:first-child {
    border-top: 0;
}

.fb-list-item__images {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
}

.fb-list-item__images a {
    display: block;
    cursor: zoom-in;
}

.fb-list-item__images img {
    height: 80px;
    max-width: 160px;
    object-fit: contain;
    border-radius: 4px;
}

.fb-list-item__info {
    min-width: 0;
}

.fb-list-item__title {
    font-weight: 600;
}

.fb-list-item__title:hover {
    text-decoration: underline;
}

.fb-list-item__info {
    flex: 1 1 auto;
}

.fb-list-item__price {
    font-weight: 700;
    margin-top: 2px;
}

.fb-list-item__buy {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.fb-list-item__date {
    font-size: 13px;
    color: var(--fb-muted);
}

@media (max-width: 575px) {
    .fb-list-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Replies to the first post of a topic - as comments */
.fb-comments {
    margin: 0 16px;
    padding: 8px 0 12px;
    border-top: 1px solid var(--fb-divider);
}

.fb-comment {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.fb-avatar--small {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin-right: 0;
    font-size: 14px;
}

.fb-comment__main {
    min-width: 0;
    flex: 1 1 auto;
}

.fb-comment__bubble {
    display: inline-block;
    max-width: 100%;
    background: var(--fb-bg);
    border-radius: 18px;
    padding: 8px 12px;
}

.fb-comment__author {
    display: block;
    font-weight: 600;
    font-size: 13px;
}

.fb-comment__author:hover,
.fb-comment__meta a:hover {
    text-decoration: underline;
}

.fb-comment__text {
    font-size: 15px;
}

.fb-comment__images {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.fb-comment__images a {
    display: block;
    cursor: zoom-in;
}

.fb-comment__images img {
    height: 120px;
    max-width: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.fb-file--comment {
    display: inline-block;
    margin: 4px 0 0;
}

.fb-comment__meta {
    margin: 2px 0 0 12px;
    font-size: 12px;
    color: var(--fb-muted);
}

.fb-comment__meta a {
    color: var(--fb-muted) !important;
    font-weight: 600;
}

/* Actions */
.fb-post__actions {
    display: flex;
    margin: 0 16px;
    padding: 4px 0;
    border-top: 1px solid var(--fb-divider);
}

.fb-action {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 4px;
    border-radius: 4px;
    color: var(--fb-muted) !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    white-space: nowrap;
}

a.fb-action:hover {
    background: var(--fb-hover);
}

.fb-action--price {
    color: var(--fb-text) !important;
    font-size: 17px;
}

.fb-feed__loader,
.fb-feed__empty {
    text-align: center;
    color: var(--fb-muted);
    padding: 16px;
}

@media (max-width: 575px) {

    .fb-feed__column {
        padding: 0;
    }

    .fb-post {
        border-radius: 0;
        margin-bottom: 8px;
    }

    .fb-action {
        font-size: 14px;
    }
}

/* Lightbox */
.fb-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, .9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-lightbox[hidden] {
    display: none;
}

.fb-lightbox__img {
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 80px);
    object-fit: contain;
    box-shadow: 0 0 24px rgba(0, 0, 0, .5);
    background: #fff;
}

.fb-lightbox__btn {
    position: absolute;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fb-lightbox__btn:hover {
    background: rgba(255, 255, 255, .3);
}

.fb-lightbox__btn[hidden] {
    display: none;
}

.fb-lightbox__close { top: 16px; right: 16px; }
.fb-lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.fb-lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

.fb-lightbox__counter {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ccc;
    font-size: 14px;
}

@media (max-width: 575px) {
    .fb-lightbox__img {
        max-width: 100vw;
        max-height: calc(100vh - 120px);
    }

    .fb-lightbox__prev,
    .fb-lightbox__next {
        top: auto;
        bottom: 8px;
        transform: none;
    }
}

/* Modal (cart) */
.fb-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(244, 244, 244, .8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.fb-modal[hidden],
.fb-modal [hidden] {
    display: none !important;
}

.fb-modal__dialog {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .2), 0 2px 4px rgba(0, 0, 0, .1);
    color: #050505;
    font-size: 15px;
    line-height: 1.34;
}

.fb-modal__header {
    position: relative;
    padding: 16px 56px;
    text-align: center;
    border-bottom: 1px solid #ced0d4;
}

.fb-modal__title {
    font-size: 20px;
    font-weight: 700;
}

.fb-modal__close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #e4e6eb;
    color: #606770;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fb-modal__close:hover {
    background: #d8dadf;
}

.fb-modal__body {
    padding: 16px;
}

.fb-modal__footer {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.fb-button {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    white-space: nowrap;
}

.fb-button--primary {
    background: #1877f2;
    color: #fff !important;
}

.fb-button--primary:hover {
    background: #166fe5;
}

.fb-button--secondary {
    background: #e4e6eb;
    color: #050505 !important;
}

.fb-button--secondary:hover {
    background: #d8dadf;
}

.fb-cart__loading,
.fb-cart__error {
    text-align: center;
    padding: 16px 0;
    color: #65676b;
}

.fb-cart__error {
    color: #d93025;
}

.fb-cart__added {
    color: #42b72a;
    font-weight: 600;
    margin-bottom: 12px;
}

.fb-cart__item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.fb-cart__image {
    flex: 0 0 120px;
    width: 120px;
    max-height: 90px;
    object-fit: contain;
    border-radius: 4px;
}

.fb-cart__name {
    font-weight: 600;
}

.fb-cart__price {
    font-size: 17px;
    font-weight: 700;
    margin-top: 4px;
}

.fb-cart__amount {
    color: #65676b;
    font-size: 13px;
    margin-top: 2px;
}

.fb-cart__info {
    min-width: 0;
}

.fb-cart__name {
    display: block;
    color: #050505 !important;
}

/* Quantity controls */
.fb-qty {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

.fb-qty__btn,
.fb-qty__remove {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #e4e6eb;
    color: #050505;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fb-qty__btn:hover:not(:disabled),
.fb-qty__remove:hover:not(:disabled) {
    background: #d8dadf;
}

.fb-qty__btn:disabled,
.fb-qty__remove:disabled {
    opacity: .4;
    cursor: default;
}

.fb-qty__remove {
    background: transparent;
    color: #65676b;
    font-size: 14px;
    margin-left: 4px;
}

.fb-qty__remove:hover:not(:disabled) {
    color: #d93025;
}

.fb-qty__value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

/* Previously added items */
.fb-cart__list-title {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #ced0d4;
    color: #65676b;
    font-size: 13px;
    font-weight: 600;
}

.fb-cart__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
}

.fb-cart__row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 14px;
}

.fb-cart__row:last-child {
    border-bottom: 0;
}

.fb-cart__row-name {
    flex: 1 1 auto;
    min-width: 0;
    color: #050505 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-cart__row .fb-qty {
    margin-top: 0;
    flex: 0 0 auto;
}

.fb-cart__row-sum {
    flex: 0 0 auto;
    min-width: 80px;
    text-align: right;
    font-weight: 600;
}

.fb-cart__empty {
    text-align: center;
    color: #65676b;
    padding: 16px 0;
}

.fb-cart__total {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #ced0d4;
}

@media (max-width: 575px) {
    .fb-modal {
        padding: 8px;
    }

    .fb-modal__footer {
        flex-direction: column-reverse;
    }

    .fb-cart__row {
        flex-wrap: wrap;
    }

    .fb-cart__row-name {
        flex-basis: 100%;
        white-space: normal;
    }

    .fb-cart__row-sum {
        margin-left: auto;
    }
}

/* User card at the top of the left column: data of the personal cabinet's first block, compact layout */
.lenta-user .card-header h5 a {
    color: inherit;
    background: transparent !important;
}

.lenta-user .card-header h5 a:hover {
    text-decoration: underline;
}

.lenta-user__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
}

.lenta-user__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lenta-user__avatar {
    flex: 0 0 64px;
}

.lenta-user__avatar img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: .18rem;
    border: 1px solid rgba(0, 0, 0, .125);
}

.lenta-user__who {
    min-width: 0;
}

.lenta-user__name {
    display: block;
    color: #212529 !important;
    font-weight: 700;
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lenta-user__since {
    color: #696969;
    font-size: 13px;
}

/* Balance (click - top-up form) above trust and reputation.
   Big icon and small value; on hover the icon gets smaller and the value bigger */
.lenta-user__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid rgba(0, 0, 0, .125);
}

.lenta-user__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 58px;
    padding: 0 2px;
    color: #3c6690 !important;
    text-decoration: none !important;
    font-variant-numeric: tabular-nums;
}

.lenta-user__stat + .lenta-user__stat {
    border-left: 1px solid rgba(0, 0, 0, .125);
}

.lenta-user__stat--balance {
    grid-column: 1 / -1;
    border-bottom: 1px solid rgba(0, 0, 0, .125);
}

/* The tile after the balance starts a new row - no left border */
.lenta-user__stat--balance + .lenta-user__stat {
    border-left: 0;
}

.lenta-user__stat:hover,
.lenta-user__stat:focus-visible {
    background: #3c669012;
}

.lenta-user__stat-icon {
    font-size: 24px;
    line-height: 1;
    transition: font-size .15s;
}

.lenta-user__value {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    transition: font-size .15s;
}

.lenta-user__stat:hover .lenta-user__stat-icon,
.lenta-user__stat:focus-visible .lenta-user__stat-icon {
    font-size: 16px;
}

.lenta-user__stat:hover .lenta-user__value,
.lenta-user__stat:focus-visible .lenta-user__value {
    font-size: 18px;
}

@media (prefers-reduced-motion: reduce) {
    .lenta-user__stat-icon,
    .lenta-user__value {
        transition: none;
    }
}

/* Signature: two lines, the whole text by click */
.lenta-user__sig {
    border-top: 1px solid #e9ecef;
    padding-top: 8px;
    color: #696969;
    font-size: 13px;
    font-style: italic;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.lenta-user__sig.is-open {
    -webkit-line-clamp: unset;
}

.lenta-user__sig.is-short {
    cursor: default;
}

.lenta-user__sig a {
    color: #3c6690;
}

.lenta-user__sig img {
    max-height: 1.4em;
    vertical-align: middle;
}

/* Quick links: big icons; on hover the icon gets smaller and the caption appears */
.lenta-user__links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    border-top: 1px solid #e9ecef;
    padding-top: 8px;
}

.lenta-user__links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 46px;
    color: #3c6690 !important;
    text-decoration: none !important;
}

.lenta-user__icon {
    position: relative;
    font-size: 24px;
    line-height: 1;
    transition: font-size .15s;
}

.lenta-user__caption {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    transition: max-height .15s, opacity .15s;
}

.lenta-user__links a:hover .lenta-user__icon,
.lenta-user__links a:focus-visible .lenta-user__icon {
    font-size: 16px;
}

.lenta-user__links a:hover .lenta-user__caption,
.lenta-user__links a:focus-visible .lenta-user__caption {
    max-height: 16px;
    opacity: 1;
    margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .lenta-user__icon,
    .lenta-user__caption {
        transition: none;
    }
}

.lenta-user__badge {
    position: absolute;
    top: -6px;
    left: 70%;
    min-width: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

/* Language selector: under trust/reputation in the profile card, a separate block for guests */
.lenta-user__lang {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #3c6690;
}

.lenta-user__lang .fa-solid {
    /* Same size as the other icons of the card (balance, trust, reputation, quick links) */
    font-size: 24px;
}

.lenta-lang {
    flex: 1 1 auto;
    min-width: 0;
    height: 30px;
    padding: 0 6px;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: .18rem;
    background: #fff;
    color: #212529;
    font-size: 14px;
    cursor: pointer;
}

.lenta-language__body {
    padding: 12px;
}

/* Footer links moved to the left column (the footer is hidden on the feed page) */
.lenta-links__copyright {
    padding: 4px 4px 12px;
    color: #696969;
    font-size: 13px;
    text-align: center;
}

/* Social networks: a usual left column block (grey header, card body);
   tab icons and the QR code of the chosen network inside */
.lenta-social__tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 8px 6px;
}

.lenta-social__tab {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: .45;
    transition: opacity .15s, box-shadow .15s;
}

.lenta-social__tab--telegram { background: #229ed9; }
.lenta-social__tab--facebook { background: #1877f2; }
.lenta-social__tab--youtube  { background: #ff0000; }

.lenta-social__tab:hover {
    opacity: .8;
}

.lenta-social__tab.is-active {
    opacity: 1;
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(0, 0, 0, .25);
}

.lenta-social__tab:focus-visible {
    outline: 2px solid #3c6690;
    outline-offset: 3px;
}

.lenta-social__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 8px 12px;
}

.lenta-social__panel[hidden] {
    display: none;
}

.lenta-social__title {
    color: #3c6690 !important;
    font-size: 15px;
}

.lenta-social__title:hover {
    text-decoration: underline;
}

.lenta-social__panel img {
    display: block;
    width: 165px;
    height: 165px;
    max-width: 100%;
}

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

/* Registration form for guests at the top of the left column */
.lenta-register__body {
    padding: 12px;
}

.lenta-register__body form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lenta-register__body label {
    margin: 6px 0 0;
    color: #696969;
    font-size: 13px;
}

.lenta-register__body .form-control {
    height: 34px;
    font-size: 14px;
}

/* The captcha writes the number in words - the picture keeps its own proportions, the field is under it */
.lenta-register__captcha {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lenta-register__captcha img {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, .125);
}

.lenta-register .lenta-register__rules {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
    line-height: 1.3;
}

.lenta-register__rules input {
    margin-top: 2px;
}

.lenta-register__rules a {
    color: #3c6690;
    text-decoration: underline;
}

.lenta-register__rules-text {
    margin: 4px 0 0;
    padding: 6px 8px 6px 22px;
    background: #f8f9fa;
    color: #696969;
    font-size: 12px;
    line-height: 1.35;
}

.lenta-register__rules-text[hidden] {
    display: none;
}

.lenta-register__submit {
    margin-top: 10px;
    font-size: 14px !important;
    padding: 6px 12px !important;
}

.lenta-register__login {
    margin-top: 6px;
    text-align: center;
    color: #696969;
    font-size: 13px;
}

.lenta-register__login a {
    color: #3c6690;
}

/* Small link to the personal cabinet under "В БК ..." */
.lenta-user__public {
    display: inline-block;
    color: #3c6690 !important;
    font-size: 12px;
}

.lenta-user__public:hover {
    text-decoration: underline;
}
