/* GoalLogic Telegram Pop-up Banner */

.telegram-banner {
    /* Base styles inherit from .cookie-banner defined in cookie_banner.css */
    /* Wait, I should make sure it works independently if cookie banner css is changed */
    position: fixed;
    bottom: -100%; /* Hidden by default, animated in */
    left: 0;
    width: 100%;
    z-index: 9998; /* Just below cookie banner in case both appear, but we'll manage via JS */
    padding: 20px;
    background: transparent;
    pointer-events: none; /* Let clicks pass through when hidden */
    transition: bottom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy slide-up */
}

.telegram-banner.visible {
    bottom: 0;
    pointer-events: auto;
}

.telegram-banner-inner {
    max-width: 900px;
    margin: 0 auto;
    background: var(--surface-card, #1e293b);
    border: 1px solid rgba(56, 189, 248, 0.3); /* Telegram Blueish border */
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.05) inset;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.telegram-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.telegram-icon {
    font-size: 28px;
    color: #fff;
    background: linear-gradient(135deg, #38bdf8, #0284c7); /* Telegram blue gradient */
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.telegram-text h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
}

.telegram-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary, #94a3b8);
}

.telegram-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.telegram-join {
    background: linear-gradient(135deg, #38bdf8, #0284c7) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.telegram-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.4);
    background: linear-gradient(135deg, #7dd3fc, #0369a1) !important;
}

.telegram-close {
    background: transparent !important;
    color: var(--text-secondary, #94a3b8) !important;
    border: 1px solid var(--border-color, #334155) !important;
}

.telegram-close:hover {
    background: rgba(255,255,255,0.05) !important;
    color: var(--text-primary, #f8fafc) !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .telegram-banner.visible {
        bottom: calc(60px + env(safe-area-inset-bottom));
    }

    .telegram-banner {
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .telegram-banner-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 20px;
    }

    .telegram-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .telegram-icon {
        margin: 0 auto;
    }

    .telegram-actions {
        flex-direction: column;
        gap: 10px;
    }

    .cookie-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
}
