/* =========================================================
   HABITS V2 — ПУСТОЕ СОСТОЯНИЕ
   ========================================================= */

:root {
    --habits-v2-text: #232428;
    --habits-v2-muted: #a5a7ad;
    --habits-v2-blue: #2f7fe5;
    --habits-v2-button-bg: #eef5ff;
}


/* =========================================================
   СТРАНИЦА HABITS V2
   ========================================================= */

#habits-v2-page {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100dvh;
    min-height: 100vh;

    margin: 0;
    padding: 0;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(255, 255, 255, 0.99) 0%,
            rgba(250, 251, 253, 0.97) 55%,
            rgba(247, 249, 252, 1) 100%
        );
}

#habits-v2-page .page-content {
    position: relative;

    width: 100%;
    height: 100%;
    min-height: 100dvh;

    margin: 0;
    padding: 0;

    overflow: hidden;
    background: transparent;
}


/* Скрываем старый игровой header только на странице V2 */

#game-root:has(#habits-v2-page.active) #header-root {
    display: none !important;
}

#game-root:has(#habits-v2-page.active) {
    min-height: 100dvh;
    margin: 0;
    padding: 0;
}


/* =========================================================
   ПУСТОЕ СОСТОЯНИЕ
   ========================================================= */

.habits-v2-empty {
    position: relative;

    width: 100%;
    height: 100%;
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    padding:
        max(16px, env(safe-area-inset-top))
        16px
        calc(92px + env(safe-area-inset-bottom));
}

.habits-v2-empty__content {
    position: relative;

    width: 100%;
    max-width: 390px;

    display: flex;
    flex-direction: column;
    align-items: center;

    box-sizing: border-box;
    text-align: center;

    transform: translateY(24px);
}


/* =========================================================
   ДАТА
   ========================================================= */

.habits-v2-empty__date {
    margin: 0 0 24px;

    color: var(--habits-v2-muted);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        Inter,
        Arial,
        sans-serif;

    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;

    white-space: nowrap;

    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}


/* =========================================================
   ОСНОВНОЙ ЗАГОЛОВОК
   ========================================================= */

.habits-v2-empty__title {
    margin: 0;

    color: var(--habits-v2-text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        Inter,
        Arial,
        sans-serif;

    font-size: 34px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.04em;

    white-space: nowrap;

    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}


/* =========================================================
   ПОДЗАГОЛОВОК
   ========================================================= */

.habits-v2-empty__subtitle {
    margin-top: 5px;

    color: var(--habits-v2-muted);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        Inter,
        Arial,
        sans-serif;

    font-size: 33px;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.04em;

    white-space: nowrap;

    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}


/* =========================================================
   КНОПКА +
   ========================================================= */

.habits-v2-empty__add-button {
    position: relative;

    width: 96px;
    height: 96px;

    margin-top: 54px;
    padding: 0 0 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    border: none;
    border-radius: 50%;
    outline: none;

    color: var(--habits-v2-blue);

    background:
        radial-gradient(
            circle at 38% 28%,
            #f9fcff 0%,
            var(--habits-v2-button-bg) 60%,
            #e8f1fc 100%
        );

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        Inter,
        Arial,
        sans-serif;

    font-size: 56px;
    font-weight: 250;
    line-height: 1;

    cursor: pointer;
    user-select: none;

    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;

    box-shadow:
        0 14px 26px rgba(78, 105, 140, 0.15),
        0 5px 12px rgba(78, 105, 140, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.95);

    transition:
        transform 90ms ease,
        box-shadow 90ms ease,
        opacity 90ms ease;
        touch-action: manipulation;
}

.habits-v2-empty__add-button.is-pressed,
.habits-v2-empty__add-button:active {
    transform: scale(0.92);

    opacity: 0.88;

    box-shadow:
        0 7px 14px rgba(78, 105, 140, 0.12),
        0 2px 6px rgba(78, 105, 140, 0.07),
        inset 0 2px 4px rgba(47, 127, 229, 0.08);
}

.habits-v2-empty__add-button:focus {
    outline: none;
}

.habits-v2-empty__add-button:focus-visible {
    box-shadow:
        0 14px 26px rgba(78, 105, 140, 0.15),
        0 0 0 4px rgba(47, 127, 229, 0.14);
}


/* =========================================================
   СРЕДНИЕ И БОЛЬШИЕ ТЕЛЕФОНЫ
   ========================================================= */

@media (min-width: 431px) {

    .habits-v2-empty__content {
        max-width: 430px;
        transform: translateY(20px);
    }

    .habits-v2-empty__date {
        margin-bottom: 26px;
        font-size: 19px;
    }

    .habits-v2-empty__title {
        font-size: 36px;
    }

    .habits-v2-empty__subtitle {
        font-size: 35px;
    }

    .habits-v2-empty__add-button {
        width: 102px;
        height: 102px;

        margin-top: 58px;

        font-size: 59px;
    }
}


/* =========================================================
   УЗКИЕ ТЕЛЕФОНЫ
   ========================================================= */

@media (max-width: 370px) {

    .habits-v2-empty {
        padding-left: 12px;
        padding-right: 12px;
    }

    .habits-v2-empty__content {
        max-width: 350px;
        transform: translateY(18px);
    }

    .habits-v2-empty__date {
        margin-bottom: 21px;
        font-size: 17px;
    }

    .habits-v2-empty__title {
        font-size: 30px;
    }

    .habits-v2-empty__subtitle {
        margin-top: 4px;
        font-size: 29px;
    }

    .habits-v2-empty__add-button {
        width: 88px;
        height: 88px;

        margin-top: 46px;
        padding-bottom: 5px;

        font-size: 51px;
    }
}


/* =========================================================
   НИЗКИЕ ЭКРАНЫ TELEGRAM
   ========================================================= */

@media (max-height: 720px) {

    .habits-v2-empty__content {
        transform: translateY(8px);
    }

    .habits-v2-empty__date {
        margin-bottom: 18px;
    }

    .habits-v2-empty__add-button {
        margin-top: 40px;
    }
}


/* Совсем низкие экраны */

@media (max-height: 620px) {

    .habits-v2-empty__content {
        transform: translateY(2px);
    }

    .habits-v2-empty__date {
        margin-bottom: 15px;
        font-size: 16px;
    }

    .habits-v2-empty__title {
        font-size: 29px;
    }

    .habits-v2-empty__subtitle {
        font-size: 28px;
    }

    .habits-v2-empty__add-button {
        width: 82px;
        height: 82px;

        margin-top: 34px;

        font-size: 48px;
    }
}