/* Основные стили виджета */
.manager-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Плавающая кнопка */
.widget-button {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--primary-dark);
    transition: all 0.3s ease;
    border: none;
    outline: none;
    position: relative;
    z-index: 100;
}

.widget-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px var(--primary-dark);
}

.widget-button.active {
    transform: rotate(45deg);
    background: var(--primary-dark);
}

/* Пульсация */
.widget-pulse {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #cc00cc24;
    border-radius: 50%;
    animation: pulse 2s infinite;
    z-index: 99;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Окно виджета */
.widget-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    z-index: 99;
}

.widget-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Заголовок */
.widget-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
}

.widget-header h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.widget-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Содержимое */
.widget-content {
    padding: 20px;
}

/* Контакты */
.contact-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.contact-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.contact-option:hover {
    background: white;
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    margin-bottom: 10px;
}

.icon-telegram { background: #0088cc; }
.icon-viber { background: #7360f2; }
.icon-phone { background: #28a745; }
.icon-whatsapp { background: #25d366; }
.icon-email { background: #ff6b6b; }
.icon-chat { background: #ffa502; }

.contact-option span {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* Форма быстрого вопроса */
.quick-question {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    display: none;
}

.quick-question h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

.question-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 10px;
    font-family: inherit;
}

.question-input:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.send-question {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.send-question:hover {
    background: var(--primary-color);
}

/* Информация о менеджере */
.manager-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 15px;
}

.manager-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.manager-details h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.manager-details p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/* Уведомление */
.widget-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-dark);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: bounce 1s infinite alternate;
    display: none;
}

@keyframes bounce {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

/* Закрытие */
.close-widget {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .manager-widget {
        bottom: 20px !important;
        left: 20px !important;
        right: auto !important;
    }

    .widget-window {
        width: 300px;
        left: -20px;
        right: auto;
    }

    .contact-options {
        display: flex;
        justify-content: space-evenly
    }

    .widget-pulse {
        width: 50px;
        height: 50px;
    }

    .widget-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .manager-widget {
        bottom: 15px;
        left: 15px;
    }

    .widget-window {
        width: calc(100vw - 30px);
        right: 0;
        left: 0;
        margin: 0 auto;
    }

    .contact-options {
        grid-template-columns: repeat(3, 1fr);
    }

    .widget-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Часы работы */
.work-hours {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    text-align: center;
    justify-content: center;
}

.work-hours i {
    color: #28a745;
}

/* Иконки соцсетей */
.contact-icon i.fab {
    font-size: 18px;
}

.icon-viber {
    background: #7360f2;
}

.icon-telegram {
    background: #0088cc;
}