/*
 * work-view.css — страница открытой работы (M09, Ф6a «визуальный паритет»).
 *
 * Значения страничных правил скопированы 1-в-1 из frontend/web/rs/css/work.css
 * (макеты video-work.html / video-work-my.html / video-work-disabled.html /
 * photos-work.html).
 * База — new_layout/css/kit.css (`#breadcrumbs`, `.button`, `.video`-карточки,
 * `.item-info`, `.person`, `.tags .tag`, `.icon-eye-gray`, `.icon-arrow`),
 * общие правила не дублируются. rs/** read-only; kit.css не перезаписывается.
 * Ф6b: фоторабота пересобрана на разметку макета (`.images-*`).
 * Кнопки действий уточнены по Figma 10.11.2026, см. README_WORKS §4.7.
 */

.work-view-body #breadcrumbs {
    margin-bottom: 20px;
}

/* F-R2-17: крошки — одна строка с горизонтальным скроллом (эталон
 * `rs/video-work.html`: одна строка, при нехватке ширины — скролл, скроллбар скрыт).
 * Причина переноса: тело страницы имеет класс `settings-body`, а `settings.css:12`
 * (`.settings-body #breadcrumbs .links`) задаёт `flex-wrap: wrap`. Наше правило
 * той же специфичности, но грузится позже (work-view.css после AccountUiAsset),
 * поэтому перебивает wrap. Образец значений — `public-profile.css:19-31`,
 * `profile-edit.css:436-454`, база — `.scrollable` (work-view.css:295). */
.work-view-body #breadcrumbs .links {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    align-items: center;
    margin-right: -16px;
    scrollbar-width: none;
}

.work-view-body #breadcrumbs .links > * {
    white-space: nowrap;
    flex-shrink: 0;
}

.work-view-body #breadcrumbs .links::-webkit-scrollbar {
    display: none;
}

.work-view {
    padding-bottom: 40px;
}

/* --- #work: белая карточка (rs/css/work.css:1-5) --- */

#work {
    padding: 32px;
    background: white;
    border-radius: 12px;
}

#work h3 {
    margin: 12px 0 4px;
    font-family: 'TT Firs Neue';
    font-style: normal;
    font-weight: 450;
    font-size: 24px;
    line-height: 27px;
    letter-spacing: -0.03em;
    color: #000000;
}

#work .work-data .item-info > span {
    float: left;
    margin: 0 12px 0 0;
    line-height: 20px;
}

#work .work-data {
    margin: 0 0 20px;
}

#work .work-data .item-info .video-views .icon {
    margin: 0px 4px 0 0;
}

/* Figma 1266:116915 / 1266:117503; кнопки XS из компонента 70:16680. */
#work .actions {
    display: flex;
    align-items: center;
    gap: 4px;
    float: right;
    max-width: calc(100% + 16px);
    margin-right: -16px;
}

#work .work-view__social-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    /* Место для внешней рамки фокуса без изменения геометрии кнопок. */
    padding: 4px;
    margin: -4px;
    scrollbar-width: none;
}

#work .work-view__social-actions::-webkit-scrollbar {
    display: none;
}

#work .actions .button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    margin: 0;
    width: auto;
    height: 42px;
    padding: 9px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

#work .actions .button[data-action="edit"] {
    min-width: 128px;
    padding: 8px 14px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: -0.03em;
}

#work .button {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#work .button:active {
    outline: 0px solid #9BA7FD;
}

#work .actions .button.gray {
    background: #F0F0F0;
    color: black;
}

@media (hover: hover) and (pointer: fine) {
    #work .actions .button.gray:hover:not(:disabled) {
        background: #D9D9D9;
    }
}

#work .actions .icon {
    display: block;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin: 0;
}

#work .author-and-actions {
    margin: 0 16px 8px 0;
}

#work .author-and-actions .author .info {
    margin: 2px 0 0;
}

#work .author-and-actions .author .image {
    width: 42px;
    height: 42px;
    float: left;
    margin: 0 10px 0 0;
    border-radius: 50%;
    overflow: hidden;
}

#work .author-and-actions .author .text {
    float: left;
}
#work .author-and-actions .author .text a {
    color: black;
}

