/* ============================================================
   Telegram Community CTAs — brand-blue, token-driven.
   Global (not scoped) because the paper-plane SVG is rendered
   via MarkupString and would miss Blazor's scoped attribute.
   ============================================================ */

.tg-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
    cursor: pointer;
}
.tg-cta:focus-visible {
    outline: 2px solid var(--telegram-strong);
    outline-offset: 2px;
}
.tg-icon { width: 1em; height: 1em; flex-shrink: 0; }

/* ── (1) Nav pill ───────────────────────────────────────── */
.tg-cta-navpill {
    position: relative;
    gap: 0.375rem;
    padding: 0.32rem 0.7rem;
    font-size: 0.75rem;
    color: var(--telegram-contrast);
    background: var(--telegram-gradient);
    box-shadow: 0 2px 8px rgba(34, 158, 217, 0.40);
}
.tg-cta-navpill .tg-icon { width: 0.85rem; height: 0.85rem; }
.tg-cta-navpill:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(34, 158, 217, 0.55); }
.tg-pulse {
    position: absolute; top: -3px; right: -3px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--bullish);
    border: 2px solid var(--bg-surface);
    animation: tg-pulse 2s ease-out infinite;
}
@keyframes tg-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--bullish-rgb), 0.6); }
    70%  { box-shadow: 0 0 0 6px rgba(var(--bullish-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--bullish-rgb), 0); }
}

/* ── (3) Floating pill ───────────────────────────────────
   Right edge (matches the "button on the right" brief). Base position =
   bottom-right, used on public pages (no Market Eye / toast stacks there).
   ──────────────────────────────────────────────────────── */
.tg-cta-floating {
    position: fixed;
    right: 1.25rem;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 8000;
    padding: 0.55rem 0.95rem;
    font-size: 0.8rem;
    border-radius: 24px;
    color: var(--telegram-contrast);
    background: var(--telegram-gradient);
    box-shadow: 0 8px 24px rgba(34, 158, 217, 0.50);
}
.tg-cta-floating .tg-icon { width: 0.95rem; height: 0.95rem; }
.tg-cta-floating:hover { transform: scale(1.05); }

/* App pages: stack ABOVE the Market Eye FAB (right:1.25rem; bottom:4.5rem; 52px)
   so the two never overlap, and clear of the bottom-LEFT live-alert toast stacks. */
.tg-cta-floating--stacked {
    bottom: calc(8rem + env(safe-area-inset-bottom, 0px));
}

/* Hide the floating pill while the mobile hamburger menu overlay is open
   (the overlay sits far below the pill's z-index). MainLayout renders
   #mobile-menu before the pill, so the general-sibling selector matches. */
#mobile-menu.open ~ .tg-cta-floating { display: none !important; }

/* ── (4) Hero trust strip ───────────────────────────────── */
.tg-cta-herostrip {
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 22px;
    color: var(--telegram-ink);
    background: var(--telegram-bg);
    border: 1px solid var(--telegram-border);
}
.tg-cta-herostrip:hover { background: rgba(34, 158, 217, 0.18); }
.tg-arrow { font-weight: 700; }

/* ── (5) Community band ─────────────────────────────────── */
.tg-band {
    text-align: center;
    padding: 2.25rem 1.5rem;
    margin: 2rem auto;
    max-width: 720px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(34, 158, 217, 0.16), var(--accent-primary-muted));
    border: 1px solid var(--telegram-border);
}
.tg-band-icon {
    width: 56px; height: 56px; margin: 0 auto 0.85rem;
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    color: var(--telegram-contrast);
    background: var(--telegram-gradient);
    box-shadow: 0 6px 18px rgba(34, 158, 217, 0.50);
}
.tg-band-icon .tg-icon { width: 1.75rem; height: 1.75rem; }
.tg-band-title { font-size: 1.4rem; font-weight: 800; color: var(--text-heading); margin: 0 0 0.4rem; }
.tg-band-sub { font-size: 0.9rem; color: var(--text-secondary); max-width: 460px; margin: 0 auto 1.25rem; }
.tg-cta-bandbtn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    color: var(--telegram-contrast);
    background: var(--telegram-gradient);
    box-shadow: 0 4px 16px rgba(34, 158, 217, 0.50);
}
.tg-cta-bandbtn:hover { transform: translateY(-1px); }

/* ── (2) Dashboard welcome card ─────────────────────────── */
.tg-welcome {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(34, 158, 217, 0.16), var(--accent-primary-muted));
    border: 1px solid var(--telegram-border);
    border-left: 3px solid var(--telegram);
}
.tg-welcome-icon {
    width: 42px; height: 42px; flex-shrink: 0;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    color: var(--telegram-contrast);
    background: var(--telegram-gradient);
    box-shadow: 0 4px 14px rgba(34, 158, 217, 0.45);
}
.tg-welcome-icon .tg-icon { width: 1.35rem; height: 1.35rem; }
.tg-welcome-text { flex: 1; min-width: 0; }
.tg-welcome-title { font-size: 0.9rem; font-weight: 700; color: var(--text-heading); }
.tg-welcome-sub { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.15rem; }
.tg-welcome-btn {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    color: var(--telegram-contrast);
    background: var(--telegram-gradient);
    box-shadow: 0 2px 10px rgba(34, 158, 217, 0.40);
}
.tg-welcome-btn:hover { transform: translateY(-1px); }
.tg-welcome-dismiss {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 1.25rem; line-height: 1;
    padding: 0 0.15rem;
}
.tg-welcome-dismiss:hover { color: var(--text-secondary); }

/* ── Responsive ─────────────────────────────────────────── */
/* Hide nav pill once the topnav collapses to the hamburger (at 1024px);
   the floating pill covers Telegram visibility below that. */
@media (max-width: 1023.98px) {
    .tg-cta-navpill { display: none; }
}
/* Collapse floating pill to icon-only on narrow screens. */
@media (max-width: 480px) {
    .tg-cta-floating-label { display: none; }
    .tg-cta-floating { padding: 0.6rem; border-radius: 50%; }
    .tg-welcome { flex-wrap: wrap; }
    .tg-welcome-btn { width: 100%; text-align: center; justify-content: center; }
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .tg-cta, .tg-pulse { transition: none; animation: none; }
}
