/* The banknote exchange (brandbook 8.77-8.80): the page "Спрос" (views/Exchange/Exchange/showDemand.html,
   js/exchange-demand.js), "Мои заявки" of the profile (views/Exchange/requests.html), the window of the terms and the
   buyer form (views/Exchange/join.html), the checkbox "Готов купить" of the wizard / item details, the warnings before
   a change of collections. Desktop >= 992px, tablet 577-991px, phone <= 576px (brandbook 10). */

/* --- the window of the page: gradient header (8.3), the action on the right */
.exchange-window .bk-window__header {
    gap: 8px;
}
.exchange-window__icon {
    flex: 0 0 auto;
    color: #ffffffcc;
    font-size: 16px;
}
.exchange-window__title {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}
.exchange-window__action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 4px 10px;
    border: 1px solid #ffffff59;
    border-radius: 4px;
    background: #ffffff1a;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color .15s, border-color .15s;
}
.exchange-window__action:hover,
.exchange-window__action:focus-visible {
    background: #ffffff33;
    border-color: #ffffffb3;
    color: #fff;
    text-decoration: none;
    outline: 0;
}
.exchange-window__body {
    padding: 12px 16px 16px;
}
.exchange-window__body .bk-breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
    font-size: 15px;
}
.exchange-window__summary {
    margin: 4px 0 12px;
    color: #65676b;
    font-size: 13px;
    line-height: 1.34;
}

/* --- the window in place of the feed of the main page (/exchange/demand, brandbook 8.4, as "Мои коллекции"):
   the feed is hidden, the window rolls out from the left (keyframes lenta-collections-roll of lenta.css) */
.fb-feed.is-exchange .fb-feed__column > :not(.lenta-exchange):not(.lenta-user) {
    display: none !important;
}
.lenta-exchange {
    position: relative;
}
.lenta-exchange.is-opening {
    animation: lenta-collections-roll .5s cubic-bezier(.2, .8, .2, 1) both;
}
.lenta-exchange.is-closing {
    animation: lenta-collections-roll .35s cubic-bezier(.5, 0, .75, 0) reverse both;
}
.lenta-exchange .exchange-window {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 4px 12px rgba(60, 102, 144, .15);
}
/* the feed column is narrower than a page: two cards in a row */
.lenta-exchange .exchange-cards {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.exchange-card__label {
    white-space: nowrap;
}
/* a light header as "Мои коллекции" and the collection page (8.3, decision 2026-10-28): white, a line below,
   the title 17/600, the "back" arrow and the action in the brand blue */
.exchange-window--light .bk-window__header {
    padding: 12px 16px;
    border-bottom: 1px solid #edf0f3;
    background: #ffffff;
    color: #1c1e21;
}
.exchange-window--light .bk-window__back {
    margin-right: 0;
    color: #3c6690;
}
.exchange-window--light .bk-window__back:hover,
.exchange-window--light .bk-window__back:focus-visible {
    background: #3c669012;
    color: #2b4763;
}
.exchange-window--light .exchange-window__action {
    padding: 6px 12px;
    border-color: #3c6690;
    background: #3c6690;
    color: #ffffff;
}
.exchange-window--light .exchange-window__action:hover,
.exchange-window--light .exchange-window__action:focus-visible {
    border-color: #2b4763;
    background: #2b4763;
    box-shadow: 0 0 5px #3c6690;
    color: #ffffff;
}
/* the back arrow of the header (8.3) */
.exchange-window .bk-window__back {
    flex: 0 0 28px;
}

/* --- the block "Биржа" of the main page: a card of the left column with the section link (8.1, 8.8) */
.lenta-exchange-block .card .card-body.lenta-exchange-block__body {
    padding: 0 12px 12px;
}
/* the card has no header: the section link fills it, without the line above */
.lenta-exchange-block .lenta-exchange-block__link {
    border-top: 0;
}
/* white as "Моя коллекция" also while the window is open (owner 2026-11-03); the hover tint stays */
.lenta-exchange-block .lenta-exchange-block__link.is-active {
    background: #ffffff;
}
.lenta-exchange-block .lenta-exchange-block__link.is-active:hover,
.lenta-exchange-block .lenta-exchange-block__link.is-active:focus-visible {
    background: #3c669012;
}
.lenta-exchange-block.d-lg-none {
    margin-bottom: 16px;
}

/* --- the filter (8.19 search, 8.26 fields) */
.exchange-filter__search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.exchange-filter__search .bk-input {
    flex: 1 1 auto;
    min-width: 0;
}
.exchange-filter__search .btn-main {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0;
}
.exchange-filter__row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 3fr) minmax(0, 2fr);
    gap: 12px;
}
.exchange-filter__row .bk-field {
    margin: 0;
}
.exchange-filter__price-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 76px;
    gap: 4px;
}
.exchange-filter__fresh {
    margin: 12px 0 0;
}

