.telegram-consent-open {
    overflow: hidden;
}

.telegram-consent {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 240ms ease, visibility 240ms ease;
}

.telegram-consent.is-open {
    opacity: 1;
    visibility: visible;
}

.telegram-consent__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(6px);
}

.telegram-consent__dialog {
    position: relative;
    width: min(680px, 100%);
    padding: 54px 58px 50px;
    color: #f4f0e5;
    text-align: center;
    background:
        linear-gradient(145deg, rgba(212, 175, 55, 0.08), transparent 38%),
        rgba(7, 7, 6, 0.98);
    border: 1px solid rgba(212, 175, 55, 0.42);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.72);
    transform: translateY(18px) scale(0.985);
    transition: transform 240ms ease, background 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.telegram-consent.is-open .telegram-consent__dialog {
    transform: translateY(0) scale(1);
}

.telegram-consent__dialog::before,
.telegram-consent__dialog::after {
    content: "";
    position: absolute;
    pointer-events: none;
    opacity: 0.3;
    transition: opacity 300ms ease;
}

.telegram-consent__dialog::before {
    top: -10px;
    bottom: -10px;
    left: 15px;
    right: 15px;
    border-left: 1px solid #d4af37;
    border-right: 1px solid #d4af37;
}

.telegram-consent__dialog::after {
    top: 15px;
    bottom: 15px;
    left: -10px;
    right: -10px;
    border-top: 1px solid #d4af37;
    border-bottom: 1px solid #d4af37;
}

.telegram-consent.is-open .telegram-consent__dialog:hover {
    transform: translateY(-5px) scale(1);
    background: rgba(7, 7, 6, 0.88);
    border-color: #d4af37;
    box-shadow: 0 18px 58px rgba(212, 175, 55, 0.14);
}

.telegram-consent__dialog:hover::before,
.telegram-consent__dialog:hover::after {
    opacity: 0.8;
}

.telegram-consent__close {
    position: absolute;
    top: 25px;
    right: 26px;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #d9c36e;
    font: 300 28px/1 "Montserrat", sans-serif;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 180ms ease, transform 180ms ease;
}

.telegram-consent__close:hover,
.telegram-consent__close:focus-visible {
    color: #fff8df;
    transform: rotate(90deg);
    outline: none;
}

.telegram-consent__icon {
    display: block;
    width: 88px;
    height: 88px;
    margin: 0 auto 25px;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(212, 175, 55, 0.18));
}

.telegram-consent__text {
    max-width: 570px;
    margin: 0 auto 30px;
    color: rgba(244, 240, 229, 0.78);
    font: 400 15px/1.72 "Montserrat", sans-serif;
}

.telegram-consent__text a {
    color: #ddc76f;
    text-decoration: underline;
    text-decoration-color: rgba(221, 199, 111, 0.55);
    text-underline-offset: 4px;
    transition: color 180ms ease;
}

.telegram-consent__text a:hover,
.telegram-consent__text a:focus-visible {
    color: #fff4c5;
    outline: none;
}

.telegram-consent__continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(399px, 100%);
    min-height: 67px;
    padding: 14px 28px;
    color: #12100a;
    font-family: "Cormorant Garamond", serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    background: linear-gradient(105deg, #dbb93f, #fff8dc);
    border: 1px solid rgba(255, 244, 197, 0.72);
    box-shadow: 0 10px 34px rgba(212, 175, 55, 0.16);
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.telegram-consent__continue:hover,
.telegram-consent__continue:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 42px rgba(212, 175, 55, 0.29);
    filter: brightness(1.04);
    outline: none;
}

@media (max-width: 640px) {
    .telegram-consent { padding: 16px; }
    .telegram-consent__dialog { padding: 48px 24px 42px; }
    .telegram-consent__close { top: 20px; right: 18px; }
    .telegram-consent__icon { width: 76px; height: 76px; margin-bottom: 22px; }
    .telegram-consent__text { font-size: 14px; line-height: 1.62; }
    .telegram-consent__continue { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .telegram-consent,
    .telegram-consent__dialog,
    .telegram-consent__close,
    .telegram-consent__continue {
        transition: none;
    }
}
