/* Вторая кнопка слайда и модальное окно (inc/slider-modal-link.php). */

/* Кнопки слайда: основная капсула + текстовая ссылка. */
.offer-slider__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 28px; }
.offer-slider__more {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
    padding: 0; border: 0; background: none; cursor: pointer; white-space: nowrap;
    color: #fff; font: 500 15px/1.2 'Jost', sans-serif; letter-spacing: .02em;
    text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 6px;
    transition: opacity .2s ease;
}
.offer-slider__more:hover { color: #fff; text-decoration-style: solid; }
.offer-slider__more:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
@media (max-width: 640px) {
    .offer-slider__actions { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
    .home-release-20260924-page .home-release-20260924-slider .offer-slider__actions .offer-slider__btn { width: 100%; }
    .offer-slider__actions .offer-slider__more { align-self: center; }
}

/* Окно. Пока закрыто, <dialog> скрыт браузером; повторное открытие перезапускает анимации. */
.omf-slide-modal {
    width: min(960px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 48px);
    margin: auto; padding: 0; border: 0; border-radius: 28px; overflow: auto; overscroll-behavior: contain;
    background: #f6f4ed; color: #30431e; box-shadow: 0 30px 80px rgba(12, 20, 14, .35);
    font-family: 'Jost', sans-serif;
}
.omf-slide-modal[open] { animation: omfSmDlg .5s cubic-bezier(.2, .7, .2, 1) .1s both; }
.omf-slide-modal::backdrop { background: rgba(16, 24, 14, .58); backdrop-filter: blur(4px); }
.omf-slide-modal[open]::backdrop { animation: omfSmOv .35s ease both; }
.omf-slide-modal.is-closing { animation: omfSmOut .22s ease both; }
.omf-slide-modal.is-closing::backdrop { animation: omfSmOvOut .22s ease both; }
html:has(.omf-slide-modal[open]) { overflow: hidden; }
@keyframes omfSmOv { from { opacity: 0; } }
@keyframes omfSmOvOut { to { opacity: 0; } }
@keyframes omfSmDlg { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes omfSmOut { to { opacity: 0; transform: translateY(16px) scale(.98); } }

.omf-slide-modal__panel { display: flex; flex-direction: column; gap: 24px; padding: 36px 40px 40px; }
.omf-slide-modal__handle { display: none; }
.omf-slide-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.omf-slide-modal__heading { display: flex; flex-direction: column; gap: 10px; }
.omf-slide-modal__eyebrow {
    margin: 0; color: #6d7a63; font: 500 12px/1.2 'Jost', sans-serif; letter-spacing: .13em; text-transform: uppercase;
}
.omf-slide-modal__title {
    margin: 0; color: #30431e; font: 400 clamp(30px, 3.1vw, 44px)/1 'Forum', serif; letter-spacing: -.02em; text-wrap: balance;
}
/* Глобальные стили темы делают h2/h3 прописными. */
.omf-slide-modal__title, .omf-slide-modal__step-title { text-transform: none; }
.omf-slide-modal__svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.omf-slide-modal__close {
    flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid #e2e6dc; border-radius: 50%; background: #fff; color: #30431e; cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.omf-slide-modal__close .omf-slide-modal__svg { width: 20px; height: 20px; }
.omf-slide-modal__close:hover { background: #e9edde; border-color: #bdc6b1; }
.omf-slide-modal__close:focus-visible,
.omf-slide-modal__cta:focus-visible { outline: 2px solid #30431e; outline-offset: 3px; }

/* Шаги. Карточка выезжает из-под предыдущей, затем шаги подсвечиваются по кругу. */
.omf-slide-modal__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.omf-slide-modal__step { position: relative; z-index: calc(10 - var(--i, 0)); display: flex; }
.omf-slide-modal[open] .omf-slide-modal__step { animation: omfSmCard .8s cubic-bezier(.2, .7, .2, 1) calc(.45s + var(--i, 0) * .45s) both; }
@keyframes omfSmCard { 0% { opacity: 0; transform: translateX(calc(-100% - 12px)); } 20% { opacity: 1; } }
.omf-slide-modal__card {
    flex-grow: 1; display: grid; grid-template-columns: 44px 1fr; grid-template-areas: "icon num" "title title" "text text" "chips chips";
    align-content: start; gap: 0; box-sizing: border-box; padding: 20px;
    border: 1px solid #e2e6dc; border-radius: 18px; background: #fff;
}
.omf-slide-modal__icon {
    grid-area: icon; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: #e6eddf; color: #30431e;
}
.omf-slide-modal__num { grid-area: num; align-self: center; justify-self: end; color: #b0bba4; font: 400 20px/1 'Forum', serif; }
.omf-slide-modal__step-title { grid-area: title; margin: 16px 0 8px; color: #30431e; font: 400 22px/1.15 'Forum', serif; text-wrap: balance; }
.omf-slide-modal__step-text { grid-area: text; margin: 0; color: #505b49; font: 400 14px/1.45 'Jost', sans-serif; text-wrap: pretty; }
.omf-slide-modal__chips { grid-area: chips; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.omf-slide-modal__chip {
    display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; box-sizing: border-box;
    border: 1px solid #c9d3bd; border-radius: 999px; color: #30431e; font: 400 12px/1 'Jost', sans-serif;
    animation: omfSmChip 8s ease infinite both;
}
/* Порядок подсветки чипов: 0, -6, -4, -2 с по макету. */
.omf-slide-modal__chip:nth-child(2) { animation-delay: -6s; }
.omf-slide-modal__chip:nth-child(3) { animation-delay: -4s; }
.omf-slide-modal__chip:nth-child(4) { animation-delay: -2s; }
@keyframes omfSmChip {
    0%, 22% { background: #30431e; border-color: #30431e; color: #fff; }
    28%, 100% { background: transparent; border-color: #c9d3bd; color: #30431e; }
}
.omf-slide-modal[open] .omf-slide-modal__step:nth-child(1) .omf-slide-modal__card { animation: omfSmHl1 7.5s linear 2.9s infinite both; }
.omf-slide-modal[open] .omf-slide-modal__step:nth-child(2) .omf-slide-modal__card { animation: omfSmHl2 7.5s linear 2.9s infinite both; }
.omf-slide-modal[open] .omf-slide-modal__step:nth-child(3) .omf-slide-modal__card { animation: omfSmHl3 7.5s linear 2.9s infinite both; }
.omf-slide-modal[open] .omf-slide-modal__step:nth-child(1) .omf-slide-modal__icon { animation: omfSmIco1 7.5s ease 2.9s infinite both; }
.omf-slide-modal[open] .omf-slide-modal__step:nth-child(2) .omf-slide-modal__icon { animation: omfSmIco2 7.5s ease 2.9s infinite both; }
.omf-slide-modal[open] .omf-slide-modal__step:nth-child(3) .omf-slide-modal__icon { animation: omfSmIco3 7.5s ease 2.9s infinite both; }
@keyframes omfSmHl1 { 0%, 30% { border-color: #30431e; background: #eef2e8; transform: translateY(-4px); } 36%, 100% { border-color: #e2e6dc; background: #fff; transform: none; } }
@keyframes omfSmHl2 { 0%, 30% { border-color: #e2e6dc; background: #fff; transform: none; } 36%, 60% { border-color: #30431e; background: #eef2e8; transform: translateY(-4px); } 66%, 100% { border-color: #e2e6dc; background: #fff; transform: none; } }
@keyframes omfSmHl3 { 0%, 60% { border-color: #e2e6dc; background: #fff; transform: none; } 66%, 90% { border-color: #30431e; background: #eef2e8; transform: translateY(-4px); } 96%, 100% { border-color: #e2e6dc; background: #fff; transform: none; } }
@keyframes omfSmIco1 { 0%, 30% { background: #30431e; color: #fff; } 36%, 100% { background: #e6eddf; color: #30431e; } }
@keyframes omfSmIco2 { 0%, 30% { background: #e6eddf; color: #30431e; } 36%, 60% { background: #30431e; color: #fff; } 66%, 100% { background: #e6eddf; color: #30431e; } }
@keyframes omfSmIco3 { 0%, 60% { background: #e6eddf; color: #30431e; } 66%, 90% { background: #30431e; color: #fff; } 96%, 100% { background: #e6eddf; color: #30431e; } }

/* Итог: длительность, цена и запись. */
.omf-slide-modal__foot {
    display: flex; align-items: center; gap: 24px; padding: 18px 18px 18px 20px;
    border-radius: 18px; background: #30431e; color: #fff;
}
.omf-slide-modal[open] .omf-slide-modal__foot { animation: omfSmFoot .6s cubic-bezier(.2, .7, .2, 1) 1.8s both; }
@keyframes omfSmFoot { from { opacity: 0; transform: translateY(16px); } }
.omf-slide-modal__foot-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.omf-slide-modal__facts { display: flex; align-items: center; gap: 24px; margin: 0; }
.omf-slide-modal__fact { display: flex; flex-direction: column-reverse; gap: 4px; }
.omf-slide-modal__fact + .omf-slide-modal__fact { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .22); }
.omf-slide-modal__fact dd { margin: 0; color: #fff; font: 400 30px/1 'Forum', serif; white-space: nowrap; }
.omf-slide-modal__fact dt { color: #e3e9db; font: 400 13px/1.3 'Jost', sans-serif; }
.omf-slide-modal__cta {
    display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 48px;
    margin-left: auto; padding: 0 32px; border-radius: 999px; background: #fff; color: #30431e;
    font: 500 13px/1.2 'Jost', sans-serif; letter-spacing: .1em; text-transform: uppercase;
    text-decoration: none; white-space: nowrap; transition: background .2s ease;
}
.omf-slide-modal__cta:hover { background: #e9edde; color: #30431e; }
.omf-slide-modal[open] .omf-slide-modal__cta { animation: omfSmCta 7.5s ease 2.9s infinite both; }
.omf-slide-modal__foot .omf-slide-modal__cta:focus-visible { outline-color: #fff; }
@keyframes omfSmCta { 0%, 88% { transform: none; } 92% { transform: scale(1.05); } 96%, 100% { transform: none; } }

/* Узкое окно: шаги столбиком, иконка слева от текста. */
@media (max-width: 900px) {
    .omf-slide-modal__steps { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .omf-slide-modal__card {
        grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "icon title num" "icon text text" "icon chips chips";
        column-gap: 14px; padding: 14px 16px;
    }
    .omf-slide-modal__icon { width: 40px; height: 40px; }
    .omf-slide-modal__icon .omf-slide-modal__svg { width: 20px; height: 20px; }
    .omf-slide-modal__num { align-self: baseline; font-size: 16px; }
    .omf-slide-modal__step-title { margin: 0 0 4px; font-size: 20px; }
    .omf-slide-modal__chips { margin-top: 8px; }
    .omf-slide-modal[open] .omf-slide-modal__step { animation-name: omfSmCardDown; }
    @keyframes omfSmCardDown { 0% { opacity: 0; transform: translateY(-60px) scale(.97); } 25% { opacity: 1; } }
}

/* Телефон: шторка снизу. */
@media (max-width: 640px) {
    .omf-slide-modal {
        width: 100%; max-height: calc(100dvh - 24px); margin: auto 0 0;
        border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px rgba(12, 20, 14, .3);
    }
    .omf-slide-modal[open] { animation: omfSmSheet .5s cubic-bezier(.2, .7, .2, 1) .05s both; }
    .omf-slide-modal.is-closing { animation: omfSmSheetOut .25s ease-in both; }
    @keyframes omfSmSheet { from { transform: translateY(100%); } }
    @keyframes omfSmSheetOut { to { transform: translateY(100%); } }
    .omf-slide-modal::backdrop { backdrop-filter: none; }
    .omf-slide-modal__panel { gap: 18px; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); }
    .omf-slide-modal__handle { display: block; align-self: center; width: 40px; height: 4px; border-radius: 4px; background: #c9d3bd; }
    .omf-slide-modal__heading { gap: 8px; }
    .omf-slide-modal__title { font-size: 30px; }
    .omf-slide-modal__foot { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
    .omf-slide-modal__foot-icon { display: none; }
    .omf-slide-modal__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .omf-slide-modal__fact + .omf-slide-modal__fact { padding-left: 0; border-left: 0; }
    .omf-slide-modal__fact dd { font-size: 28px; }
    .omf-slide-modal__cta { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .omf-slide-modal[open], .omf-slide-modal[open]::backdrop, .omf-slide-modal.is-closing, .omf-slide-modal.is-closing::backdrop,
    .omf-slide-modal[open] .omf-slide-modal__step, .omf-slide-modal[open] .omf-slide-modal__card, .omf-slide-modal[open] .omf-slide-modal__icon,
    .omf-slide-modal[open] .omf-slide-modal__foot, .omf-slide-modal[open] .omf-slide-modal__cta, .omf-slide-modal__chip { animation: none !important; }
}
