/* Формы подписки на email-рассылку (UniSender). Размеры — figma-backup/subscribe-forms/spec.md */

.subscribe {
    box-sizing: border-box;
    font-family: Inter, sans-serif;
    color: #1d1d1d;
}

.subscribe *,
.subscribe *::before,
.subscribe *::after {
    box-sizing: border-box;
}

.subscribe p {
    margin: 0;
}

.subscribe__form {
    display: flex;
    align-items: center;
    margin: 0;
}

.subscribe__input,
.subscribe__button {
    margin: 0;
    font-family: inherit;
    outline: none;
}

.subscribe__input {
    min-width: 0;
    background: #fff;
    color: #1d1d1d;
    -webkit-appearance: none;
    appearance: none;
}

.subscribe__input:focus {
    border-color: #fb8227;
}

.subscribe__button {
    flex: none;
    cursor: pointer;
    color: #fff;
    text-align: center;
    white-space: nowrap;
}

.subscribe__button:disabled {
    opacity: 0.6;
    cursor: default;
}

.subscribe__accent {
    color: #fb8227;
}

.subscribe__error {
    margin-top: 12px !important;
    font-size: 14px;
    line-height: 1.28;
    color: #d93a3a;
}

.subscribe__success {
    font-weight: 600;
    line-height: 1.12;
}

.subscribe__error[hidden],
.subscribe__success[hidden],
.subscribe__form[hidden] {
    display: none;
}

/* Футер: только поле и кнопка */
.site-footer__subscribe {
    flex: 0 1 331px;
    min-width: 0;
}

.subscribe--footer {
    width: 100%;
    max-width: 331px;
}

.subscribe--footer .subscribe__title {
    font-size: 14px;
    font-weight: 400;
    line-height: 16px;
    color: rgba(29, 29, 29, 0.6);
    text-align: left;
}

.subscribe--footer .subscribe__form {
    margin-top: 12px;
    gap: 10px;
}

.subscribe--footer .subscribe__input {
    flex: 1 1 194px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(29, 29, 29, 0.3);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.12;
    text-align: center;
}

.subscribe--footer .subscribe__input::placeholder {
    color: #9f9f9f;
}

.subscribe--footer .subscribe__button {
    width: 127px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #1d1d1d;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.12;
}

.subscribe--footer .subscribe__success {
    margin-top: 12px;
    font-size: 14px;
}

/* Светлая карточка: блог и кейсы */
.subscribe--card {
    width: 100%;
    max-width: 784px;
    padding: 40px;
    border-radius: 32px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.subscribe--card .subscribe__title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.12;
    text-align: left;
}

.subscribe--card .subscribe__form {
    margin-top: 24px;
    gap: 24px;
}

.subscribe--card .subscribe__input {
    flex: 1 1 0;
    max-width: 440px;
    height: 64px;
    padding: 0 24px;
    border: 1px solid rgba(29, 29, 29, 0.1);
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.28;
    text-align: left;
}

.subscribe--card .subscribe__button,
.subscribe--popup .subscribe__button {
    height: 64px;
    border: 1px solid #fb8227;
    border-radius: 16px;
    background: #fb8227;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.12;
}

.subscribe--card .subscribe__button {
    width: 240px;
}

.subscribe--card .subscribe__success {
    margin-top: 24px;
    font-size: 18px;
}

.subscribe-wrap {
    margin: 48px 0;
}

/* Кейс v2: форма на всю ширину ряда сетки, между «Команда» и «Другие кейсы» */
.case-v2-subscribe {
    grid-column: 1 / -1;
    margin-top: 48px;
    min-width: 0;
}

@media (min-width: 1024px) {
    .case-v2-subscribe {
        grid-row: 3;
    }

    .case-v2-body__grid > .case-v2-other {
        grid-row: 4;
    }
}

/* Попап книги ORM: справа, ближе к середине экрана, без затемнения; плашки сайта сверху и cookie снизу не перекрывает */
.subscribe-popup {
    position: fixed;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    z-index: 100000;
    width: 672px;
    max-width: calc(100% - 32px);
}

.subscribe-popup[hidden] {
    display: none;
}

.subscribe-popup__card {
    position: relative;
    width: 100%;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    border-radius: 32px;
    background: #1d1d1d;
}

.subscribe-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: #fff;
    font-family: inherit;
    font-size: 32px;
    line-height: 32px;
    cursor: pointer;
}

.subscribe--popup {
    position: relative;
    padding: 40px;
    color: #fff;
}

.subscribe--popup .subscribe__title {
    max-width: 400px;
    font-size: 44px;
    font-weight: 600;
    line-height: 1.12;
    color: #fb8227;
    text-align: left;
}

.subscribe--popup .subscribe__icon {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 120px;
    height: 120px;
}

.subscribe--popup .subscribe__text,
.subscribe--popup .subscribe__call {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.12;
}

.subscribe--popup .subscribe__text {
    margin-top: 34px;
    color: #cfcfcf;
}

.subscribe--popup .subscribe__line {
    height: 1px;
    margin: 24px 0;
    border: 0;
    background: #3b3b3b;
}

.subscribe--popup .subscribe__call {
    color: #fff;
}

.subscribe--popup .subscribe__form {
    margin-top: 24px;
    gap: 24px;
}

.subscribe--popup .subscribe__input {
    flex: 0 1 348px;
    height: 64px;
    padding: 0 24px;
    border: 1px solid rgba(29, 29, 29, 0.1);
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.28;
    text-align: left;
}

.subscribe--popup .subscribe__button {
    width: 220px;
}

.subscribe--popup .subscribe__success {
    margin-top: 24px;
    font-size: 24px;
    color: #fff;
}

@media (max-width: 719px) {
    .subscribe--card .subscribe__title {
        font-size: 20px;
    }

    .subscribe--card .subscribe__form,
    .subscribe--popup .subscribe__form {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .subscribe--card .subscribe__input,
    .subscribe--card .subscribe__button,
    .subscribe--popup .subscribe__input,
    .subscribe--popup .subscribe__button {
        width: 100%;
        max-width: none;
        flex: none;
    }

    .subscribe-popup {
        right: 16px;
        width: calc(100% - 32px);
    }

    .subscribe--popup {
        padding: 24px;
    }

    .subscribe--popup .subscribe__title {
        max-width: none;
        padding-right: 40px;
        font-size: 28px;
    }

    .subscribe--popup .subscribe__icon {
        display: none;
    }
}

/* Футер: подпись под логотипом (освобождает ширину ряда под поле подписки) */
.site-footer .site-footer__inner > .logo {
    flex-direction: column;
    align-items: flex-start;
}

.site-footer .site-footer__inner > .logo img,
.site-footer .site-footer__inner > .logo svg {
    margin-right: 0;
}

.site-footer .site-footer__inner > .logo span {
    margin-top: 16px;
    font-size: 12px;
    line-height: 16px;
    color: rgba(29, 29, 29, 0.6);
}

@media (max-width: 640px) {
    .site-footer__subscribe {
        margin-bottom: 1.25rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .site-footer__subscribe {
        margin-top: 16px;
    }
}
