/* The public pages of the cadastre (views/Cadastre, brandbook 8.94): the window of the page with the menu of the section,
   cards of lists, rows (8.9), tiles, the page of a banknote (scans open in BkLightbox 8.46), the rules, the form of a new
   banknote (8.26). Desktop >= 992px, tablet 577-991px, phone <= 576px (brandbook 10). */

/* --- the window of the page: gradient header (8.3), crumbs (8.16), summary, the menu of the section */
.cadastre-window .bk-window__header {
    gap: 8px;
}

.cadastre-window__icon {
    flex: 0 0 auto;
    color: #ffffffcc;
    font-size: 16px;
}

.cadastre-window__title {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.cadastre-add-button {
    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;
}

.cadastre-add-button:hover,
.cadastre-add-button:focus-visible {
    background: #ffffff33;
    border-color: #ffffffb3;
    color: #fff;
    text-decoration: none;
    outline: 0;
}

.cadastre-window__body {
    padding: 12px 16px;
}

.cadastre-window__summary {
    margin-top: 4px;
    color: #65676b;
    font-size: 13px;
    line-height: 1.34;
    overflow-wrap: anywhere;
}

.cadastre-window__body > .bk-notice {
    margin: 12px 0 0;
}

.cadastre-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
    padding: 0 16px;
    border-top: 1px solid #edf0f3;
}

.cadastre-nav__item {
    padding: 8px 0 6px;
    border-bottom: 2px solid transparent;
    color: #3c6690;
    font-size: 15px;
    line-height: 1.34;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}

.cadastre-nav__item:hover,
.cadastre-nav__item:focus-visible {
    color: #2b4763;
    text-decoration: none;
}

.cadastre-nav__item.is-current {
    border-bottom-color: #3c6690;
    color: #212529;
    font-weight: 600;
}

/* --- a card of a list */
.cadastre-card {
    margin-bottom: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.cadastre-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #edf0f3;
    color: #1c1e21;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}

.cadastre-card__head h2 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.cadastre-card__count {
    color: #65676b;
    font-size: 13px;
    font-weight: 400;
}

.cadastre-subhead {
    padding: 8px 16px;
    background: #f5f7fa;
    color: #65676b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.34;
    overflow-wrap: anywhere;
}

.cadastre-card__notice {
    padding: 12px 16px 0;
}

.cadastre-card__notice .bk-notice {
    margin: 0;
}

.cadastre-empty {
    padding: 32px 16px;
    color: #65676b;
    font-size: 15px;
    text-align: center;
}

/* the number on a plaque (8.9) */
.cadastre-count {
    flex: 0 0 auto;
    min-width: 32px;
    padding: 2px 8px;
    border-radius: 8px;
    background: #f5f7fa;
    color: #3c6690;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.34;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.cadastre-count.is-zero {
    color: #adb5bd;
}

/* statistics plaques: the number 17/700, the label 11px in capitals */
.cadastre-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f5f7fa;
    text-align: center;
}

.cadastre-stat__value {
    color: #3c6690;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.cadastre-stat__value.is-zero {
    color: #adb5bd;
}

.cadastre-stat__label {
    margin-top: 2px;
    color: #65676b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .04em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

/* --- a cadastre in the list: a "large" row (8.9) */
.cadastre-group {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid #edf0f3;
    color: #212529;
    transition: background-color .15s;
    animation: cadastre-row-in .35s ease-out backwards;
}

.cadastre-group:first-child {
    border-top: 0;
}

.cadastre-group::before,
.cadastre-row::before,
.cadastre-tile::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: #3c6690;
    transform: scaleY(0);
    transition: transform .2s ease-in-out;
}

.cadastre-group:hover,
.cadastre-group:focus-visible {
    background: #3c669012;
    color: #212529;
    text-decoration: none;
    outline: 0;
}

.cadastre-group:hover::before,
.cadastre-group:focus-visible::before,
a.cadastre-row:hover::before,
a.cadastre-row:focus-visible::before,
.cadastre-tile:hover::before,
.cadastre-tile:focus-visible::before {
    transform: scaleY(1);
}

.cadastre-group__sign {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 4px;
    border-radius: 10px;
    background: #3c669012;
    color: #3c6690;
    font-size: 18px;
}