#work .icon-pro {
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg width='25' height='14' viewBox='0 0 25 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 0.5H21C22.933 0.5 24.5 2.067 24.5 4V10C24.5 11.933 22.933 13.5 21 13.5H4C2.067 13.5 0.5 11.933 0.5 10V4C0.5 2.067 2.067 0.5 4 0.5Z' fill='url(%23paint0_linear_1266_117988)'/%3E%3Cpath d='M4 0.5H21C22.933 0.5 24.5 2.067 24.5 4V10C24.5 11.933 22.933 13.5 21 13.5H4C2.067 13.5 0.5 11.933 0.5 10V4C0.5 2.067 2.067 0.5 4 0.5Z' stroke='url(%23paint1_linear_1266_117988)'/%3E%3Cpath d='M14.4655 7.73427C14.4655 6.47552 15.4291 5.46853 16.7327 5.46853C18.0202 5.46853 19 6.47552 19 7.73427C19 8.99301 18.0202 10 16.7327 10C15.4291 10 14.4655 8.99301 14.4655 7.73427ZM15.6396 7.73427C15.6396 8.48951 16.1254 8.99301 16.7327 8.99301C17.34 8.99301 17.8259 8.48951 17.8259 7.73427C17.8259 6.97902 17.34 6.47552 16.7327 6.47552C16.1254 6.47552 15.6396 6.97902 15.6396 7.73427Z' fill='black'/%3E%3Cpath d='M11.5078 9.87413V5.59441H12.6414V6.22378H12.6819C12.7305 6.08951 12.8033 5.97203 12.9005 5.87133C13.0624 5.6951 13.3216 5.51049 13.7345 5.51049H14.2204V6.64336H13.6131C12.9977 6.64336 12.6414 7.01259 12.6414 7.60839V9.87413H11.5078Z' fill='black'/%3E%3Cpath d='M6 9.87413V4H8.63163C10.0082 4 10.8989 4.92308 10.8989 6.05594C10.8989 7.18881 10.0082 8.11189 8.63163 8.11189H7.2146V9.87413H6ZM7.2146 6.93706H8.59114C9.27942 6.93706 9.6438 6.55944 9.6438 6.05594C9.6438 5.55245 9.27942 5.17483 8.59114 5.17483H7.2146V6.93706Z' fill='black'/%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_1266_117988' x1='25' y1='-1.04019e-06' x2='1.84944' y2='16.582' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='white'/%3E%3Cstop offset='1' stop-color='%23C2C2C2'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint1_linear_1266_117988' x1='12.5' y1='0' x2='12.5' y2='14' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23DEDEDE'/%3E%3Cstop offset='1' stop-color='%23DEDEDE'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E%0A");
    width: 25px;
    height: 14px;
    vertical-align: middle;
    margin: 0 0 0 4px;
}

.icon-download {
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3021_5615)'%3E%3Cpath d='M12 17V3' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M21 17C21 19.209 19.209 21 17 21H7C4.791 21 3 19.209 3 17' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M17.001 12L12 17.001L7 12' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3021_5615'%3E%3Crect width='24' height='24' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
}

.icon-share {
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3021_1174)'%3E%3Cpath d='M15 9H17C18.1046 9 19 9.89543 19 11V19C19 20.1046 18.1046 21 17 21H7C5.89543 21 5 20.1046 5 19V11C5 9.89543 5.89543 9 7 9H9' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 15V3' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M15 6L12 3L9 6' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3021_1174'%3E%3Crect width='24' height='24' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
}

.icon-bookmark {
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3021_20907)'%3E%3Cpath d='M7.69922 3H16.2992C17.4042 3 18.2992 3.895 18.2992 5V21L12.0072 17.727L5.69922 21V5C5.69922 3.895 6.59422 3 7.69922 3Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3021_20907'%3E%3Crect width='24' height='24' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
}

.bookmarked .icon-bookmark {
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3021_47503)'%3E%3Cpath d='M7.69922 3H16.2992C17.4042 3 18.2992 3.895 18.2992 5V21L12.0072 17.727L5.69922 21V5C5.69922 3.895 6.59422 3 7.69922 3Z' fill='black'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3021_47503'%3E%3Crect width='24' height='24' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
}

