/* ==========================================
   HINTS - подсказки, офлайн, принудительное обновление
   v2.1 — усиление mobile / fixed overlays
   ========================================== */

.hint-card {
    position: fixed !important;
    bottom: 24px;
    right: 24px;
    left: auto;
    top: auto;
    width: min(320px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.10);
    z-index: 100150 !important;
    overflow: hidden;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
    pointer-events: none;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.hint-card.hint-card--visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.hint-card.hint-card--hiding {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.hint-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 6px;
    background: linear-gradient(135deg, #1a6b6d 0%, #2d9fa2 100%);
    color: white;
}

.hint-card__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.hint-card__close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.hint-card__close:hover {
    background: rgba(255, 255, 255, 0.45);
}

.hint-card__body {
    padding: 12px 14px 14px;
}

.hint-card__text {
    font-size: 13px;
    font-weight: 500;
    color: #2a2a2a;
    line-height: 1.5;
    margin: 0 0 12px;
}

.hint-card__action {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 12px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #1a6b6d 0%, #2d9fa2 100%);
    min-height: 44px;
}

.hint-card__action:hover {
    filter: brightness(1.05);
}

/* Кнопка входа для гостей — как «Уже есть аккаунт? Войти» в модалке */
@keyframes dodzuAuthHeaderShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes dodzuAuthHeaderPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.45);
    }
    50% {
        transform: scale(1.12);
        box-shadow: 0 0 0 8px rgba(168, 85, 247, 0);
    }
}

.header__login-btn.header__login-btn--pulse {
    background: linear-gradient(90deg, #6b21a8 0%, #a855f7 35%, #c084fc 50%, #a855f7 65%, #6b21a8 100%) !important;
    background-size: 200% 100% !important;
    background-color: transparent !important;
    outline: none;
    color: #fff;
    animation:
        dodzuAuthHeaderShine 2.4s linear infinite,
        dodzuAuthHeaderPulse 1.8s ease-in-out infinite;
}

.header__login-btn.header__login-btn--pulse:hover {
    filter: brightness(1.08);
}

.header__login-btn.header__login-btn--pulse svg {
    color: #fff;
    stroke: #fff;
}

/* Баннер «нет интернета» */
.dodzu-network-banner {
    position: fixed !important;
    top: 72px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%) translateY(-12px);
    z-index: 100160 !important;
    max-width: min(560px, calc(100vw - 24px));
    width: max-content;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #c0392b;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-sizing: border-box;
}

.dodzu-network-banner--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dodzu-network-banner__text {
    font-size: 13px;
    line-height: 1.4;
    flex: 1;
}

.dodzu-network-banner__close {
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

/* Принудительное обновление от админа */
.dodzu-force-update {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 2147483000 !important;
    background: rgba(10, 20, 24, 0.78) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
}

.dodzu-force-update__box {
    width: min(420px, 100%);
    max-height: min(90vh, 90dvh);
    overflow-y: auto;
    background: #fff !important;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    text-align: center;
    box-sizing: border-box;
}

.dodzu-force-update__title {
    margin: 0 0 10px;
    font-size: 20px;
    color: #1a303f;
}

.dodzu-force-update__text {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #4a5568;
}

.dodzu-force-update__btn {
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #1a6b6d 0%, #2d9fa2 100%);
    min-height: 48px;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.dodzu-force-update__btn:hover,
.dodzu-force-update__btn:active {
    filter: brightness(1.05);
}

@media (max-width: 880px) {
    .hint-card {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }

    .dodzu-network-banner {
        top: auto;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        transform: translateY(12px);
    }

    .dodzu-network-banner--visible {
        transform: translateY(0);
    }

    .header__login-btn.header__login-btn--pulse {
        animation:
            dodzuAuthHeaderShine 2.4s linear infinite,
            dodzuAuthHeaderPulse 1.8s ease-in-out infinite;
    }

    .dodzu-force-update {
        padding: 12px !important;
        align-items: center !important;
        /* iOS: fixed поверх адресной строки */
        padding-top: max(12px, env(safe-area-inset-top, 0px)) !important;
        padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
    }

    .dodzu-force-update__box {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .dodzu-force-update__title {
        font-size: 18px;
    }

    .dodzu-force-update__text {
        font-size: 14px;
    }
}