.cadastre-group__sign img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cadastre-group__name {
    color: #1c1e21;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.34;
    overflow-wrap: anywhere;
}

.cadastre-group__text {
    margin-top: 2px;
    color: #65676b;
    font-size: 13px;
    line-height: 1.34;
    overflow-wrap: anywhere;
}

.cadastre-group__stats {
    display: flex;
    gap: 8px;
}

/* --- a row-link of a list (8.9 simple) */
.cadastre-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-top: 1px solid #edf0f3;
    color: #212529;
    transition: background-color .15s;
    animation: cadastre-row-in .35s ease-out backwards;
}

.cadastre-card__head + .cadastre-row,
.cadastre-tabs + .cadastre-row,
.cadastre-row:first-child {
    border-top: 0;
}

a.cadastre-row:hover,
a.cadastre-row:focus-visible {
    background: #3c669012;
    color: #212529;
    text-decoration: none;
    outline: 0;
}

.cadastre-row__body {
    flex: 1 1 0;
    min-width: 0;
}

.cadastre-row__title {
    font-size: 15px;
    line-height: 1.34;
    overflow-wrap: anywhere;
}

.cadastre-row__title b {
    font-weight: 600;
}

.cadastre-row__sub {
    margin-top: 2px;
    color: #65676b;
    font-size: 13px;
    line-height: 1.34;
    overflow-wrap: anywhere;
}

.cadastre-row__rank {
    flex: 0 0 32px;
    color: #adb5bd;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cadastre-row__stats {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
}

.cadastre-row__stats .cadastre-stat {
    min-width: 64px;
    padding: 4px 8px;
}

.cadastre-row__stats .cadastre-stat__value {
    font-size: 15px;
}

/* the miniature of the avers in "the last added banknotes" (8.94); a guest or no avers - the icon */
.cadastre-mini {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 40px;
    overflow: hidden;
    background: #f5f7fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: #adb5bd;
    font-size: 16px;
}

.cadastre-mini img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* the miniatures of a row of the history of the banknote (brandbook 8.94): avers and revers, a click - the viewer */
.cadastre-history__thumbs {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
}

.cadastre-mini--zoom {
    cursor: zoom-in;
    transition: border-color .15s;
}

.cadastre-mini--zoom:hover,
.cadastre-mini--zoom:focus-visible {
    border-color: #3c6690;
    outline: 0;
}

/* the marker of the next portion: "Loading..." / an error / "Show more" */
.cadastre-last-next:not(:empty) {
    padding: 8px 16px;
    border-top: 1px solid #edf0f3;
    color: #65676b;
    font-size: 13px;
    text-align: center;
}

.cadastre-last-next__loading .fa-spinner {
    margin-right: 4px;
    color: #3c6690;
}

.cadastre-last-next__more {
    padding: 0;
    border: 0;
    background: none;
    color: #3c6690;
    font-size: 15px;
}

.cadastre-chevron {
    flex: 0 0 auto;
    color: #adb5bd;
    font-size: 12px;
    transition: transform .15s, color .15s;
}

a.cadastre-row:hover .cadastre-chevron,
.cadastre-tile:hover .cadastre-chevron {
    color: #3c6690;
    transform: translateX(3px);
}

.cadastre-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

/* a banknote in the criminal search: the red stripe stays */
.cadastre-row.is-wanted::before,
.cadastre-tile.is-wanted::before {
    background: #dc3545;
    transform: scaleY(1);
}

.cadastre-row .bk-status-label,
.cadastre-tile .bk-status-label {
    margin-left: 0;
}

/* --- tiles: nominals, years, banknotes of a year */
.cadastre-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 12px 16px;
}

.cadastre-tiles--years {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.cadastre-tile {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 8px;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    color: #1c1e21;
    transition: background-color .15s, border-color .15s;
    animation: cadastre-row-in .35s ease-out backwards;
}

.cadastre-tile:hover,
.cadastre-tile:focus-visible {
    border-color: #3c669033;
    background: #3c669012;
    color: #1c1e21;
    text-decoration: none;
    outline: 0;
}

.cadastre-tile__name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.34;
    overflow-wrap: anywhere;
}

.cadastre-tile__sub {
    flex: 1 0 100%;
}

