/* "Мои коллекции" window (brandbook 8.3, 8.9): main page (in place of the feed) and the user profile.
   Pages and templates - js/vue-libs/pages/user/collections.js, views/User/Profile/collections.html.
   The shell (shadow, roll-out animation) is set by the page: .lenta-collections (lenta.css), .user-full__wrapper (profile) */
.collections-page {
    --lc-accent: #3c6690;
    --lc-accent-soft: #3c669014;
    --lc-border: #edf0f3;

    position: relative;
    background: #ffffff;
    overflow: hidden;
}

/* Shell in the user profile: the section frame becomes the raised window (brandbook 6) */
.user-full .user-full__wrapper:has(> .collections-page) {
    border-color: transparent;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, .12),
        0 4px 12px rgba(60, 102, 144, .15);
}

/* Paddings as in the feed cards: 16px at the sides, 12px top/bottom, 12px between parts */

/* Header: accent gradient, white text; "back" arrow on the left */
.collections-page .vue-main-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0 !important;
    padding: 8px 16px;
    border: 0 !important;
    background: linear-gradient(120deg, #2b4763 0%, #3c6690 55%, #5b8bbb 100%);
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}

.collections-page .vue-main-title a.text-secondary {
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin: 0 8px 0 -4px !important;
    color: #ffffffcc !important;
    transition: background-color .15s, color .15s, transform .15s;
}

.collections-page .vue-main-title a.text-secondary:hover,
.collections-page .vue-main-title a.text-secondary:focus-visible {
    background: #ffffff26;
    color: #ffffff !important;
    transform: translateX(-2px);
}

/* "Add collection" in the header (on the gradient): translucent white button on the right; icon only on narrow screens */
.collections-page .collections-add-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid #ffffff59;
    border-radius: 4px;
    background: #ffffff1a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}

.collections-page .collections-add-button:hover,
.collections-page .collections-add-button:focus-visible {
    background: #ffffff33;
    border-color: #ffffffb3;
    outline: 0;
}

@media (max-width: 420px) {
    .collections-page .collections-add-button span {
        display: none;
    }
}

/* Several actions in the header: the main one with text, the rest - icons of the same height (brandbook 8.3) */
.collections-page .collections-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.collections-page .collections-header-actions .collections-add-button {
    margin-left: 0;
}
.collections-page .collections-icon-button {
    justify-content: center;
    min-width: 30px;
    padding-left: 8px;
    padding-right: 8px;
}

/* The just created collection: the tile flashes with the accent */
.collections-page .user-collection-tile.is-new {
    animation: collections-row .35s ease-out both, collections-row-new 2s ease-out .35s;
}

@keyframes collections-row-new {
    from { background-color: #3c669033; }
    to { background-color: transparent; }
}

/* "New collection" modal: name and the visibility choice; choice cards (with a hint) are shared with the "remove" modal */
.collection-create-form {
    display: flex;
    flex-direction: column;
}

.collection-create-label {
    margin: 0 0 4px;
    color: #6c757d;
    font-size: 13px;
}

.collection-create-form .form-control {
    margin-bottom: 16px;
}

/* .collection-choice (choice cards) - in styles/collection-item.css: the wizard uses them too */

/* Row menu button (burger): muted, blue on hover / while the menu is open; with a mouse - only on row hover */
.collections-page .user-collection-menu-button {
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #adb5bd;
    font-size: 15px;
    cursor: pointer;
    transition: background-color .15s, color .15s, opacity .15s;
}

.collections-page .user-collection-menu-button:hover,
.collections-page .user-collection-menu-button:focus-visible,
.collections-page .user-collection-menu-button.is-active {
    background: var(--lc-accent-soft);
    color: var(--lc-accent);
    outline: 0;
}

@media (hover: hover) {
    .collections-page .user-collection-menu-button {
        opacity: 0;
    }

    .collections-page .user-collection-tile:hover .user-collection-menu-button,
    .collections-page .collection-item-row:hover .user-collection-menu-button,
    .collections-page .user-collection-menu-button:focus-visible,
    .collections-page .user-collection-menu-button.is-active {
        opacity: 1;
    }
}

/* Row menu (in body, position: fixed next to the button); items - buttons and links ("Open in the catalog") */
.collection-row-menu {
    position: fixed;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    min-width: 180px;
    padding: 4px 0;
    background: #ffffff;
    border: 1px solid #e9ecef;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, .12),
        0 4px 12px rgba(60, 102, 144, .15);
}

.collection-row-menu button,
.collection-row-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 16px;
    border: 0;
    background: transparent;
    color: #212529;
    font-size: 15px;
    text-align: left;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

.collection-row-menu button .fa-solid,
.collection-row-menu a .fa-solid {
    width: 16px;
    color: #3c6690;
    text-align: center;
}

.collection-row-menu button:hover,
.collection-row-menu button:focus-visible,
.collection-row-menu a:hover,
.collection-row-menu a:focus-visible {
    color: #212529;
    text-decoration: none;
    background: #3c669014;
    outline: 0;
}

.collection-row-menu button.is-danger,
.collection-row-menu button.is-danger .fa-solid {
    color: #dc3545;
}

.collection-row-menu button.is-danger:hover,
.collection-row-menu button.is-danger:focus-visible {
    background: #dc35450f;
}

.collection-row-menu button:disabled {
    opacity: .5;
    cursor: default;
}

.collection-row-menu button:disabled:hover {
    background: transparent;
}

.collection-row-menu-enter-active,
.collection-row-menu-leave-active {
    transition: opacity .15s ease, transform .15s ease;
}

.collection-row-menu-enter-from,
.collection-row-menu-leave-to {
    opacity: 0;
    transform: translateY(-4px);
}

/* the "default" badge does not run into the stats on narrow screens */
.collections-page .user-collection-name .badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* "Remove collection" modal */
.collection-remove-name {
    margin-bottom: 8px;
    font-size: 17px;
    font-weight: 600;
}

.collection-remove-text {
    margin-bottom: 12px;
    color: #6c757d;
    font-size: 13px;
}

.collection-remove-text b {
    color: #212529;
}

.collection-remove-target {
    margin-top: 6px;
    max-width: 100%;
}

/* "Clear collection": warning about the irreversible removal */
.collection-clear-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: #fcecee;
    box-shadow: inset 3px 0 0 #dc3545;
    color: #b02a37;
    font-size: 14px;
}

