/* module_block_telegram_popup */

.tg-popup-block {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 340px;
    width: calc(100% - 40px);
    padding: 16px 18px;
    border-radius: 14px;

    background: var(--sidebar-block, #17181c);
    color: var(--text-color, #ffffff);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);

    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: opacity .35s ease, transform .35s ease, visibility .35s;
    font-family: inherit;
}

.tg-popup-block.tg-popup-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tg-popup-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tg-popup-content {
    flex: 1;
}

.tg-popup-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tg-popup-text {
    font-size: 13px;
    opacity: .75;
    line-height: 1.4;
    margin-bottom: 12px;
}

.tg-popup-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.tg-popup-btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 8px;
    background: #229ED9;
    color: #fff !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s ease, transform .15s ease;
}

.tg-popup-btn:hover {
    background: #1c86ba;
    transform: translateY(-1px);
}

.tg-popup-later {
    font-size: 12px;
    opacity: .55;
    cursor: pointer;
    text-decoration: underline;
    user-select: none;
}

.tg-popup-later:hover {
    opacity: .85;
}

.tg-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: inherit;
    opacity: .5;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.tg-popup-close:hover {
    opacity: 1;
}

@media (max-width: 480px) {
    .tg-popup-block {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
}

/* ====== Lead generation modal ====== */

.tg-lead-overlay {
    position: fixed;
    right: 20px;
    bottom: 90px;
    z-index: 9998;
    max-width: 340px;
    width: calc(100% - 40px);
    padding: 16px 18px;
    border-radius: 14px;

    background: var(--sidebar-block, #17181c);
    color: var(--text-color, #ffffff);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);

    display: flex;
    align-items: flex-start;
    gap: 12px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(200px);
    transition: opacity .35s ease, transform .35s ease, visibility .35s;
    font-family: inherit;
}

.tg-lead-overlay.tg-lead-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tg-lead-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: inherit;
    opacity: .5;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.tg-lead-close:hover {
    opacity: 1;
}

.tg-lead-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #229ED9;
    margin-bottom: 10px;
}

.tg-lead-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.tg-lead-content {
    flex: 1;
}

.tg-lead-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tg-lead-text {
    font-size: 13px;
    opacity: .75;
    line-height: 1.4;
    margin-bottom: 12px;
}

.tg-lead-btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 8px;
    background: #229ED9;
    color: #fff !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s ease, transform .15s ease;
}

.tg-lead-btn:hover {
    background: #1c86ba;
    transform: translateY(-1px);
}

.tg-lead-later {
    font-size: 12px;
    opacity: .55;
    cursor: pointer;
    text-decoration: underline;
    user-select: none;
    margin-left: 14px;
}

.tg-lead-later:hover {
    opacity: .85;
}

@media (max-width: 480px) {
    .tg-lead-overlay {
        right: 10px;
        bottom: 80px;
        left: 10px;
        width: auto;
        max-width: none;
    }
}
