/* Окно «Посмотреть с двух сторон» (frontend/render-view.js): свой рендер скина — обе стороны и блок информации,
   как на странице предмета Buff. Без backdrop-filter: размытие под окном тормозит на слабых видеокартах. */
html.rv-lock { overflow: hidden; }

.rv {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(6, 8, 10, 0.82);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.rv[hidden] { display: none; }
.rv.is-open { opacity: 1; }

.rv__panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    /* обе стороны 2:1 друг под другом должны влезать по высоте: колонка картинок шириной (высота экрана − поля −
       промежуток), то есть окно = 100vh − 48 (поля .rv) − 44 (поля окна) − 12 (промежуток) + 22 + 340 + 44 */
    width: min(1240px, 100%, calc(100vh + 302px));
    max-height: 100%;
    padding: 22px;
    background: #16191d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    overflow: auto;
    transform: translateY(10px) scale(0.985);
    transition: transform 0.22s cubic-bezier(.2, .8, .2, 1);
}
.rv.is-open .rv__panel { transform: none; }

.rv__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #D7DBD8;
    /* тёмная подложка: на телефоне крестик лежит поверх светлого неба первой картинки */
    background: rgba(12, 14, 16, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.rv__close:hover { color: #fff; background: rgba(40, 44, 48, 0.9); transform: rotate(90deg); }

.rv__media { display: grid; gap: 12px; align-content: start; }
.rv__shot {
    position: relative;
    margin: 0;
    aspect-ratio: 2 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #101215;
}
.rv__shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.3s ease;
    user-select: none;
}
.rv__shot.is-loading img { opacity: 0; }
/* заглушка того же размера, пока картинка грузится */
.rv__shot.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 70%) #14171a;
    background-size: 200% 100%;
    animation: rv-shimmer 1.2s linear infinite;
}
@keyframes rv-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.rv__shot figcaption {
    position: absolute;
    left: 10px;
    bottom: 8px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #D7DBD8;
    background: rgba(10, 12, 14, 0.7);
    border-radius: 99px;
    pointer-events: none;
}

.rv__info { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-top: 4px; }
.rv__type { font-size: 0.85rem; color: #AEB4BA; padding-right: 40px; }
.rv__name { margin: -6px 0 0; font-size: 1.35rem; line-height: 1.25; color: #F2F4F5; font-weight: 800; overflow-wrap: anywhere; }
.rv__wear { font-size: 0.85rem; color: #C9CDD1; }
.rv__float .fbar { width: 100%; }
.rv__props { display: grid; gap: 6px; margin: 0; }
.rv__prop { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 0.88rem; }
.rv__prop dt { color: #8D949B; }
.rv__prop dd { margin: 0; color: #E8EAEC; font-weight: 700; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
/* текст ярлыка — переносится, а не обрезается и не вылезает за окно */
.rv__prop--text { align-items: flex-start; }
.rv__prop--text dd { display: block; text-align: right; overflow-wrap: anywhere; font-weight: 600; }

.rv__acc h3 { margin: 0 0 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #8D949B; }
.rv__acc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rv__acc-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas: "img name price" "img sub price";
    column-gap: 10px;
    align-items: center;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.rv__acc-img { grid-area: img; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.rv__acc-img img { max-width: 100%; max-height: 100%; }
.rv__acc-name { grid-area: name; font-size: 0.84rem; color: #E8EAEC; line-height: 1.25; overflow-wrap: anywhere; }
.rv__acc-sub { grid-area: sub; font-size: 0.74rem; color: #8D949B; font-variant-numeric: tabular-nums; }
.rv__acc-price { grid-area: price; font-size: 0.82rem; font-weight: 700; color: #D7DBD8; font-variant-numeric: tabular-nums; white-space: nowrap; }

.rv__price {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.9rem;
    color: #8D949B;
}
.rv__price b { font-size: 1.25rem; color: #F2F4F5; font-variant-numeric: tabular-nums; }

/* узкий экран: картинки сверху, информация под ними */
@media (max-width: 860px) {
    .rv { padding: 10px; align-items: flex-start; }
    .rv__panel { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
    .rv__type { padding-right: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .rv, .rv__panel, .rv__shot img, .rv__close { transition: none; }
    .rv__shot.is-loading::before { animation: none; }
}