.icon-like {
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3021_40280)'%3E%3Cpath d='M12.0018 5.73524C11.4695 5.18858 10.8335 4.75355 10.1311 4.45561C9.42866 4.15766 8.67387 4.00277 7.91086 4C6.30416 4.04083 4.77935 4.71774 3.67139 5.88205C2.56343 7.04635 1.96292 8.60283 2.00177 10.2096C2.00177 11.2268 2.22145 12.2319 2.64578 13.1564C3.07011 14.0808 3.68909 14.9027 4.46037 15.5658L9.85491 20.204C10.4523 20.7176 11.214 21 12.0018 21C12.7896 21 13.5513 20.7176 14.1486 20.204L19.5432 15.5658C20.3145 14.9027 20.9334 14.0808 21.3578 13.1564C21.7821 12.2319 22.0018 11.2268 22.0018 10.2096C22.0406 8.60283 21.4401 7.04635 20.3322 5.88205C19.2242 4.71774 17.6994 4.04083 16.0927 4C15.3297 4.00277 14.5749 4.15766 13.8725 4.45561C13.17 4.75355 12.5341 5.18858 12.0018 5.73524Z' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3021_40280'%3E%3Crect width='24' height='24' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
}

.liked .icon-like {
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_1266_117167)'%3E%3Cpath d='M12.0018 5.73524C11.4695 5.18858 10.8335 4.75355 10.1311 4.45561C9.42866 4.15766 8.67387 4.00277 7.91086 4C6.30416 4.04083 4.77935 4.71774 3.67139 5.88205C2.56343 7.04635 1.96292 8.60283 2.00177 10.2096C2.00177 11.2268 2.22145 12.2319 2.64578 13.1564C3.07011 14.0808 3.68909 14.9027 4.46037 15.5658L9.85491 20.204C10.4523 20.7176 11.214 21 12.0018 21C12.7896 21 13.5513 20.7176 14.1486 20.204L19.5432 15.5658C20.3145 14.9027 20.9334 14.0808 21.3578 13.1564C21.7821 12.2319 22.0018 11.2268 22.0018 10.2096C22.0406 8.60283 21.4401 7.04635 20.3322 5.88205C19.2242 4.71774 17.6994 4.04083 16.0927 4C15.3297 4.00277 14.5749 4.15766 13.8725 4.45561C13.17 4.75355 12.5341 5.18858 12.0018 5.73524Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_1266_117167'%3E%3Crect width='24' height='24' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
}

#work .small .gray {
    margin: 0 0 0 8px;
    color: #909090;
}

#work .desc p {
    line-height: 20px;
}

#work .desc .hidden {
    display: none;
}

#work .desc a {
    color: #4C60F4;
}

#work .desc {
    margin: 0 0 8px;
}

/* Свёртка описания — наше поведение (`is-clamped`), типографика — макета. */
/* F-R2-02: плавное раскрытие/свёртывание ~300 мс (источник длительности —
   макет `rs/js/work.js:71-75`, `slideDown(300)`; свёртывание — производное 300 мс).
   `max-height` анимируется инлайново из `work-view.js`; здесь — переход и кламп. */
#work .desc .desc-text {
    transition: max-height 0.3s ease;
}

#work .desc .desc-text.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#work .tag {
    background: #EBECF8;
}

/* Тег — ссылка (макет использует <div class='tag'>); цвет берём из макета. */
#work .tags a.tag {
    color: #000000;
}

#work .other {
    margin: 20px 0 0 0;
}

#work .other h4 {
    font-family: 'TT Firs Neue';
    font-style: normal;
    font-weight: 450;
    font-size: 24px;
    line-height: 32px;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
}

#work .slider .row {
    margin: 0;
}

/* --- F-R2-05: превью карточек «Других работ» ---
 * Контракт CardPreview (`card-preview.js`): внутри `[data-card-preview]` должен быть
 * потомок `[data-card-preview-clip]`, куда компонент вставляет `<video>`/iframe
 * (в `_other-card.php` был атрибут на самом `[data-card-preview]` — превью не стартовало).
 * Обложка остаётся фоном карточки (`.image.album`, как в макете `rs/video-work.html`),
 * поэтому clip-потомок растягивается поверх обложки. Правило — только для карточек
 * страницы работы, `card-preview.css` (общий с M10) не меняется. */
#work .other .card-preview > .card-preview__clip {
    position: absolute;
    inset: 0;
}