.collection-clear-warning .fa-solid {
    margin-top: 3px;
}

/* footers of the create / remove modals: buttons at the right, "Cancel" first, the main action the last (brandbook 8.11), 13px */
.collection-create-modal .v-modal-footer,
.collection-remove-modal .v-modal-footer {
    flex-wrap: wrap;
    gap: 8px;
}

.collection-remove-modal .v-modal-footer .btn-main {
    white-space: nowrap;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
}

/* the action keeps its text on every width (the site-wide rule hides it below 768px): same height as "Cancel" */
.collection-remove-modal .vue-query-button span {
    display: inline;
}

/* Collections list - tiles (brandbook 8.9): a grid of tiles from 260px, 12px between them, the window paddings 16px;
   on the phone - one tile in a row */
.collections-page .user-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding: 16px;
}

.collections-page .user-collection-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 12px 16px 16px;
    border: 1px solid #e9ecef;
    background: #ffffff;
    color: inherit;
    text-align: left;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
    animation: collections-row .35s ease-out both;
}

/* the accent strip at the left slides in on hover (as the big list rows) */
.collections-page .user-collection-tile::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    bottom: -1px;
    width: 3px;
    background: var(--lc-accent);
    transform: scaleY(0);
    transition: transform .2s ease-in-out;
}

.collections-page a.user-collection-tile:hover,
.collections-page a.user-collection-tile:focus-visible,
.collections-page button.user-collection-tile:hover,
.collections-page button.user-collection-tile:focus-visible {
    border-color: #3c669033;
    background: var(--lc-accent-soft);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, .12),
        0 4px 12px rgba(60, 102, 144, .15);
    color: inherit;
    text-decoration: none;
    outline: 0;
}

.collections-page a.user-collection-tile:hover::before,
.collections-page a.user-collection-tile:focus-visible::before {
    transform: scaleY(1);
}

.collections-page .user-collection-tile__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* the section icon in the plate 40x40 (brandbook 7, 8.9) */
.collections-page .user-collection-tile__icon {
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--lc-accent-soft);
    color: var(--lc-accent);
    font-size: 18px;
    transition: transform .15s ease;
}

.collections-page a.user-collection-tile:hover .user-collection-tile__icon,
.collections-page button.user-collection-tile:hover .user-collection-tile__icon {
    transform: scale(1.05);
}

.collections-page .user-collection-tile .user-collection-menu-button {
    margin: -4px -8px 0 0;
}

.collections-page .user-collection-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #1c1e21;
}

.collections-page .user-collection-tile.is-disabled .user-collection-name,
.collections-page .user-collection-tile.is-disabled .user-collection-tile__icon {
    opacity: .6;
}

/* visibility 13px muted, the status labels after it (brandbook 8.15) */
.collections-page .user-collection-tile__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    color: #65676b;
    font-size: 13px;
    line-height: 1.34;
}

.collections-page .user-collection-tile__meta .bk-status-label {
    margin-left: 0;
}

/* stats: three plates in a row at the bottom of the tile */
.collections-page .user-collection-tile__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.collections-page .user-collection-stat {
    min-width: 0;
    padding: 4px;
    border-radius: 8px;
    background: #f5f7fa;
    text-align: center;
}

.collections-page .user-collection-stat > div {
    font-size: 17px;
    font-weight: 700;
    color: var(--lc-accent);
    line-height: 1.2;
}

.collections-page .user-collection-stat small {
    display: block;
    font-size: 11px;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: .04em;
    overflow-wrap: anywhere;
}

/* "Wanted" - the color of the "wanted" label (brandbook 8.13), none - muted */
.collections-page .user-collection-stat.is-wanted > div {
    color: #e4a11b;
}

.collections-page .user-collection-stat.is-zero > div {
    color: #adb5bd;
}

/* the last tile: a new collection (dashed, as the empty achievement tile 8.52) or the reached limit */
.collections-page .user-collection-tile--add {
    align-items: center;
    justify-content: center;
    min-height: 168px;
    gap: 8px;
    border: 1px dashed #ced4da;
    background: transparent;
    text-align: center;
    cursor: pointer;
}

.collections-page .user-collection-tile--add .user-collection-name {
    color: var(--lc-accent);
}

.collections-page .user-collection-tile__hint {
    color: #65676b;
    font-size: 12px;
}

.collections-page .user-collection-tile--add.is-limit {
    cursor: default;
}

.collections-page .user-collection-tile--add.is-limit .user-collection-tile__icon {
    background: #f1f3f5;
    color: #adb5bd;
}

.collections-page .user-collection-tile--add.is-limit .user-collection-name {
    color: #65676b;
}

/* no collections yet: the text, then the "new collection" tile */
.collections-page .collections-empty + .user-collections-grid {
    padding-top: 0;
}

@media (max-width: 576px) {
    .collections-page .user-collections-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .collections-page .user-collection-tile--add {
        min-height: 0;
        padding: 16px;
    }
}

/* "Мои коллекции" and the collection page - in the profile and on the main page alike (decision 2026-10-28):
   a white header instead of the gradient (8.3): title 17/600, the "back" arrow and the actions in the brand blue */