/* --- the cards of the demand: tiles, appear one by one (9) */
.exchange-results {
    transition: opacity .2s ease-in-out;
}
.exchange-results.is-loading {
    opacity: .55;
    pointer-events: none;
}
.exchange-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}
.exchange-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    animation: exchange-row-in .35s ease-out both;
    animation-delay: var(--bk-row-delay, 0ms);
    transition: box-shadow .15s;
}
.exchange-card:hover {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 4px 12px rgba(60, 102, 144, .15);
}
.exchange-card__image {
    display: block;
    aspect-ratio: 2 / 1;
    background: #f5f7fa;
    border-bottom: 1px solid #e9ecef;
}
.exchange-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.exchange-card__noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #adb5bd;
    font-size: 40px;
}
.exchange-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px 16px;
}
.exchange-card__name {
    color: #3c6690;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.exchange-card__name:hover {
    color: #2b4763;
    text-decoration: none;
}
.exchange-card__country {
    color: #65676b;
    font-size: 13px;
}
.exchange-card__stats {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.exchange-card__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f5f7fa;
}
.exchange-card__label {
    color: #65676b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.exchange-card__stat b {
    color: #3c6690;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.exchange-card__stale {
    margin-top: 4px;
    color: #7a5200;
    font-size: 12px;
    cursor: help;
}
.exchange-card__own {
    align-self: flex-start;
    margin-top: 4px;
}
/* all the requests of the banknote are not confirmed: muted, but readable */
.exchange-card.is-stale .exchange-card__image img {
    opacity: .6;
    filter: grayscale(.4);
}
.exchange-card.is-stale .exchange-card__stat b {
    color: #65676b;
}
.exchange-rate-note {
    margin: 0 0 12px;
    color: #65676b;
    font-size: 12px;
}
.exchange-found {
    margin-bottom: 12px;
}
.exchange-empty__hint {
    display: block;
    margin-top: 4px;
    font-size: 13px;
}
.exchange-pages {
    margin-bottom: 16px;
}