/* --- F-R2-03: слайдер рядов «Других работ» (механика — производная, без jQuery) ---
 * Разметка — макет `rs/video-work.html` (`.other > section.videos > .slider > .slides > .row×N`).
 * Механика bxSlider (`rs/js/work.js::manageSlider`, `infiniteLoop/auto/pause:3000/
 * stopAutoOnClick`) заменена ES6-компонентом `work-view.js::OtherWorksSlider`.
 * Перевод ряда — CSS `transform`, 0.5 s (дефолт bxSlider, в макете не переопределён).
 * Отступы/типографика заголовка — `rs/css/work.css:151-168`. */

#work .other .slider.is-active {
    overflow: hidden;
}

#work .other .slider.is-active .slides {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.5s ease;
    will-change: transform;
}

#work .other .slider.is-active .slides > .row {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
}

/* Возврат к первому ряду (цикл) и init — без анимации, чтобы не было рывка назад. */
#work .other .slider.is-active .slides.is-jumping {
    transition: none;
}

/* --- F-R2-03b/F-R2-03c: пагинация-точки «Других работ» (значения —
 * файл, который подключает макет `rs/video-work.html:11`,
 * `rs/bxslider-4-master/dist/jquery.bxslider.css:50-84`: точки 8×8,
 * radius 4px, `#D9D9D9`/active+hover `#000`, `margin 0 4px`, центрирование,
 * `padding-top:12px`). Белый `.bx-wrapper`-хром (absolute-позиционирование,
 * loader/controls) не воспроизводим — контейнер обычный блок под слайдером
 * (производное). Пагинация скрыта на ≤768 px (слайдер не активен). */
#work .other .other-pagination {
    text-align: center;
    padding-top: 12px;
    font-size: 0;
    line-height: 0;
}

#work .other .other-pagination .other-page {
    display: inline-block;
    vertical-align: bottom;
    width: 8px;
    height: 8px;
    margin: 0 4px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: #D9D9D9;
    text-indent: -9999px;
    overflow: hidden;
    cursor: pointer;
    outline: 0;
}

#work .other .other-pagination .other-page.is-active,
#work .other .other-pagination .other-page:hover,
#work .other .other-pagination .other-page:focus {
    background: #000;
}

#work .other .other-pagination .other-page:focus-visible {
    outline: 2px solid #4c60f4;
    outline-offset: 2px;
}

.scrollable {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    align-items: center;
    margin-right: -16px;
}
.scrollable > * {
    white-space: nowrap;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    flex-shrink: 0;
}
/* Скрываем скроллбар для Chrome, Safari и Opera */
.scrollable::-webkit-scrollbar {
    display: none;
}

#work .actions .button.bordered {
    border: 1px solid #4C60F4;
    color: #4C60F4;
    background: white;
}

#work .actions .button.bordered:active {
    outline: 2px solid #9BA7FD;
}

@media (hover: hover) and (pointer: fine) {
    #work .actions .button.bordered:hover {
        border-color: #344AF4;
        color: #344AF4;
        background: rgba(155, 167, 253, 0.2);
    }
}

/* --- Видео: 16:9 клик-плей (структура макета video-work.html) --- */

#work .work-content {
    position: relative;
}

.work-content__frame {
    position: relative;
    padding-top: 56.25%;
    width: 100%;
}

.work-content__player {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #000000;
    cursor: pointer;
    z-index: 2;
}

/* F-R2-07: `display:block` перебивал `[hidden]` — обложка оставалась над iframe.
   Клик по Play ставит атрибут `hidden`, здесь он реально скрывает слой обложки. */
.work-content__player[hidden] {
    display: none;
}

.work-content__player--static {
    cursor: default;
}

.work-content__cover {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-content__cover--empty {
    background: #d9d9d9;
}

.work-content__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.work-content__play .ui-icon {
    width: 72px;
    height: 72px;
}

.work-content__iframe {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000000;
    z-index: 1;
}

/* --- Состояние недоступности/Pro-ограничения (video-work-disabled.html) --- */

.disabled-video {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

/* Решение владельца 2026-11-17 (приёмка §8.1): размытая обложка вместо iframe.
   iframe/клик-блокер не рендерятся — URL плеера в HTML не попадает. */
.disabled-video__cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(31.9px);
    transform: scale(1.15);
}

.disabled-video-message {
    position: absolute;
    left: 50%;
    top: 50%;
    font-family: 'Inter';
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    letter-spacing: -0.03em;
    color: #FFFFFF;
    transform: translate(-50%, -50%);
    font-weight: 300;
    z-index: 2;
}

/* Производное состояние (кадра нет): типографика макета на нейтральном фоне. */
.state-media {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #F0F0F0;
    border-radius: 8px;
    overflow: hidden;
}

.state-media__text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 48px);
    text-align: center;
    font-family: 'Inter';
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.03em;
    color: #000000;
}