.collections-page .vue-main-title {
    padding: 12px 16px;
    border-bottom: 1px solid var(--lc-border) !important;
    background: #ffffff;
    color: #1c1e21;
}

.collections-page .vue-main-title a.text-secondary {
    color: var(--lc-accent) !important;
}

.collections-page .vue-main-title a.text-secondary:hover,
.collections-page .vue-main-title a.text-secondary:focus-visible {
    background: var(--lc-accent-soft);
    color: #2b4763 !important;
}

/* the header actions - as the card actions (brandbook 8.10): the main one blue, the icons - with a blue border */
.collections-page .collections-add-button {
    padding: 6px 12px;
    border-color: var(--lc-accent);
    background: var(--lc-accent);
    color: #ffffff;
}

.collections-page .collections-add-button:hover,
.collections-page .collections-add-button:focus-visible {
    border-color: #2b4763;
    background: #2b4763;
    box-shadow: 0 0 5px #3c6690;
}

.collections-page .collections-icon-button {
    background: #ffffff;
    color: var(--lc-accent);
}

.collections-page .collections-icon-button:hover,
.collections-page .collections-icon-button:focus-visible {
    border-color: var(--lc-accent);
    background: var(--lc-accent-soft);
    box-shadow: none;
    color: var(--lc-accent);
}

/* Collection content: rows as the feed lists (8px top/bottom) */
.collections-page .collection-group-title {
    padding: 8px 16px;
    background: #f5f7fa;
    border-bottom: 1px solid var(--lc-border);
    color: #4b5563;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.collections-page .collection-item-row {
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--lc-border);
    font-size: 15px;
    transition: background-color .15s;
}

.collections-page .collection-item-row small {
    font-size: 13px;
}

.collections-page .collection-item-row:hover {
    background: var(--lc-accent-soft);
}

.collections-page .collection-item-image img:not(.no-image) {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
    object-position: center;
    transition: transform .2s;
}

.collections-page .collection-item-row:hover .collection-item-image img:not(.no-image) {
    transform: scale(1.06);
}

/* Catalog obverse and reverse of the banknote: two places of the same size in every row (brandbook 8.13),
   so the column has one width for all the rows; empty places are placeholders */
.collections-page .collection-banknote-scans {
    flex: 0 0 148px;
    display: flex;
    gap: 4px;
}

.collections-page .collection-banknote-scan {
    flex: 0 0 72px;
    width: 72px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.collections-page .collection-banknote-scan img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .2s;
}

.collections-page .collection-item-row:hover .collection-banknote-scan img {
    transform: scale(1.06);
}

.collections-page .collection-banknote-scan.is-empty {
    background: #f5f7fa;
    box-shadow: inset 0 0 0 1px #e9ecef;
    color: #adb5bd;
    font-size: 18px;
}

.collections-page .collection-banknote-count {
    color: #212529;
    font-weight: 600;
}

@media (max-width: 420px) {
    .collections-page .collection-banknote-scans {
        flex-basis: 116px;
    }

    .collections-page .collection-banknote-scan {
        flex-basis: 56px;
        width: 56px;
        height: 38px;
    }
}

.collections-page .collection-item-amount {
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--lc-accent-soft);
    color: var(--lc-accent);
    font-size: 13px;
}

.collections-page > div > .p-3.text-secondary {
    padding: 32px 16px !important;
    text-align: center;
}

/* Items of a banknote in the user collections (modal of the collection page, brandbook 8.13):
   list with two scans of each item -> details of one item. The modal is teleported to body - no .collections-page here */
.collection-banknote-modal .collection-instances {
    display: flex;
    flex-direction: column;
    margin: -4px 0 0;
}

.collection-banknote-modal .collection-instance-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    background: #ffffff;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color .15s;
    animation: collections-row .35s ease-out both;
}

.collection-banknote-modal .collection-instance-row:last-child {
    border-bottom: 0;
}

.collection-banknote-modal .collection-instance-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #3c6690;
    transform: scaleY(0);
    transition: transform .2s;
}

.collection-banknote-modal .collection-instance-row:hover,
.collection-banknote-modal .collection-instance-row:focus-visible {
    background: #3c669014;
    outline: none;
}

.collection-banknote-modal .collection-instance-row:hover::before,
.collection-banknote-modal .collection-instance-row:focus-visible::before {
    transform: scaleY(1);
}

/* a pale short bar on the left of every row, the hover bar slides out over it */
.collection-banknote-modal .collection-instance-row::before {
    z-index: 1;
}

.collection-banknote-modal .collection-instance-row::after {
    content: "";
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 3px;
    background: #3c669059;
}

/* hover: the texts of the row grow by 10% (sizes below are multiplied by --fs) */
.collection-banknote-modal .collection-instance-row:hover,
.collection-banknote-modal .collection-instance-row:focus-visible {
    --fs: 1.1;
}

/* Two scans of a fixed size: the rows are aligned whatever the scans are */
.collection-banknote-modal .collection-instance-scans {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
}

