/* Telegram Widget Styles */

/* Кнопка в правом нижнем углу */
.telegram-widget-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    min-width: 140px;
    height: 50px;
    background-color: #e53935;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    border: none;
    padding: 0 20px;
}

.telegram-widget-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229, 57, 53, 0.6);
    background-color: #c62828;
}

.telegram-widget-button svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.telegram-widget-button-text {
    color: white;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

/* Всплывающее окно Telegram */
.telegram-widget-popup {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: #e5e5e5;
    background-image: url('/zzcode/2099f2dda704cb708fe20347afb964ba.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.telegram-widget-popup.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Заголовок окна */
.telegram-widget-header {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.telegram-widget-header-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.telegram-widget-header-icon svg {
    width: 24px;
    height: 24px;
}

.telegram-widget-header-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
    color: white;
    padding: 0;
}

.telegram-widget-header-text p {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 0;
}

.telegram-widget-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.telegram-widget-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Контент окна */
.telegram-widget-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    background: transparent;
}

.telegram-widget-message {
    background: #e5e5e5;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    position: relative;
    max-width: 80%;
}

.telegram-widget-message-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    font-weight: bold;
}

.telegram-widget-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

/* Кнопка "Написать в Telegram" */
.telegram-widget-footer {
    padding: 16px;
    border-top: 1px solid #d0d0d0;
    background: #ffffff;
}

.telegram-widget-send-button {
    width: 100%;
    background: #0088cc;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
    text-decoration: none;
}

.telegram-widget-send-button:hover {
    background: #006699;
}

.telegram-widget-send-button svg {
    width: 18px;
    height: 18px;
}

/* Затемнение фона */
.telegram-widget-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
}

.telegram-widget-overlay.active {
    display: block;
}

/* Адаптивность */
@media (max-width: 480px) {
    .telegram-widget-popup {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 90px;
    }
}

a.telegram-widget-send-button:hover {
    color: #fff;
}