@keyframes exchange-row-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* --- "Мои заявки" of the profile */
.exchange-requests {
    padding: 12px 16px 16px;
}
.exchange-requests__title-icon {
    margin-right: 8px;
    color: #3c6690;
}
.exchange-requests__intro {
    margin: 0 0 12px;
    color: #65676b;
    font-size: 13px;
    line-height: 1.34;
}
.exchange-requests .bk-notice {
    margin-bottom: 8px;
}
.exchange-requests__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0 8px;
}
.exchange-requests__all {
    margin: 0;
}
.exchange-requests__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}
.exchange-requests__actions .btn-main,
.exchange-request__buttons .btn-main {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
}
.exchange-requests__actions .btn-main i,
.exchange-request__buttons .btn-main i {
    margin-right: 6px;
}
.exchange-requests__empty {
    padding: 32px 16px;
    color: #65676b;
    text-align: center;
}
.exchange-requests__empty small {
    display: block;
    margin-top: 4px;
    font-size: 13px;
}
.exchange-requests__list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid #edf0f3;
}
.exchange-request {
    display: grid;
    grid-template-columns: 24px auto minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f3;
    animation: exchange-row-in .35s ease-out both;
    animation-delay: var(--bk-row-delay, 0ms);
    transition: opacity .15s;
}
.exchange-request.is-busy {
    opacity: .7;
}
.exchange-request.is-off,
.exchange-request.is-blocked,
.exchange-request.is-hidden {
    background: #fafbfc;
}
.exchange-request__choose {
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}
.exchange-request__choose input {
    width: 16px;
    height: 16px;
    accent-color: #3c6690;
}
.exchange-request__images {
    display: flex;
    gap: 4px;
}
.exchange-request__images img,
.exchange-request__noimage {
    display: block;
    width: 72px;
    height: 48px;
    object-fit: contain;
    background: #f5f7fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
.exchange-request__noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 18px;
}
.exchange-request.is-stale .exchange-request__images img,
.exchange-request.is-hidden .exchange-request__images img,
.exchange-request.is-off .exchange-request__images img {
    opacity: .6;
}
.exchange-request__body {
    min-width: 0;
}
.exchange-request__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}
.exchange-request__name {
    color: #3c6690;
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.exchange-request__meta {
    margin-top: 2px;
    color: #65676b;
    font-size: 13px;
}
.exchange-request__price {
    color: #212529;
    font-variant-numeric: tabular-nums;
}
.exchange-request__dates {
    margin-top: 2px;
    color: #8a8d91;
    font-size: 12px;
}
.exchange-request__dates .is-past {
    color: #7a5200;
}
.exchange-request__note {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.34;
}
.exchange-request__note.is-warning { color: #7a5200; }
.exchange-request__note.is-info    { color: #2b4763; }
.exchange-request__note.is-muted   { color: #65676b; }
.exchange-request__note i {
    margin-right: 4px;
}
.exchange-request__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.exchange-request__price-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 120px)) 90px auto;
    align-items: end;
    gap: 8px 12px;
    margin-top: 8px;
    padding: 12px;
    background: #f5f7fa;
}
.exchange-request__price-form .bk-field {
    margin: 0;
}
.exchange-request__price-buttons {
    display: flex;
    gap: 8px;
}
.exchange-request__price-form .bk-field-error,
.exchange-request__price-hint {
    grid-column: 1 / -1;
}
.exchange-request__price-hint {
    color: #65676b;
    font-size: 12px;
}

/* --- the window of the terms and the buyer form (8.11, 8.26) */
.exchange-join-modal .v-modal-content {
    max-width: 640px;
}
.exchange-join__icon {
    margin-right: 6px;
    color: #3c6690;
}
.exchange-join__wait {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 16px;
    color: #65676b;
    font-size: 13px;
}
.exchange-join .bk-notice {
    margin-bottom: 8px;
}
.exchange-join__section + .exchange-join__section {
    margin-top: 16px;
}
.exchange-join__title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
}
.exchange-join__hint {
    margin: -4px 0 12px;
    color: #65676b;
    font-size: 13px;
}
/* the steps of the wizard (as "Добавить в коллекцию"): the labels may take two lines in this narrower window */
.exchange-join__steps .collection-wizard-step-label {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    text-align: center;
    line-height: 1.2;
}
.exchange-join__hint--after {
    margin: 8px 0 0;
}
.exchange-join__terms {
    max-height: 240px;
    overflow-y: auto;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    background: #f5f7fa;
    font-size: 13px;
    line-height: 1.4;
}
.exchange-join__terms:focus-visible {
    outline: 2px solid #3c669033;
}
.exchange-join__terms h4 {
    margin: 12px 0 4px;
    font-size: 13px;
    font-weight: 700;
}
.exchange-join__terms p {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.4;
}
.exchange-join__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}
.exchange-join .bk-field {
    display: block;
    margin-bottom: 12px;
}
.exchange-join__group {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
}
.exchange-join__group legend {
    display: block;
    width: auto;
    margin: 0 0 4px;
    padding: 0;
    font-size: 13px;
}
.exchange-join__checks {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}
.exchange-join__checks .bk-check {
    margin: 0;
}
/* "Другой способ": the field appears smoothly (the height of the grid row) */
.exchange-join__other {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows .3s cubic-bezier(.2, .8, .2, 1), opacity .2s ease-in-out, margin .3s;
}
.exchange-join__other > div {
    overflow: hidden;
}
.exchange-join__other.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 8px;
}
.exchange-join__accept {
    margin: 4px 0 0;
    font-weight: 600;
}