.collection-banknote-modal .collection-instance-scan {
    flex: 0 0 72px;
    width: 72px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.collection-banknote-modal .collection-instance-scan img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.collection-banknote-modal .collection-instance-scan.is-empty {
    background: #f5f7fa;
    box-shadow: inset 0 0 0 1px #e9ecef;
    color: #adb5bd;
    font-size: 18px;
}

.collection-banknote-modal .collection-instance-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.collection-banknote-modal .collection-instance-title {
    font-size: calc(15px * var(--fs, 1));
    transition: font-size .15s;
    font-weight: 600;
    line-height: 1.25;
    color: #1c1e21;
}

.collection-banknote-modal .collection-instance-serial {
    /* moves to the next line as a whole, on the same baseline as the name
       (no overflow: an inline-block with overflow is aligned by its bottom edge) */
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    vertical-align: baseline;
    margin-left: 6px;
    color: #65676b;
    font-size: calc(13px * var(--fs, 1));
    font-weight: 400;
    transition: font-size .15s;
}

/* Condition column on the right: fixed width - the values are aligned in all the rows */
.collection-banknote-modal .collection-instance-grade {
    flex: 0 0 160px;
    width: 160px;
    text-align: right;
    line-height: 1.25;
}

.collection-banknote-modal .collection-instance-grade b {
    color: #1c1e21;
    font-size: calc(15px * var(--fs, 1));
    transition: font-size .15s;
    font-weight: 600;
}

.collection-banknote-modal .collection-instance-grading {
    margin-left: 4px;
    color: #65676b;
    font-size: calc(13px * var(--fs, 1));
    transition: font-size .15s;
}

/* grading company - small, as a note under the grade */
.collection-banknote-modal .collection-instance-company {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #8a8d91;
    font-size: calc(11px * var(--fs, 1));
    transition: font-size .15s;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-banknote-modal .collection-instance-purchase {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #65676b;
    font-size: calc(13px * var(--fs, 1));
    transition: font-size .15s;
}

.collection-banknote-modal .collection-instance-purchase .fa-solid {
    color: #adb5bd;
    font-size: calc(11px * var(--fs, 1));
    transition: font-size .15s;
}

.collection-banknote-modal .collection-item-amount {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 10px;
    background: #3c669014;
    color: #3c6690;
    font-size: calc(13px * var(--fs, 1));
    transition: font-size .15s;
    font-weight: 600;
    white-space: nowrap;
}

.collection-banknote-modal .collection-instance-arrow {
    flex: 0 0 auto;
    color: #adb5bd;
    font-size: 12px;
    transition: transform .15s, color .15s;
}

.collection-banknote-modal .collection-instance-row:hover .collection-instance-arrow {
    color: #3c6690;
    transform: translateX(3px);
}

/* Tabs: the opened collection / the other user collections (only if the banknote is there too) */
.collection-banknote-modal .collection-instance-tabs {
    display: flex;
    gap: 16px;
    margin: -4px 0 8px;
    border-bottom: 1px solid #edf0f3;
}

.collection-banknote-modal .collection-instance-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: -1px;
    padding: 8px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: #65676b;
    font-size: 15px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}

.collection-banknote-modal .collection-instance-tabs button:hover {
    color: #3c6690;
}

.collection-banknote-modal .collection-instance-tabs button.is-active {
    border-bottom-color: #3c6690;
    color: #3c6690;
    font-weight: 600;
}

.collection-banknote-modal .collection-instance-tab-count {
    min-width: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #f5f7fa;
    color: #65676b;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.collection-banknote-modal .collection-instance-tabs button.is-active .collection-instance-tab-count {
    background: #3c669014;
    color: #3c6690;
}

.collection-banknote-modal .collection-instances-empty {
    padding: 32px 16px;
    color: #65676b;
    text-align: center;
}

/* Details of one item */
.collection-banknote-modal .collection-instance-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: none;
    color: #3c6690;
    font-size: 13px;
    cursor: pointer;
}

.collection-banknote-modal .collection-instance-back .fa {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #3c669014;
    font-size: 12px;
    transition: background-color .15s, transform .15s;
}

.collection-banknote-modal .collection-instance-back:hover .fa {
    background: #3c669022;
    transform: translateX(-2px);
}

.collection-banknote-modal .collection-instance-props {
    display: grid;
    grid-template-columns: minmax(120px, max-content) 1fr;
    gap: 8px 16px;
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px solid #edf0f3;
    font-size: 15px;
}

.collection-banknote-modal .collection-instance-props dt {
    padding-top: 2px;
    color: #65676b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.collection-banknote-modal .collection-instance-props dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Values edited in place (brandbook 8.14): look like text with a dashed underline,
   hover - soft accent background, focus - accent underline; after saving - a short green / red flash */
.collection-banknote-modal .collection-instance-props dt label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.collection-banknote-modal .inline-field {
    display: inline-block;
    vertical-align: top;
    /* as wide as the value: only the text is underlined, the row does not look like a form */
    field-sizing: content;
    width: auto;
    min-width: 48px;
    max-width: 100%;
    margin: -2px 0 -2px -6px;
    padding: 2px 6px;
    border: 0;
    border-bottom: 1px dashed #ced4da;
    border-radius: 4px 4px 0 0;
    background: transparent no-repeat right 4px center / 10px 10px;
    color: inherit;
    font: inherit;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}

.collection-banknote-modal .inline-field::placeholder {
    color: #adb5bd;
    opacity: 1;
}

.collection-banknote-modal .inline-field:hover {
    background-color: #3c669014;
    border-bottom-color: #3c6690;
}

.collection-banknote-modal .inline-field:focus {
    outline: none;
    background-color: #ffffff;
    border-bottom: 1px solid #3c6690;
    box-shadow: 0 1px 0 #3c6690;
}

/* select: the arrow appears only on hover / focus */
.collection-banknote-modal select.inline-field {
    padding-right: 20px;
    cursor: pointer;
    text-overflow: ellipsis;
}

.collection-banknote-modal select.inline-field:hover,
.collection-banknote-modal select.inline-field:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 3l4 4 4-4' fill='none' stroke='%233c6690' stroke-width='1.5'/%3E%3C/svg%3E");
}

.collection-banknote-modal .inline-field.is-date {
    min-width: 140px;
}

/* the calendar icon - only on hover / focus */
.collection-banknote-modal .inline-field.is-date::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: pointer;
    transition: opacity .15s;
}