/* --- the page of a banknote */
.cadastre-bon {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
}

.cadastre-bon__scans {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.cadastre-scan {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: #f5f7fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
    cursor: zoom-in;
    animation: cadastre-row-in .35s ease-out backwards;
}

.cadastre-scan img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .3s;
}

.cadastre-scan:hover img,
.cadastre-scan:focus-visible img {
    transform: scale(1.03);
}

.cadastre-scan__side {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 1px 6px;
    background: #ffffffe6;
    color: #65676b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.34;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cadastre-bon__noscans {
    padding: 32px 16px;
    border: 1px solid #e9ecef;
    background: #f5f7fa;
    color: #65676b;
    font-size: 13px;
    text-align: center;
}

.cadastre-bon__noscans i {
    display: block;
    margin-bottom: 8px;
    color: #adb5bd;
    font-size: 24px;
}

.cadastre-bon__info {
    min-width: 0;
}

.cadastre-caption {
    color: #65676b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cadastre-bon__number {
    margin: 2px 0 12px;
    color: #212529;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.cadastre-facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px 12px;
    margin: 0;
    font-size: 15px;
    line-height: 1.34;
}

.cadastre-facts dt {
    color: #65676b;
    font-size: 13px;
    font-weight: 400;
    line-height: 20px;
}

.cadastre-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.cadastre-bon__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.cadastre-bon__stats .cadastre-stat {
    min-width: 0;
    animation: cadastre-row-in .35s ease-out backwards;
}

