/* Стили для чата Зебра (желто-фиолетовая гамма) */
:root {
    --zebra-yellow: #FFEB3B;
    --zebra-purple: #9C27B0;
    --zebra-dark-purple: #7B1FA2;
    --zebra-light-yellow: #FFF9C4;
    --zebra-dark: #333333;
    --zebra-light: #F5F5F5;
}

/* Кнопка открытия чата */
.zebra-chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--zebra-purple), var(--zebra-dark-purple));
    border: 3px solid var(--zebra-yellow);
    color: white;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(156, 39, 176, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.zebra-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(156, 39, 176, 0.5);
}

.zebra-chat-toggle.active {
    background: linear-gradient(135deg, var(--zebra-yellow), #FFC107);
    color: var(--zebra-purple);
}

/* Контейнер чата */
.zebra-chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 3px solid var(--zebra-purple);
    font-family: 'Arial', sans-serif;
}

.zebra-chat-container.open {
    display: flex;
    animation: chatSlideIn 0.3s ease;
}

@keyframes chatSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Заголовок чата */
.zebra-chat-header {
    background: linear-gradient(135deg, var(--zebra-purple), var(--zebra-dark-purple));
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zebra-chat-header h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.zebra-chat-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.zebra-status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Область сообщений */
.zebra-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--zebra-light);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(156, 39, 176, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(255, 235, 59, 0.05) 0%, transparent 50%);
}

.zebra-message {
    margin-bottom: 15px;
    display: flex;
    animation: fadeIn 0.3s ease;
}

.zebra-bot-message {
    justify-content: flex-start;
}

.zebra-user-message {
    justify-content: flex-end;
}

.zebra-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.zebra-bot-message .zebra-message-content {
    background: white;
    color: var(--zebra-dark);
    border-left: 4px solid var(--zebra-purple);
}

.zebra-user-message .zebra-message-content {
    background: linear-gradient(135deg, var(--zebra-purple), var(--zebra-dark-purple));
    color: white;
}

/* Быстрые вопросы */
.zebra-quick-questions {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: white;
    border-top: 1px solid #eee;
}

.zebra-quick-question {
    background: var(--zebra-light-yellow);
    border: 1px solid var(--zebra-yellow);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--zebra-dark);
}

.zebra-quick-question:hover {
    background: var(--zebra-purple);
    color: white;
    border-color: var(--zebra-purple);
}

/* Поле ввода */
.zebra-input-container {
    display: flex;
    padding: 15px;
    gap: 10px;
    background: white;
    border-top: 1px solid #eee;
}

#zebraUserInput {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

#zebraUserInput:focus {
    border-color: var(--zebra-purple);
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.1);
}

#zebraSendButton {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--zebra-purple), var(--zebra-dark-purple));
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#zebraSendButton:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, var(--zebra-dark-purple), var(--zebra-purple));
}

/* Модальное окно мессенджеров */
.zebra-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.zebra-modal-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    width: 350px;
    border: 3px solid var(--zebra-purple);
    position: relative;
}

.zebra-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.zebra-modal-close:hover {
    color: var(--zebra-purple);
}

.zebra-messenger-buttons {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zebra-messenger-btn {
    padding: 12px;
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.zebra-messenger-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.zebra-telegram {
    background: #0088cc;
}

.zebra-whatsapp {
    background: #25D366;
}

.zebra-viber {
    background: #7360F2;
}

/* Анимации */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Адаптивность */
@media (max-width: 480px) {
    .zebra-chat-container {
        width: 90%;
        right: 5%;
        bottom: 80px;
        height: 400px;
    }
    
    .zebra-chat-toggle {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}