.collection-banknote-modal .inline-field.is-date:hover::-webkit-calendar-picker-indicator,
.collection-banknote-modal .inline-field.is-date:focus::-webkit-calendar-picker-indicator {
    opacity: .6;
}

/* empty date: the browser mask is shown muted */
.collection-banknote-modal .inline-field.is-date.is-empty:not(:focus)::-webkit-datetime-edit {
    color: #adb5bd;
}

.collection-banknote-modal .inline-field.is-text {
    display: block;
    max-width: calc(100% + 6px);
    min-height: 0;
    overflow: hidden;
    resize: none;
    white-space: pre-wrap;
}

/* number fields without spin buttons */
.collection-banknote-modal input.inline-field[type=number] {
    -moz-appearance: textfield;
}

.collection-banknote-modal input.inline-field[type=number]::-webkit-inner-spin-button,
.collection-banknote-modal input.inline-field[type=number]::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.collection-banknote-modal .inline-field:disabled {
    border-bottom-color: transparent;
    background: none;
    color: inherit;
    opacity: 1;
    cursor: default;
}

.collection-banknote-modal .inline-field.is-saving {
    border-bottom-style: solid;
    border-bottom-color: #adb5bd;
}

.collection-banknote-modal .inline-field.is-saved {
    animation: inline-field-saved 1.5s ease-out;
}

.collection-banknote-modal .inline-field.is-error {
    animation: inline-field-error 1.5s ease-out;
}

@keyframes inline-field-saved {
    from {
        background-color: #28a74533;
        border-bottom-color: #28a745;
    }
}

@keyframes inline-field-error {
    from {
        background-color: #dc354533;
        border-bottom-color: #dc3545;
    }
}

/* Tooltip above the saved field: soft green "saved" (1.5s) / soft red error (3s);
   pops up from the field, the icon bounces in after it, leaves upwards */
.collection-banknote-modal .collection-item-details {
    position: relative;
}

.collection-banknote-modal .inline-field-tip {
    --tip-bg: #eaf6ed;
    --tip-border: #28a7454d;
    --tip-color: #1e7e34;

    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 260px;
    margin: -8px 0 0 -6px;
    padding: 4px 10px 4px 8px;
    border: 1px solid var(--tip-border);
    border-radius: 4px;
    background: var(--tip-bg);
    color: var(--tip-color);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    pointer-events: none;
    transform: translateY(-100%);
    transform-origin: 14px 100%;
}

.collection-banknote-modal .inline-field-tip.is-error {
    --tip-bg: #fcecee;
    --tip-border: #dc35454d;
    --tip-color: #b02a37;

    white-space: normal;
}

/* arrow to the field: border + fill */
.collection-banknote-modal .inline-field-tip::before,
.collection-banknote-modal .inline-field-tip::after {
    content: "";
    position: absolute;
    left: 10px;
    border: 5px solid transparent;
    border-bottom: 0;
}

.collection-banknote-modal .inline-field-tip::before {
    bottom: -5px;
    border-top-color: var(--tip-border);
}

.collection-banknote-modal .inline-field-tip::after {
    bottom: -4px;
    border-top-color: var(--tip-bg);
}

.collection-banknote-modal .inline-field-tip i {
    animation: inline-field-tip-icon .4s cubic-bezier(.34, 1.56, .64, 1) .1s both;
}

.inline-field-tip-enter-active {
    animation: inline-field-tip-in .3s cubic-bezier(.34, 1.56, .64, 1);
}

.inline-field-tip-leave-active {
    animation: inline-field-tip-out .25s ease-in forwards;
}

@keyframes inline-field-tip-in {
    from {
        opacity: 0;
        transform: translateY(calc(-100% + 6px)) scale(.9);
    }
    to {
        opacity: 1;
        transform: translateY(-100%) scale(1);
    }
}

@keyframes inline-field-tip-out {
    to {
        opacity: 0;
        transform: translateY(calc(-100% - 6px));
    }
}

@keyframes inline-field-tip-icon {
    from {
        opacity: 0;
        transform: scale(0) rotate(-45deg);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* several values in one row (grade, amount + "pcs", price + currency) */
.collection-banknote-modal .inline-field-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
}

.collection-banknote-modal .inline-field-group > .inline-field {
    margin-left: 0;
}

.collection-banknote-modal .inline-field-group > .inline-field:first-child {
    margin-left: -6px;
}

.collection-banknote-modal .collection-instance-props dd.is-static {
    line-height: 1.4;
}

/* Footer: buttons at the right, "Close" first, the main action the last (brandbook 8.11); 13px (btn-main is 10px by default) */
.collection-banknote-modal .v-modal-footer {
    flex-wrap: wrap;
    gap: 8px;
}

.collection-banknote-modal .v-modal-footer .btn-main {
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
}

.collection-banknote-modal .btn-main.collection-instance-danger,
.collection-remove-modal .btn-main.collection-instance-danger {
    background: #ffffff;
    color: #dc3545;
    box-shadow: inset 0 0 0 1px #dc3545;
    transition: background-color .15s, color .15s;
}

.collection-banknote-modal .btn-main.collection-instance-danger:hover,
.collection-banknote-modal .btn-main.collection-instance-danger.is-solid,
.collection-remove-modal .btn-main.collection-instance-danger:hover,
.collection-remove-modal .btn-main.collection-instance-danger.is-solid {
    background: #dc3545;
    color: #ffffff;
}

/* list <-> details */
.collection-instance-swap-enter-active,
.collection-instance-swap-leave-active {
    transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1);
}

.collection-instance-swap-enter-from {
    opacity: 0;
    transform: translateX(16px);
}

