.telegram-updates-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 20px;
}

.telegram-updates-modal[hidden] { display: none; }

.telegram-updates-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.telegram-updates-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(430px, calc(100vw - 32px));
    padding: 32px 30px 27px;
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: 28px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 28px 90px rgba(15, 23, 42, .3);
    color: #17253a;
    text-align: center;
    animation: telegram-updates-modal-in 220ms ease-out both;
}

.telegram-updates-modal__close {
    position: absolute;
    top: 13px;
    right: 14px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 11px;
    color: #8290a0;
    background: #f3f6f8;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease;
}

.telegram-updates-modal__close:hover,
.telegram-updates-modal__close:focus-visible { color: #e85f32; background: #fff0e8; }

.telegram-updates-modal__icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    place-items: center;
    border: 1px solid #bde8d4;
    border-radius: 18px;
    color: #159b69;
    background: #e8f8ef;
}

.telegram-updates-modal__icon svg { width: 30px; height: 30px; }

.telegram-updates-modal__eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #159b69;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.telegram-updates-modal__dialog h2 {
    margin: 0;
    color: #17253a;
    font-size: clamp(24px, 5vw, 30px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.telegram-updates-modal__dialog p {
    max-width: 350px;
    margin: 12px auto 22px;
    color: #718196;
    font-size: 13px;
    line-height: 1.55;
}

.telegram-updates-modal__cta,
.telegram-updates-modal__dismiss {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.telegram-updates-modal__cta {
    border: 1px solid #159b69;
    color: #fff;
    background: #159b69;
    box-shadow: 0 10px 22px rgba(21, 155, 105, .2);
}

.telegram-updates-modal__cta:hover,
.telegram-updates-modal__cta:focus-visible { background: #107e55; transform: translateY(-1px); }

.telegram-updates-modal__dismiss {
    margin-top: 9px;
    border: 1px solid transparent;
    color: #8390a0;
    background: transparent;
}

.telegram-updates-modal__dismiss:hover,
.telegram-updates-modal__dismiss:focus-visible { border-color: #e5eaee; color: #526276; background: #f7f9fa; }

html[data-theme="dark"] .telegram-updates-modal__dialog { border-color: rgba(148, 163, 184, .26); background: #172231; color: #f8fafc; }
html[data-theme="dark"] .telegram-updates-modal__dialog h2 { color: #f8fafc; }
html[data-theme="dark"] .telegram-updates-modal__dialog p { color: #afbdcd; }
html[data-theme="dark"] .telegram-updates-modal__close { color: #b4c0cf; background: #243244; }
html[data-theme="dark"] .telegram-updates-modal__close:hover,
html[data-theme="dark"] .telegram-updates-modal__close:focus-visible { color: #ff9a70; background: #3a2b2d; }
html[data-theme="dark"] .telegram-updates-modal__dismiss:hover,
html[data-theme="dark"] .telegram-updates-modal__dismiss:focus-visible { border-color: #35465b; color: #d5dfeb; background: #243244; }

@keyframes telegram-updates-modal-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
    .telegram-updates-modal { padding: 14px; }
    .telegram-updates-modal__dialog { padding: 28px 20px 21px; border-radius: 23px; }
}

@media (prefers-reduced-motion: reduce) {
    .telegram-updates-modal__dialog { animation: none; }
    .telegram-updates-modal__cta,
    .telegram-updates-modal__dismiss,
    .telegram-updates-modal__close { transition: none; }
}