.state-media__edit {
    display: inline-block;
    margin: 12px 0 0;
    color: #4C60F4;
    font-family: 'Inter';
    font-size: 14px;
    line-height: 24px;
}

/* Владельческие подсказки Pro (макета владельческого ограничения нет — производное). */
.work-view__video-owner-hint {
    max-width: 960px;
    margin: 16px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: 12px;
    background: #f2f2f2;
    font-family: 'Inter';
}

.work-view__video-owner-hint-text {
    margin: 0;
    font-size: 14px;
}

.work-view__video-owner-cta {
    flex: 0 0 auto;
}

/* --- M09 Ф6b: фоторабота (слайдер, миниатюры, ошибки, Pro-блюр) ---
 * Сборка 1-в-1 по frontend/web/rs/photos-work.html; значения — rs/css/work.css:278-319
 * (max-heights Desktop/Tablet/Mobile: 640/495/375 — rs/css/work.css:289/332/392).
 * F-R2-26: desktop-cap по ТЗ §15.5.1 — 639 (макет 640; расхождение 1 px в пользу ТЗ). */

/* F-R2-25: лента кадров «как в макете» (bxslider): зазор 10 px (slideMargin),
 * margin 12 px — rs/css/work.css:278.
 * Решение владельца 17.11.2026 (сессия 30): кадр растягивается до максимума рамки
 * (contain с апскейлом, без обрезки), скругление — на кадре; обёртка — центрирование
 * (`table`-обёртка несовместима с растяжением). Высота рамки фиксирована, статична
 * (при перелистывании не меняется).
 * F-R2-27: проезд ленты — 200 мс (ТЗ §15.5.3; было 500 мс — дефолт bxslider). */
#work .images-viewport {
    overflow: hidden;
    margin: 0 0 12px;
    height: 639px;
}

#work .images-track {
    display: flex;
    gap: 10px;
    transition: transform 0.2s ease;
    height: 100%;
}

#work .images-slide {
    flex: 0 0 100%;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Решение владельца 17.11.2026 (сессия 30): обёртка — только центрирование
 * (без `table`, без radius/overflow). Скругление перераспределено на кадр (img),
 * центрирование обеспечивает флекс. */
#work .image-wrapper {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Решение владельца 17.11.2026 (сессия 30): кадр растягивается до максимума рамки
 * (contain с апскейлом, без обрезки): `height: 100%` даёт апскейл до высоты рамки,
 * `width: auto` — пропорцию, `max-width: 100%` при широком кадре ужимает его по
 * ширине с пересчётом высоты. Коробка `img` = видимому фото → `border-radius`
 * облегает контур изображения. Cap 639/495/375 — ТЗ §15.5.1 (на вьюпорте, ниже). */
#work .images-track img {
    display: block;
    height: 100%;
    width: auto;
    max-width: 100%;
    border-radius: 8px;
}

/* F-R2-28: миниатюры — одна строка с горизонтальным скроллом (ТЗ §15.5.2).
 * Паттерн `#breadcrumbs .links` (F-R2-17, выше): nowrap + overflow-x + скрытый
 * скроллбар. `justify-content: safe center` центрирует при достатке ширины и
 * не срезает левый край при переполнении (деградация до `center` допустима). */
#work .images-pagination {
    display: flex;
    flex-wrap: nowrap;
    justify-content: safe center;
    overflow-x: auto;
    margin: -8px auto 0;
    padding: 2px 0;
    scrollbar-width: none;
}

#work .images-pagination::-webkit-scrollbar {
    display: none;
}

#work .images-page {
    flex: 0 0 auto;
    margin: 0 4px 0;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    outline: 2px solid transparent;
    transition: 0.2s ease all;
    cursor: pointer;
    /* Семантическая кнопка: сброс хромовых стилей (в макете элемент — <div>). */
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 0;
    vertical-align: bottom;
}

#work .images-page.selected {
    outline: 2px solid #9BA7FD;
}

#work .images-page img {
    max-height: 68px;
    width: auto;
    height: auto;
}