.collection-instance-swap-leave-to {
    opacity: 0;
    transform: translateX(-16px);
}

/* Phone: the modal is a sheet at the bottom of the screen - header and footer stay, only the body scrolls
   (the common v-modal wrapper is 95vh and cut the footer off) */
@media (max-width: 576px) {
    .collection-banknote-modal .v-modal-wrapper {
        display: flex;
        align-items: flex-end;
        max-height: none;
        padding: 0;
        overflow: hidden;
    }

    .collection-banknote-modal .v-modal-content {
        display: flex;
        flex-direction: column;
        min-width: 0;
        max-height: calc(100% - 32px);
        border-radius: 8px 8px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
        transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    }

    .collection-banknote-modal.modal-enter-from .v-modal-content,
    .collection-banknote-modal.modal-leave-to .v-modal-content {
        transform: translateY(32px);
    }

    .collection-banknote-modal .v-modal-header,
    .collection-banknote-modal .v-modal-footer {
        flex: 0 0 auto;
    }

    .collection-banknote-modal .v-modal-header {
        padding: 12px 16px;
        padding-right: 64px;
    }

    .collection-banknote-modal .v-modal-close {
        top: 50%;
        right: 4px;
        transform: translateY(-50%);
    }

    .collection-banknote-modal .v-modal-body {
        flex: 1 1 auto;
        min-height: 0;
        padding: 12px 16px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    /* list: "Close" and "To the catalog" share the first row, the main action takes the whole second one */
    .collection-banknote-modal .v-modal-footer {
        padding: 12px 16px;
    }

    .collection-banknote-modal .v-modal-footer:has(.collection-instance-add) .btn-main {
        flex: 1 1 0;
        justify-content: center;
    }

    .collection-banknote-modal .v-modal-footer .btn-main.collection-instance-add {
        flex-basis: 100%;
    }

    /* row of an item: scans | name, purchase / condition under it | ×N | arrow */
    .collection-banknote-modal .collection-instance-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        grid-template-areas:
            "scans info amount arrow"
            "scans grade amount arrow";
        align-items: center;
        gap: 2px 12px;
        padding: 8px 4px 8px 8px;
    }

    .collection-banknote-modal .collection-instance-scans {
        grid-area: scans;
    }

    .collection-banknote-modal .collection-instance-info {
        grid-area: info;
        align-self: end;
    }

    .collection-banknote-modal .collection-instance-grade {
        grid-area: grade;
        align-self: start;
        width: auto;
        min-width: 0;
        text-align: left;
    }

    .collection-banknote-modal .collection-item-amount {
        grid-area: amount;
    }

    .collection-banknote-modal .collection-instance-arrow {
        grid-area: arrow;
    }

    /* the serial number under the name */
    .collection-banknote-modal .collection-instance-serial {
        display: block;
        margin-left: 0;
    }

    .collection-banknote-modal .collection-instance-scan {
        flex-basis: 56px;
        width: 56px;
        height: 38px;
    }

    .collection-banknote-modal .collection-instance-tabs {
        gap: 12px;
        margin-top: 0;
    }

    .collection-banknote-modal .collection-instance-tabs button {
        flex: 0 1 auto;
        min-width: 0;
        font-size: 14px;
        text-align: left;
    }

    .collection-banknote-modal .collection-instance-props {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .collection-banknote-modal .collection-instance-props dd {
        margin-bottom: 8px;
    }
}

/* Rows appear one after another */
@keyframes collections-row {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.collections-page .user-collection-tile:nth-child(2) { animation-delay: .04s; }
.collections-page .user-collection-tile:nth-child(3) { animation-delay: .08s; }
.collections-page .user-collection-tile:nth-child(4) { animation-delay: .12s; }
.collections-page .user-collection-tile:nth-child(5) { animation-delay: .16s; }
.collections-page .user-collection-tile:nth-child(n+6) { animation-delay: .2s; }
.collection-banknote-modal .collection-instance-row:nth-child(2) { animation-delay: .04s; }
.collection-banknote-modal .collection-instance-row:nth-child(3) { animation-delay: .08s; }
.collection-banknote-modal .collection-instance-row:nth-child(n+4) { animation-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
    .collections-page .user-collection-tile,
    .collections-page .user-collection-tile.is-new,
    .collection-banknote-modal .collection-instance-row {
        animation: none;
    }

    .collection-banknote-modal .collection-instance-row * {
        transition: none !important;
    }

    .collection-banknote-modal .v-modal-content {
        transition: none;
    }

    .collection-banknote-modal .inline-field.is-saved,
    .collection-banknote-modal .inline-field.is-error,
    .collection-banknote-modal .inline-field-tip i,
    .inline-field-tip-enter-active,
    .inline-field-tip-leave-active {
        animation: none;
    }

    .collection-instance-swap-enter-active,
    .collection-instance-swap-leave-active,
    .collection-banknote-modal .collection-instance-tabs button,
    .collection-banknote-modal .inline-field,
    .collection-banknote-modal .collection-instance-row::before,
    .collection-banknote-modal .collection-instance-arrow,
    .collection-banknote-modal .collection-instance-back .fa {
        transition: none;
    }

    .collections-page .user-collection-tile,
    .collections-page .user-collection-tile::before,
    .collections-page .user-collection-tile__icon,
    .collections-page .vue-main-title a.text-secondary,
    .collections-page .collections-add-button,
    .collections-page .user-collection-menu-button,
    .collection-row-menu button,
    .collection-row-menu a,
    .collection-row-menu-enter-active,
    .collection-row-menu-leave-active,
    .collection-choice-option {
        transition: none;
    }
}

/* Collection content filter: everything / the banknotes the user has / the banknotes the user is looking for
   (tabs as in the banknote modal, brandbook 8.13) */
.collections-page .collection-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
    padding: 0 16px;
    border-bottom: 1px solid #edf0f3;
}

.collections-page .collection-filter button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: -1px;
    padding: 8px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: #65676b;
    font-size: 15px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}