/* --- the checkbox "Готов купить в этом диапазоне" (the wizard, the item details) */
.exchange-ready {
    margin-top: 12px;
    padding: 8px 12px;
    border-left: 3px solid #3c6690;
    background: #3c669012;
}
.exchange-ready__check {
    margin: 0;
    font-weight: 600;
}
.exchange-ready__icon {
    margin-right: 6px;
    color: #3c6690;
}
.exchange-ready__hint {
    display: block;
    margin-top: 4px;
    color: #2b4763;
    font-size: 12px;
    line-height: 1.34;
}
.exchange-ready-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}
.exchange-ready-inline .bk-check {
    margin: 0;
}
.exchange-ready-inline .bk-check.is-saving {
    opacity: .7;
}

/* --- the warning before a change that switches buy requests off (8.17 + the buttons) */
.exchange-ask {
    margin: 12px 0 0;
}
.exchange-ask__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}
.exchange-ask__actions .btn-main {
    padding: 4px 12px;
    font-size: 13px;
}
.exchange-ask-enter-active,
.exchange-flash-enter-active {
    transition: opacity .2s ease-out, transform .2s ease-out;
}
.exchange-ask-leave-active,
.exchange-flash-leave-active {
    transition: opacity .25s ease-in, transform .25s ease-in;
}
.exchange-ask-enter-from,
.exchange-ask-leave-to,
.exchange-flash-enter-from,
.exchange-flash-leave-to {
    opacity: 0;
    transform: translateY(-6px);
}

/* --- the window about the requests to confirm (views/Exchange/notice.html) */
.exchange-notice__text {
    color: #65676b;
    font-size: 13px;
}
.exchange-notice__list {
    max-height: 320px;
    overflow-y: auto;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    border-top: 1px solid #edf0f3;
}
.exchange-notice__list li {
    padding: 8px 0;
    border-bottom: 1px solid #edf0f3;
}
.exchange-notice__item {
    margin: 0;
}
.exchange-notice__item a {
    color: #3c6690;
    font-weight: 600;
}
.exchange-notice__item .bk-status-label {
    margin-left: 8px;
}
.exchange-notice__item small {
    display: block;
    color: #65676b;
    font-size: 12px;
}
.exchange-notice__more {
    color: #65676b;
    font-size: 13px;
}
.exchange-notice__footer {
    flex-wrap: wrap;
}
.exchange-notice__footer .btn-main {
    padding: 6px 12px;
    font-size: 13px;
}
.exchange-notice .bk-modal__done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
}

/* --- tablet */
@media (max-width: 991px) {
    .exchange-filter__row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* --- phone */
@media (max-width: 576px) {
    .exchange-window__body,
    .exchange-requests {
        padding: 12px;
    }
    .exchange-filter__row,
    .exchange-join__row {
        grid-template-columns: minmax(0, 1fr);
    }
    .exchange-cards,
    .lenta-exchange .exchange-cards {
        grid-template-columns: minmax(0, 1fr);
    }
    .exchange-request {
        grid-template-columns: 20px minmax(0, 1fr);
    }
    .exchange-request__images {
        grid-column: 2;
    }
    .exchange-request__body {
        grid-column: 1 / -1;
    }
    .exchange-request__price-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .exchange-request__price-buttons {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
    .exchange-requests__actions {
        margin-left: 0;
    }
    /* the main action - the last line of the full width (8.11) */
    .exchange-notice__footer .btn-main {
        flex: 1 1 auto;
        text-align: center;
    }
    .exchange-notice__footer .btn-dark-blue {
        flex-basis: 100%;
        order: 3;
    }
}
@media (max-width: 420px) {
    .exchange-window__action {
        width: 32px;
        padding: 0;
        justify-content: center;
    }
    .exchange-window__action-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lenta-exchange.is-opening,
    .lenta-exchange.is-closing,
    .exchange-card,
    .exchange-request {
        animation: none;
    }
    .exchange-results,
    .exchange-card,
    .exchange-window__action,
    .exchange-join__other,
    .exchange-ask-enter-active,
    .exchange-ask-leave-active,
    .exchange-flash-enter-active,
    .exchange-flash-leave-active {
        transition: none;
    }
}