/* Наши состояния (в макете нет): ошибка миниатюры, фокус. */
#work .images-page.is-error {
    opacity: 0.4;
}

#work .images-page:focus-visible {
    outline: 2px solid #4c60f4;
}

/* F-R2-27: плавность переключения кадра обеспечивает проезд ленты
 * (`.images-track`, 200 мс — ТЗ §15.5.3) — прежняя opacity-механика удалена. */

.work-view__photo--blurred {
    filter: blur(18px);
    transform: scale(1.03);
}

/* Ошибка загрузки основного кадра: кадр скрыт, показано состояние ошибки. */
.work-content--photo.is-error .images-slider {
    visibility: hidden;
}

.work-view__photo-error {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 24px;
    text-align: center;
    background: #f2f2f2;
    font-family: 'Inter';
    color: #000000;
}

.work-content--photo.is-error .work-view__photo-error {
    display: flex;
}

.work-view__photo-error-title {
    margin: 0;
    font-size: 16px;
}

.work-view__photo-error-text {
    margin: 0;
    font-size: 14px;
    color: #909090;
}

.work-view__photo-restriction {
    max-width: 960px;
    margin: 16px auto 0;
    text-align: center;
    font-family: 'Inter';
    font-size: 14px;
    color: #909090;
}

.work-view__photo-owner-hint {
    max-width: 960px;
    margin: 16px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: 12px;
    background: #f2f2f2;
    font-family: 'Inter';
}

.work-view__photo-owner-hint-text {
    margin: 0;
    font-size: 14px;
}

.work-view__photo-owner-cta {
    flex: 0 0 auto;
}

/* --- Шаринг (F-R2-19: дизайн-паритет по скриншотам/SVG владельца 2026-11-16) ---
   S20: правила диалога `.work-view-share*` вынесены в общий `css/share-dialog.css`
   (переиспользуются на странице работы и публичном шоуриле); здесь — только focus
   элементов самой страницы работы. */

#work .actions .button:focus-visible {
    outline: 2px solid #9BA7FD;
    outline-offset: 0;
}

#work .desc .more:focus-visible {
    outline: 2px solid #4c60f4;
    outline-offset: 2px;
}

/* --- Мобильные правила макета (rs/css/work.css:349-400) --- */

@media (max-width: 1024px) {
    /* F-R2-26: высота рамки ≤1024 — 495 px (ТЗ §15.5.1). */
    #work .images-viewport {
        height: 495px;
    }
}

@media (max-width: 768px) {
    #work {
        padding: 24px 16px;
        margin: 0 -16px;
        overflow: hidden;
    }
    #work .tags {
        margin: 8px -16px 0 0;
        padding: 0 0 0 0;
    }

    #work .work-content {
        margin: -24px -16px 0px -16px;
    }

    #work h3 {
        font-weight: 500;
        font-size: 18px;
        line-height: 24px;
        letter-spacing: -0.01em;
    }
    #work .actions {
        float: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin: 0 16px 16px 0;
    }
    #work .actions .button[data-action="edit"] {
        width: 100%;
        height: 40px;
    }
    #work .work-view__social-actions {
        margin-right: -16px;
        padding-right: 16px;
    }
    #work .work-data {
        margin: 0 0 16px;
    }
    #work .desc p {
        font-size: 14px;
    }
    #work .author-and-actions {
        margin: 0 -16px 8px 0;
    }
    #work .other h4 {
        font-family: 'Inter';
        font-size: 16px;
        line-height: 24px;
        margin: 0 0 12px;
    }
    /* F-R2-03: слайдер не активен — ряды стекаются вертикально (ТЗ §15.18.3).
       Промежуток между рядами — производное (кадра нет), значение из kit.css
       (mobile `gap: 20px` у `.videos .row`, kit.css:2937). */
    #work .other .slider .slides > .row {
        margin: 0 0 20px;
    }
    #work .other .slider .slides > .row:last-child {
        margin-bottom: 0;
    }
    /* F-R2-03b: ≤768 px слайдер не активен — пагинация скрыта. */
    #work .other .other-pagination {
        display: none;
    }
    /* F-R2-26: высота рамки ≤768 — 375 px (ТЗ §15.5.1);
     * F-R2-28: миниатюры — тот же скролл. */
    #work .images-viewport {
        height: 375px;
    }
}
