/* === Floating Button === */
#telegram-agent-button {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #1d1d1f;
    border: 1px solid var(--color-gold);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    animation: pulse 2s infinite;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

#telegram-agent-button:hover {
    transform: scale(1.05);
    background-color: var(--color-gold);
}

/* === Icon inside button === */
#telegram-agent-button img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    pointer-events: none;
    filter: invert(1);
    /* za dark background */
}

/* === Pulse animation === */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

/* === Popup panel === */
#telegram-agent-popup {
    position: fixed;
    bottom: 90px;
    left: 24px;
    width: 340px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 9999;
}

#telegram-agent-popup h4 {
    font-size: 1rem;
    color: var(--color-gold);
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: center;
}

#telegram-agent-popup input,
#telegram-agent-popup textarea {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #1d1d1f;
    border: 1px solid #444;
    border-radius: 10px;
    color: #eee;
    font-size: 0.95rem;
    font-family: var(--font-primary);
}

#telegram-agent-popup button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--color-gold);
    color: var(--color-black);
    font-weight: 600;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
}

#telegram-agent-popup button:hover {
    background-color: white;
}

#telegram-status {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
}

input[name="hpot"] {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

#telegram-agent-popup button:disabled {
    background-color: #444 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.6;
}

.popup-close {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.75rem;
    background-color: var(--color-gold);
    color: var(--color-black);
    font-weight: 600;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
}

.popup-close:hover {
    color: white;
}