.cadastre-bon__description {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #edf0f3;
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.cadastre-bon__description .cadastre-caption {
    margin-bottom: 4px;
}

/* the moderator of the cadastre: "Edit" -> the editor of the admin panel (8.97) */
.cadastre-bon__admin {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

/* the history of the banknote (8.21) */
.cadastre-history__meta a {
    color: #212529;
    font-weight: 600;
}

.cadastre-history__meta a:hover {
    text-decoration: underline;
}

/* --- the rules of the section */
.cadastre-rules {
    padding: 12px 16px 16px;
    font-size: 15px;
    line-height: 1.4;
}

.cadastre-rules h2 {
    margin: 16px 0 4px;
    color: #1c1e21;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}

.cadastre-rules h2:first-child {
    margin-top: 0;
}

.cadastre-rules p,
.cadastre-rules li {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.4;
}

.cadastre-rules li {
    margin: 0;
}

.cadastre-rules ul {
    margin: 0 0 8px;
    padding-left: 20px;
}

.cadastre-rules__table {
    max-width: 480px;
    margin-top: 8px;
    border: 1px solid #e9ecef;
}

.cadastre-rules__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    border-top: 1px solid #edf0f3;
}

.cadastre-rules__value {
    flex: 0 0 auto;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.cadastre-rules__value.is-plus {
    color: #28a745;
}

.cadastre-rules__value.is-minus {
    color: #dc3545;
}

/* --- the tabs of a period (popular banknotes) */
.cadastre-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
    padding: 0 16px;
    border-bottom: 1px solid #edf0f3;
}

.cadastre-tabs a {
    margin-bottom: -1px;
    padding: 8px 0 6px;
    border-bottom: 2px solid transparent;
    color: #65676b;
    font-size: 15px;
    line-height: 1.34;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}

.cadastre-tabs a:hover {
    color: #3c6690;
    text-decoration: none;
}

.cadastre-tabs a.is-active {
    border-bottom-color: #3c6690;
    color: #3c6690;
    font-weight: 600;
}

/* --- the form of a new banknote (8.26); ids and names of the fields are used by js/cadastre.js and js/image.js */
.cadastre-form {
    max-width: 640px;
    padding: 12px 16px 16px;
}

.cadastre-form > .bk-notice {
    margin-bottom: 12px;
}

.cadastre-form__row {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.cadastre-form__row.d-flex {
    flex-direction: column;
}

.cadastre-form__row > .bk-field__label {
    margin-bottom: 4px;
}

.cadastre-form__short {
    max-width: 200px;
}

.cadastre-form textarea.bk-input {
    min-height: 96px;
    resize: vertical;
}

.cadastre-form .bk-input.error {
    border-color: #dc3545;
}

.cadastre-form .bk-input.error:focus {
    box-shadow: 0 0 0 2px #dc354533;
}

.cadastre-form__error {
    padding-top: 4px;
    color: #b02a37;
    font-size: 12px;
    line-height: 1.34;
}

.cadastre-form__error:empty {
    padding-top: 0;
}

.cadastre-form__error:not(:empty)::before {
    content: "\f06a";
    margin-right: 4px;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.cadastre-form__date {
    position: relative;
    max-width: 200px;
}

.cadastre-form__date .bk-input {
    padding-right: 36px;
}

.cadastre-form__date > i {
    position: absolute;
    top: 50%;
    right: 12px;
    color: #adb5bd;
    font-size: 15px;
    transform: translateY(-50%);
    pointer-events: none;
}

.cadastre-form__submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cadastre-form__submit[disabled] {
    opacity: .7;
}

/* the state of the banknote: radio segments (rendered by js/cadastre.js) */
.cadastre-states {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cadastre-states .input-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cadastre-states .radio-btn {
    flex: 0 0 auto;
    max-width: none;
    width: auto;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    color: #212529;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}

.cadastre-states .radio-btn:hover {
    border-color: #3c6690;
    background: #3c669012;
    color: #3c6690;
}

.cadastre-states .input-radio:focus-visible + .radio-btn {
    box-shadow: 0 0 0 2px #3c669033;
}

.cadastre-states .input-radio:checked + .radio-btn {
    border-color: #3c6690;
    background: #3c6690;
    color: #fff;
}

/* the hints of the field "year, nominal" (jQuery UI autocomplete, as 8.19) */
.ui-autocomplete.cadastre-autocomplete {
    z-index: 1050;
    max-width: calc(100vw - 24px);
    font-family: inherit;
    max-height: 320px;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 4px 12px rgba(60, 102, 144, .15);
    list-style: none;
    animation: cadastre-pop-in .2s ease-out;
}

.ui-autocomplete.cadastre-autocomplete .ui-menu-item-wrapper {
    display: block;
    padding: 8px 12px;
    border: 0;
    color: #212529;
    font-size: 15px;
    line-height: 1.34;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.ui-autocomplete.cadastre-autocomplete .ui-state-active,
.ui-autocomplete.cadastre-autocomplete .ui-menu-item-wrapper:hover {
    margin: 0;
    border: 0;
    background: #3c669012;
    color: #3c6690;
}

/* the scans of the new banknote: two squares, may be swapped by dragging */
.cadastre-upload {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cadastre-upload__side {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}

.cadastre-upload__side > div {
    flex: 0 1 200px;
    min-width: 0;
    color: #65676b;
    font-size: 13px;
    text-align: center;
}

.cadastre-upload__slot {
    position: relative;
    flex: 0 1 200px;
    min-width: 0;
    aspect-ratio: 1 / 1;
    max-width: 200px;
    border: 1px dashed #ced4da;
    border-radius: 4px;
    background-color: #f5f7fa;
    background-size: contain !important;
    list-style: none;
    transition: border-color .15s, background-color .15s;
}

.cadastre-upload__slot:hover {
    border-color: #3c6690;
    background-color: #3c669012;
}

.cadastre-upload__slot > label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    margin: 0;
    color: #3c6690;
    font-size: 13px;
    cursor: pointer;
}

.cadastre-upload__slot > label > i {
    font-size: 24px;
}

.cadastre-upload__slot .loader.desktop {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #3c66901f;
    border-top-color: #3c6690;
    border-radius: 50%;
    animation: cadastre-spin .8s linear infinite;
}

.cadastre-upload__delete {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffffe6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    color: #dc3545;
    font-size: 15px;
    cursor: pointer;
    animation: cadastre-pop-in .2s ease-out;
    transition: background-color .15s, color .15s;
}

.cadastre-upload__delete:hover {
    background: #dc3545;
    color: #fff;
}

.cadastre-upload__hint {
    margin-top: 4px;
    color: #65676b;
    font-size: 12px;
    line-height: 1.34;
}

/* the banknote is sent */
.cadastre-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 16px;
    text-align: center;
}

.cadastre-done__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #eaf6ed;
    color: #28a745;
    font-size: 22px;
}

.cadastre-done__text {
    max-width: 480px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}

.cadastre-done .cadastre-facts {
    text-align: left;
}

.cadastre-done__scans {
    gap: 8px;
    justify-content: center;
}

.cadastre-done__scans img {
    max-width: 160px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.cadastre-done__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

/* the own banknote on the check: the form of the author (8.87) */
.cadastre-own__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #fff;
}

.cadastre-own__body .bk-notice {
    margin: 0;
}

/* "Модератор сейчас смотрит" (brandbook 8.95): the box is always there, empty it takes no place (the gap is eaten by its margin) */
.cadastre-own__viewing {
    margin-bottom: -12px;
}
.cadastre-own__body .cadastre-own__viewing .bk-notice {
    margin-bottom: 12px;
}
.cadastre-own__viewing .bk-notice[hidden] {
    display: none;
}

.cadastre-own__body .bk-field {
    margin-bottom: 0;
}

.cadastre-own__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.cadastre-own__scan {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.cadastre-own__file {
    max-width: 100%;
    font-size: 13px;
}

.cadastre-own__submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
}

/* rows appear one by one (brandbook 9): the delay is set by the page */
@keyframes cadastre-row-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@keyframes cadastre-pop-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

@keyframes cadastre-spin {
    to { transform: rotate(360deg); }
}

/* tablet: two last crumbs (style.v2.css), the long title in the middle too */
@media (max-width: 990px) {
    .cadastre-window .bk-breadcrumb .breadcrumb-item--title:not(:nth-last-child(-n+2)) {
        display: none;
    }
}

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

}

/* phone */
@media (max-width: 576px) {
    .cadastre-mini {
        width: 56px;
        height: 35px;
    }

    .cadastre-window__body,
    .cadastre-card__notice,
    .cadastre-card__head,
    .cadastre-subhead,
    .cadastre-group,
    .cadastre-row,
    .cadastre-rules,
    .cadastre-form {
        padding-right: 12px;
        padding-left: 12px;
    }

    .cadastre-nav,
    .cadastre-tabs {
        gap: 0 12px;
        padding: 0 12px;
    }

    .cadastre-group {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .cadastre-group__stats {
        grid-column: 2;
    }

    .cadastre-tiles,
    .cadastre-tiles--years {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 12px;
    }

    .cadastre-row {
        flex-wrap: wrap;
    }

    .cadastre-row__rank {
        align-self: flex-start;
        line-height: 20px;
    }

    .cadastre-row__stats {
        order: 3;
        flex-basis: 100%;
        padding-left: 44px;
    }

    .cadastre-row--plain .cadastre-row__stats {
        padding-left: 0;
    }

    .cadastre-bon {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .cadastre-bon__scans {
        flex-direction: row;
        gap: 8px;
    }

    .cadastre-bon__scans .cadastre-scan {
        flex: 1 1 0;
        min-width: 0;
        align-self: flex-start;
    }

    .cadastre-own__body {
        padding: 12px;
    }

    .cadastre-own__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .cadastre-upload,
    .cadastre-upload__side {
        gap: 8px;
    }

    .cadastre-upload__slot,
    .cadastre-upload__side > div {
        flex: 1 1 0;
    }
}

/* the action of the header: only the icon on narrow screens (8.3) */
@media (max-width: 420px) {
    .cadastre-add-button {
        width: 32px;
        padding: 0;
        justify-content: center;
    }

    .cadastre-add-button__text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cadastre-group,
    .cadastre-row,
    .cadastre-tile,
    .cadastre-scan,
    .cadastre-bon__stats .cadastre-stat,
    .ui-autocomplete.cadastre-autocomplete,
    .cadastre-upload__delete {
        animation: none;
    }

    .cadastre-upload__slot .loader.desktop {
        animation-duration: 1.6s;
    }

    .cadastre-mini--zoom,
    .cadastre-group::before,
    .cadastre-row::before,
    .cadastre-tile::before,
    .cadastre-group,
    .cadastre-row,
    .cadastre-tile,
    .cadastre-scan img,
    .cadastre-chevron,
    .cadastre-add-button,
    .cadastre-nav__item,
    .cadastre-tabs a,
    .cadastre-states .radio-btn,
    .cadastre-upload__slot,
    .cadastre-upload__delete {
        transition: none;
    }
}