.collections-page .collection-filter button:hover {
    color: #3c6690;
}

.collections-page .collection-filter button.is-active {
    border-bottom-color: #3c6690;
    color: #3c6690;
    font-weight: 600;
}

.collections-page .collection-filter-count {
    min-width: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #f5f7fa;
    color: #65676b;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.collections-page .collection-filter button.is-active .collection-filter-count {
    background: #3c669014;
    color: #3c6690;
}

/* empty window / filter (brandbook 8.12) */
.collections-page .collections-empty,
.collections-page .collection-filter-empty {
    padding: 32px 16px;
    color: #65676b;
    text-align: center;
}

.collection-filter-swap-enter-active,
.collection-filter-swap-leave-active {
    transition: opacity .2s ease-in-out, transform .2s ease-in-out;
}

.collection-filter-swap-enter-from,
.collection-filter-swap-leave-to {
    opacity: 0;
    transform: translateY(8px);
}

/* A wanted banknote (the user has none): pale catalog images, the wishes under the name */
.collections-page .collection-item-row.is-wanted .collection-banknote-scan img,
.collection-banknote-modal .collection-instance-row.is-wanted .collection-instance-scan {
    opacity: .5;
    filter: grayscale(1);
    transition: opacity .15s, filter .15s, transform .2s;
}

.collections-page .collection-item-row.is-wanted:hover .collection-banknote-scan img {
    opacity: .8;
    filter: none;
}

.collections-page .collection-wanted-text i,
.collection-banknote-modal .collection-instance-row.is-wanted .collection-instance-purchase i {
    color: #e4a11b;
    font-size: 12px;
}

.collection-banknote-modal .collection-instance-grade .bk-status-label {
    margin-left: 0;
}

@media (prefers-reduced-motion: reduce) {
    .collection-filter-swap-enter-active,
    .collection-filter-swap-leave-active {
        transition: none;
    }
}

/* The source of the list: "По каталогу" / "Без каталога" - segments as the language switch (brandbook 8.37), on the right of the filter */
.collections-page .collection-filter .collection-source {
    display: inline-flex;
    align-self: center;
    margin: 6px 0 6px auto;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: 4px;
    overflow: hidden;
}
.collections-page .collection-filter .collection-source button {
    gap: 6px;
    margin: 0;
    padding: 0 10px;
    height: 28px;
    border: 0;
    border-left: 1px solid rgba(0, 0, 0, .125);
    color: #65676b;
    font-size: 13px;
    font-weight: 600;
    transition: background-color .15s, color .15s;
}
.collections-page .collection-filter .collection-source button:first-child {
    border-left: 0;
}
.collections-page .collection-filter .collection-source button:hover {
    background: #3c669012;
    color: #3c6690;
}
.collections-page .collection-filter .collection-source button.is-active {
    background: #3c6690;
    color: #fff;
}
.collections-page .collection-source-count {
    font-size: 12px;
    font-weight: 700;
    opacity: .8;
}

/* Headings of the list as chips: show one country / section / own group */
.collections-page .collection-headings {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 16px;
    border-bottom: 1px solid #edf0f3;
}
.collections-page .collection-heading-chip,
.collections-page .collection-heading-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 2px 10px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: #fff;
    color: #212529;
    font-size: 13px;
    line-height: 20px;
    text-align: left;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}
.collections-page .collection-heading-chip:hover,
.collections-page .collection-heading-more:hover {
    border-color: #3c669059;
    background: #3c669012;
}
.collections-page .collection-heading-chip.is-active {
    border-color: #3c6690;
    background: #3c6690;
    color: #fff;
}
.collections-page .collection-heading-count {
    color: #8a8d91;
    font-size: 12px;
    font-weight: 700;
}
.collections-page .collection-heading-chip.is-active .collection-heading-count {
    color: #ffffffcc;
}
.collections-page .collection-heading-more {
    border-style: dashed;
    color: #3c6690;
}
.collection-heading-chip-enter-active,
.collection-heading-chip-leave-active {
    transition: opacity .2s ease, transform .2s ease;
}
.collection-heading-chip-enter-from,
.collection-heading-chip-leave-to {
    opacity: 0;
    transform: scale(.9);
}

/* the groups between the heading and the group of the banknote */
.collections-page .collection-item-path {
    display: block;
    color: #8a8d91;
    font-size: 12px;
    line-height: 1.3;
}

@media (max-width: 576px) {
    .collections-page .collection-filter .collection-source {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .collection-heading-chip-enter-active,
    .collection-heading-chip-leave-active,
    .collections-page .collection-heading-chip,
    .collections-page .collection-filter .collection-source button {
        transition: none;
    }
}

/* The public page of a collection (views/Catalog/Collection/show.html): the window .bk-window with the rows of the profile page */
.collection-public .collection-public-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    padding: 8px 16px;
    border-bottom: 1px solid #edf0f3;
    color: #65676b;
    font-size: 13px;
}
.collection-public .collection-public-meta .fa-images {
    color: #3c6690;
}
.collection-public .collection-item-row {
    display: flex;
    align-items: center;
}
.collection-public .collection-item-info a {
    color: #3c6690;
}
.collection-public .collection-filter .collection-source a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border-left: 1px solid rgba(0, 0, 0, .125);
    color: #65676b;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}
