/* Плавающая кнопка Vivo Interiors */
.vivo-fab-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.vivo-fab-container.right {
    bottom: 30px;
    right: 30px;
}

.vivo-fab-container.left {
    bottom: 30px;
    left: 30px;
}

.vivo-fab-main-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    z-index: 1001;
}

.vivo-fab-main-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.vivo-fab-main-button.active {
    transform: rotate(45deg);
}

.vivo-fab-main-button i {
    color: white;
    font-size: 28px;
    transition: transform 0.3s;
}

.vivo-fab-menu {
    position: absolute;
    bottom: 85px;
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: vivoSlideUp 0.3s ease;
}

.vivo-fab-container.right .vivo-fab-menu {
    right: 0;
}

.vivo-fab-container.left .vivo-fab-menu {
    left: 0;
}

.vivo-fab-menu.active {
    display: flex;
}

@keyframes vivoSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vivo-fab-item {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: none;
    position: relative;
}

.vivo-fab-item:hover {
    transform: translateY(-8px) scale(1.1);
}

.vivo-fab-item.callback {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A52 100%);
}

.vivo-fab-item.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #005f8b 100%);
}

.vivo-fab-item.ai {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.vivo-fab-item i {
    color: white;
    font-size: 24px;
}

.vivo-tooltip {
    position: absolute;
    background: #2c3e50;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-weight: 500;
    z-index: 1002;
}

.vivo-fab-container.right .vivo-tooltip {
    right: 70px;
}

.vivo-fab-container.left .vivo-tooltip {
    left: 70px;
}

.vivo-fab-container.right .vivo-tooltip:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent #2c3e50;
}

.vivo-fab-container.left .vivo-tooltip:after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent #2c3e50 transparent transparent;
}

.vivo-fab-item:hover .vivo-tooltip {
    opacity: 1;
}

/* Модальные окна */
.vivo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999999;
    animation: vivoFadeIn 0.3s ease;
    padding: 20px;
}

.vivo-modal-overlay.active {
    display: flex;
}

@keyframes vivoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.vivo-modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: vivoModalSlideUp 0.4s ease;
    position: relative;
}

@keyframes vivoModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vivo-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.vivo-modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

.vivo-modal h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.vivo-modal p {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

.vivo-form-group {
    margin-bottom: 20px;
}

.vivo-form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.vivo-form-group input:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.vivo-modal-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A52 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.vivo-modal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

/* AI Чат */
.vivo-ai-chat-modal {
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.vivo-chat-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.vivo-chat-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.vivo-chat-header h4 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 0;
}

.vivo-chat-messages {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vivo-message {
    max-width: 85%;
    padding: 12px 15px;
    border-radius: 18px;
    line-height: 1.4;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.vivo-message.ai {
    align-self: flex-start;
    background: white;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 5px;
}

.vivo-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.vivo-chat-input-container {
    display: flex;
    gap: 10px;
}

#vivoAiChatInput {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

#vivoAiChatInput:focus {
    outline: none;
    border-color: #9b59b6;
}

#vivoSendAiMessage {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    border: none;
    border-radius: 10px;
    width: 50px;
    cursor: pointer;
    transition: transform 0.3s;
}

#vivoSendAiMessage:hover {
    transform: scale(1.05);
}

.vivo-quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.vivo-quick-button {
    padding: 8px 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.vivo-quick-button:hover {
    background: #9b59b6;
    color: white;
}

.vivo-typing-indicator {
    display: flex;
    gap: 5px;
    padding: 12px 15px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    border: 1px solid #e0e0e0;
}

.vivo-typing-dot {
    width: 8px;
    height: 8px;
    background: #7f8c8d;
    border-radius: 50%;
    animation: vivoTyping 1.4s infinite;
}

.vivo-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.vivo-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes vivoTyping {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* Уведомления */
.vivo-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 15px 25px;
    background: #27ae60;
    color: white;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    display: none;
    z-index: 10000000;
    animation: vivoSlideInRight 0.3s ease;
}

@keyframes vivoSlideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.vivo-notification.error {
    background: #e74c3c;
}

/* Успешное сообщение */
.vivo-success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
    text-align: center;
    animation: vivoFadeIn 0.3s;
}

.vivo-success-message.active {
    display: block;
}

/* Адаптивность */
@media (max-width: 768px) {
    .vivo-fab-container.right {
        bottom: 20px;
        right: 20px;
    }
    
    .vivo-fab-container.left {
        bottom: 20px;
        left: 20px;
    }
    
    .vivo-fab-main-button {
        width: 60px;
        height: 60px;
    }
    
    .vivo-fab-item {
        width: 50px;
        height: 50px;
    }
    
    .vivo-tooltip {
        display: none;
    }
    
    .vivo-modal {
        padding: 30px 20px;
    }
    
    .vivo-chat-messages {
        max-height: 250px;
    }
}

/* Для AMP и других особых случаев */
.vivo-hidden {
    display: none !important;
}