/**
 * Новогодняя акция 2027 (Task #71397042) - перенос с dv-consulting.ru (Task #71397018, тема dv-consulting: ny-promo.css + offer-popup.css).
 * Липкая плашка с таймером (.ny-bar), маленькая плашка справа внизу после крестика (.ny-mini, только десктоп), попап с формой (.ny-popup).
 * Вид - 1:1 с dv (Figma «DV Consalting (Copy)», фрейм «Новогодняя акция • 2027 • стекло»), классы попапа offer-popup__* -> ny-popup__*.
 * Папка ny-promo самодостаточна (стили, скрипт, картинки img/, шрифт Golos Text fonts/) и одинакова на status.skolkovo-resident.ru
 * и в теме skolkovo; различаются только слои (--ny-z-*) ниже. После акции папку можно удалить целиком.
 * Только px, шрифт, цвета и box-sizing заданы явно: стили сайтов (Тильда, тема skolkovo) на плашку и попап не влияют.
 */
:root {
    --ny-z-bar: 8;          /* тема skolkovo: под мобильным меню (9), шапкой (10) и плашкой cookie (12) */
    --ny-z-popup: 10000;    /* над попапами темы (999, 9999) */
}

@font-face { font-family: "NY Golos Text"; src: url("fonts/GolosText-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "NY Golos Text"; src: url("fonts/GolosText-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "NY Golos Text"; src: url("fonts/GolosText-SemiBold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

.ny-bar, .ny-bar *, .ny-mini, .ny-mini *, .ny-popup, .ny-popup * {
    box-sizing: border-box;
}
.ny-bar, .ny-mini, .ny-popup {
    font-family: "NY Golos Text", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    letter-spacing: normal;
    text-align: left;
}

/* ---------- Плашка: десктоп (макет 1160x120; уже 1200 px - уменьшаем целиком через zoom) ---------- */
.ny-bar {
    position: fixed;
    z-index: var(--ny-z-bar);
    left: 50%;
    bottom: 20px;
    width: 1160px;
    color: #FFFFFF;
    opacity: 0;
    transform: translateX(-50%) translateY(calc(100% + 20px));
    transition: transform .4s ease, opacity .4s ease;
}
.ny-bar[hidden] { display: none; }
.ny-bar.is-visible {
    opacity: 1;
    transform: translateX(-50%);
}
.ny-bar__box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 120px;
    padding: 0 60px 0 238px;
    overflow: hidden;
    border-radius: 28px;
    background: url("img/bar-deco.svg") 0 0 / 1160px 120px no-repeat, #ED0E0E;
    box-shadow: 0 8px 32px rgba(23, 36, 58, 0.25);
}
.ny-bar__gift {
    position: absolute;
    left: 0;
    top: 0;
    width: 290px;
    height: 120px;
    max-width: none;
    pointer-events: none;
}
.ny-bar__title {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ny-bar__kicker { font-size: 14px; line-height: 17px; font-weight: 400; }
.ny-bar__head { font-size: 26px; line-height: 31px; font-weight: 500; }
.ny-bar__offer, .ny-bar__cap, .ny-bar__short { display: none; }
.ny-bar__nums {
    display: flex;
    align-items: flex-start;
}
.ny-bar__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 66px;
}
.ny-bar__unit b, .ny-bar__sep {
    font-size: 52px;
    line-height: 62px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.ny-bar__sep { margin: 0 12px; }
.ny-bar__label { font-size: 16px; line-height: 19px; font-weight: 400; }
.ny-bar__btn {
    flex-shrink: 0;
    height: 56px;
    margin: 0;
    padding: 0 28px;
    border: none;
    border-radius: 16px;
    background-color: #000000;
    font-family: inherit;
    font-size: 18px;
    line-height: 22px;
    font-weight: 500;
    color: #F0F5FF;
    cursor: pointer;
    transition: background-color .3s ease;
}
.ny-bar__btn:hover { background-color: #2B2B2B; }
/* Крестик (в макете нет) - справа от кнопки по центру высоты */
.ny-bar__close {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 32px;
    height: 32px;
    margin: -16px 0 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12) url("img/x-01.svg") 50% / 16px 16px no-repeat;
    cursor: pointer;
    transition: background-color .3s ease;
}
.ny-bar__close:hover { background-color: rgba(255, 255, 255, 0.3); }

@media (max-width: 1199px) { .ny-bar { zoom: .9; } }
@media (max-width: 1099px) { .ny-bar { zoom: .82; } }
@media (max-width: 999px) { .ny-bar { zoom: .78; } }

/* ---------- Плашка: мобильная (до 959 px) - 2 строки, ~110 px ---------- */
@media (max-width: 959px) {
    .ny-bar {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: 480px;
        margin: 0 auto;
        zoom: 1;
        transform: translateY(calc(100% + 12px));
    }
    .ny-bar.is-visible { transform: none; }
    .ny-bar__box {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas: "offer offer" "timer btn";
        align-items: center;
        gap: 10px 12px;
        height: auto;
        padding: 12px 14px;
        border-radius: 20px;
        background: url("img/bar-mob-deco.svg") 50% 0 / 375px 139px no-repeat, #ED0E0E;
    }
    .ny-bar__gift, .ny-bar__title, .ny-bar__sep, .ny-bar__label { display: none; }
    .ny-bar__offer {
        grid-area: offer;
        display: flex;
        align-items: center;
        gap: 10px;
        padding-right: 30px; /* крестик */
        font-size: 14px;
        line-height: 18px;
        font-weight: 600;
    }
    .ny-bar__offer-text {
        display: flex;
        flex-direction: column;
        font-size: 16px;
        line-height: 20px;
    }
    .ny-bar__offer-text small {
        font-size: 12px;
        line-height: 16px;
        font-weight: 400;
        opacity: .85;
    }
    /* «−20%» - как стеклянный ярлык на подарке десктопа */
    .ny-bar__chip {
        flex-shrink: 0;
        padding: 4px 8px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 10px;
        background: linear-gradient(120deg, #9C95D8 0%, #C9809F 100%);
        font-size: 17px;
        line-height: 22px;
        font-weight: 700;
        white-space: nowrap;
        transform: rotate(-6deg);
    }
    .ny-bar__timer {
        grid-area: timer;
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }
    .ny-bar__cap {
        display: block;
        font-size: 12px;
        line-height: 14px;
        font-weight: 400;
        opacity: .85;
    }
    .ny-bar__nums { align-items: baseline; gap: 8px; }
    .ny-bar__unit {
        flex-direction: row;
        align-items: baseline;
        gap: 2px;
        min-width: 0;
    }
    .ny-bar__unit b { font-size: 20px; line-height: 24px; }
    .ny-bar__short { display: inline; font-size: 13px; line-height: 16px; font-weight: 400; }
    .ny-bar__btn {
        grid-area: btn;
        height: 42px;
        padding: 0 16px;
        border-radius: 12px;
        font-size: 14px;
        line-height: 18px;
    }
    .ny-bar__close {
        top: 8px;
        right: 8px;
        width: 26px;
        height: 26px;
        margin: 0;
        background-size: 13px 13px;
    }
}

/* ---------- Маленькая плашка: справа внизу после закрытия большой, только десктоп ----------
   Figma «Mobile / Полный таймер» 4860:35039: 375, отступы 16, gap 12, строка 297 по центру, ленты - bar-mob-deco.svg */
.ny-mini {
    position: fixed;
    z-index: var(--ny-z-bar);
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 375px;
    padding: 16px;
    border-radius: 24px;
    background: url("img/bar-mob-deco.svg") 0 0 / 375px 139px no-repeat, #ED0E0E;
    box-shadow: 0 8px 32px rgba(23, 36, 58, 0.25);
    color: #FFFFFF;
    cursor: pointer;
    opacity: 0;
    transform: translateX(calc(100% + 20px));
    transition: transform .4s ease, opacity .4s ease;
}
.ny-mini[hidden] { display: none; }
.ny-mini.is-visible { opacity: 1; transform: none; }
.ny-mini:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.ny-mini__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    width: 297px;
    margin: 0 auto;
}
.ny-mini__title { width: 137px; font-size: 16px; line-height: 20px; font-weight: 600; }
.ny-mini__nums { display: flex; align-items: flex-start; }
.ny-mini__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 36px;
}
.ny-mini__unit b, .ny-mini__sep {
    font-size: 28px;
    line-height: 34px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.ny-mini__sep { margin: 0 4px; }
.ny-mini__unit small { font-size: 10px; line-height: 11px; font-weight: 400; }
.ny-mini__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    border-radius: 16px;
    background-color: #000000;
    font-size: 16px;
    line-height: 18px;
    font-weight: 500;
    color: #F0F5FF;
    transition: background-color .3s ease;
}
.ny-mini:hover .ny-mini__btn { background-color: #2B2B2B; }
@media (max-width: 959px) {
    .ny-mini { display: none !important; } /* на мобильном маленькой нет: крестик прячет акцию до конца визита */
}

/* ---------- Попап (каркас offer-popup.css dv + новогодний вид offer-popup--ny) ---------- */
.ny-popup {
    position: fixed;
    inset: 0;
    z-index: var(--ny-z-popup);
    display: flex;
    padding: 76px 24px 24px;
    overflow-y: auto;
    background-color: rgba(22, 22, 22, 0.5);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    opacity: 0;
    transition: opacity .3s ease;
}
.ny-popup[hidden] { display: none; }
.ny-popup.is-open { opacity: 1; }
.ny-popup__box {
    position: relative;
    display: flex;
    gap: 23px;
    width: 988px;
    min-height: 337px; /* высота макета: после отправки вместо формы короткое «Спасибо» - подарок не обрезается */
    margin: auto;
    padding: 30px;
    border-radius: 30px;
    background:
        url("img/popup-deco.svg") 0 0 / 988px 337px no-repeat,
        url("img/popup-gift.webp") 134px 85px / 466px 252px no-repeat,
        url("img/popup-bars.svg") right bottom / 834px 273px no-repeat,
        #ED0E0E;
    color: #FFFFFF;
    transform: translateY(24px);
    transition: transform .3s ease;
}
.ny-popup.is-open .ny-popup__box { transform: none; }
/* Кнопка закрытия - над попапом справа, на мобильном - внутри */
.ny-popup__close {
    position: absolute;
    top: -56px;
    right: 0;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1) url("img/x-01.svg") 50% / 20px 20px no-repeat;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    cursor: pointer;
}
.ny-popup__head {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 478px;
    flex-shrink: 0;
}
.ny-popup__chips { display: none; }
.ny-popup__title {
    max-width: 384px;
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    line-height: 38px;
    color: #FFFFFF;
}
.ny-popup__text {
    max-width: 320px; /* строки - как в макете (283), переносы <br class="ny-popup__br"> */
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    color: rgba(255, 255, 255, 0.8);
}
.ny-popup__form[hidden] { display: none; }
.ny-popup__form {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 427px;
    margin: 0;
}
.ny-popup__fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.ny-popup__field--wide { grid-column: 1 / 3; }
.ny-popup .ny-popup__fields input {
    display: block;
    width: 100%;
    height: 55px;
    margin: 0;
    padding: 0 24px;
    border: 1px solid #E9F1FF;
    border-radius: 16px;
    background-color: #E9F1FF;
    box-shadow: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    color: #000000;
    transition: border-color .3s ease;
}
.ny-popup .ny-popup__fields input:focus { border-color: #000000; outline: none; }
.ny-popup .ny-popup__fields input::placeholder { color: rgba(0, 0, 0, 0.6); opacity: 1; }
.ny-popup__consents {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ny-popup__check {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    max-width: 345px; /* текст 313 px, как в макете: первое согласие в две строки, второе в одну */
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}
.ny-popup__check input {
    position: absolute;
    width: 16px;
    height: 16px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.ny-popup__marker {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background-color: #E9F1FF;
}
/* Отмечено: светлый квадрат с черной галочкой (Tick_Square.svg - квадрат с вырезанной галочкой поверх черного) */
.ny-popup__check input:checked + .ny-popup__marker {
    background: #000000 url("img/Tick_Square.svg") 50% / 16px 16px no-repeat;
}
.ny-popup__check input:focus-visible + .ny-popup__marker { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.ny-popup__check.is-invalid .ny-popup__marker { outline: 2px solid #000000; outline-offset: 1px; }
.ny-popup__check a { color: #A2D0FF; text-decoration: underline; }
.ny-popup__check a:hover { color: #FFFFFF; }
.ny-popup__btn {
    width: 100%;
    height: 55px;
    margin: 0;
    padding: 8px 12px;
    border: none;
    border-radius: 16px;
    background-color: #000000;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 18px;
    color: #FFFFFF;
    cursor: pointer;
    transition: background-color .3s ease;
}
.ny-popup__btn:hover { background-color: #2B2B2B; }
.ny-popup__btn:disabled { opacity: .5; cursor: not-allowed; }
.ny-popup__error { margin: -10px 0 0; font-size: 14px; line-height: 18px; color: #FFFFFF; }
.ny-popup__error[hidden] { display: none; }
/* Успех (status: своя отправка, без попапа «Спасибо» сайта) */
.ny-popup__done {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    width: 427px;
    font-size: 16px;
    line-height: 22px;
}
.ny-popup__done[hidden] { display: none; }
.ny-popup__done b { font-size: 28px; line-height: 34px; font-weight: 600; }

/* Мобильный (Figma Mobile 375: карточка 351, отступы 24, поля в столбик) */
@media (max-width: 959px) {
    .ny-popup { padding: 24px 12px; }
    .ny-popup__box {
        flex-direction: column;
        gap: 24px;
        width: 100%;
        max-width: 400px;
        min-height: 0;
        padding: 24px;
        background:
            url("img/popup-mob-deco.svg") 0 0 / 351px 220px no-repeat,
            url("img/popup-mob-curve.svg") right bottom / 108px 105px no-repeat,
            #ED0E0E;
    }
    .ny-popup__close { top: 16px; right: 16px; }
    .ny-popup__head { gap: 12px; width: auto; padding-right: 0; }
    .ny-popup__chips {
        display: block;
        width: 302px;
        max-width: 100%;
        height: auto;
        margin-bottom: -9px; /* картинка выше рамки макета (85): ярлыки выступают вниз */
    }
    .ny-popup__title { max-width: none; font-size: 28px; line-height: 32px; }
    .ny-popup__text { max-width: 275px; font-size: 14px; line-height: 18px; color: #FFFFFF; }
    .ny-popup__br { display: none; }
    .ny-popup__form, .ny-popup__done { gap: 24px; width: auto; }
    .ny-popup__fields { grid-template-columns: 1fr; }
    .ny-popup__field--wide { grid-column: auto; }
}