.collection-public .collection-filter .collection-source a:first-child {
    border-left: 0;
}
.collection-public .collection-filter .collection-source a:hover {
    background: #3c669012;
    color: #3c6690;
}
.collection-public .collection-filter .collection-source a.is-active {
    background: #3c6690;
    color: #fff;
}
.collection-public .collection-filter .collection-source {
    margin-left: 0;
}
.collection-public a.collection-heading-chip,
.collection-public a.collection-heading-chip:hover {
    text-decoration: none;
}
.collection-public a.collection-heading-chip:not(.is-active):hover {
    color: #212529;
}
/* scans of the owner under the banknote */
.collection-public .collection-public-scans {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.collection-public .collection-public-scans a {
    display: block;
    width: 48px;
    height: 32px;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
.collection-public .collection-public-scans img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* page links (brandbook 8.31, as .bk-pages of the forum) */
.collection-public .collection-public-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
}
.collection-public .bk-pages__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    color: #3c6690;
    font-size: 13px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: background-color .15s, border-color .15s;
}
.collection-public a.bk-pages__item:hover {
    border-color: #3c6690;
    background: #3c66901a;
    text-decoration: none;
}
.collection-public .bk-pages__item.is-current {
    border-color: #3c6690;
    background: #3c6690;
    color: #fff;
    font-weight: 600;
}
.collection-public .bk-pages__item i {
    font-size: 11px;
}
.collection-public .bk-pages__gap {
    min-width: 16px;
    color: #65676b;
    font-size: 13px;
    text-align: center;
}
@media (prefers-reduced-motion: reduce) {
    .collection-public .collection-filter .collection-source a,
    .collection-public .bk-pages__item {
        transition: none;
    }
}

/* Public page of a collection: as the catalog, inside the collection - the search (8.19), the view of the images, sections */
.collection-public .collection-public-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #edf0f3;
}
.collection-public .collection-public-search {
    flex: 1 1 auto;
    min-width: 0;
}
.collection-public .collection-public-found {
    margin: 8px 16px;
}
.collection-public .collection-view-switch {
    position: relative;
    flex: 0 0 auto;
}
.collection-public .collection-view-button,
.collection-public .collection-public-section-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    color: #3c6690;
    font-size: 15px;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.collection-public .collection-view-button:hover,
.collection-public .collection-view-switch.is-open .collection-view-button,
.collection-public .collection-public-section-button:hover {
    border-color: #3c6690;
    background: #3c669012;
    text-decoration: none;
}
/* the menu of the view: as the row menu 8.9, opens and closes with fade and a shift */
.collection-public .collection-view-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-width: 240px;
    padding: 4px 0;
    border: 1px solid #e9ecef;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 4px 12px rgba(60, 102, 144, .15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
.collection-public .collection-view-switch.is-open .collection-view-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .15s ease, transform .15s ease;
}
.collection-public .collection-view-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border: 0;
    background: transparent;
    color: #212529;
    font-size: 15px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s;
}
.collection-public .collection-view-menu button::before {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border: 1px solid #ced4da;
    border-radius: 50%;
}
.collection-public .collection-view-menu button[aria-checked="true"]::before {
    border: 5px solid #3c6690;
}
.collection-public .collection-view-menu button:hover,
.collection-public .collection-view-menu button:focus-visible {
    background: #3c669014;
    outline: 0;
}
/* the views of the images (as the catalog): obverse and reverse / obverse only / without images */
.collection-public .collection-view-grid .collection-banknote-scan + .collection-banknote-scan {
    display: none;
}
.collection-public .collection-view-grid .collection-banknote-scans {
    flex-basis: 72px;
}
.collection-public .collection-view-compact .collection-banknote-scans {
    display: none;
}
/* sections: the heading with "+" (the owner) and collapse */
.collection-public .collection-public-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    padding-bottom: 4px;
}
.collection-public .collection-public-section-title > span {
    flex: 1 1 auto;
    min-width: 0;
}
.collection-public .collection-public-section-button {
    width: 28px;
    height: 28px;
    font-size: 12px;
}
.collection-public .collection-public-toggle .fa-solid {
    transition: transform .25s;
}
.collection-public .collection-public-section.is-collapsed .collection-public-toggle .fa-solid {
    transform: rotate(180deg);
}
.collection-public .collection-public-section.is-collapsed .collection-public-section-body {
    display: none;
}
@media (max-width: 576px) {
    .collection-public .collection-view-menu {
        min-width: 220px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .collection-public .collection-view-menu,
    .collection-public .collection-view-switch.is-open .collection-view-menu,
    .collection-public .collection-public-toggle .fa-solid,
    .collection-public .collection-view-button,
    .collection-public .collection-public-section-button {
        transition: none;
    }
}

/* Header actions of one height (32px): the main one with text and the icon buttons - squares 32x32 (brandbook 8.3) */
.collections-page .collections-header-actions .collections-add-button {
    box-sizing: border-box;
    height: 32px;
}
.collections-page .collections-header-actions .collections-icon-button {
    width: 32px;
    min-width: 32px;
    padding: 0;
    justify-content: center;
}
@media (max-width: 420px) {
    /* the main action is an icon too: also a square */
    .collections-page .collections-header-actions .collections-add-button {
        width: 32px;
        padding: 0;
        justify-content: center;
    }
}
/* the menu of the collection in the header is open (as the burger of a tile, 8.9) */
.collections-page .collections-header-actions .collections-icon-button.is-active {
    border-color: var(--lc-accent);
    background: var(--lc-accent-soft);
}

/* The loader -> the content of "Мои коллекции" and of a collection: a fade, without the site "list" transition
   (it clips the height to 100px and the window jumps) */
.collections-swap-enter-active,
.collections-swap-leave-active {
    transition: opacity .2s ease;
}
.collections-swap-enter-from,
.collections-swap-leave-to {
    opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
    .collections-swap-enter-active,
    .collections-swap-leave-active {
        transition: none;
    }
}
