/* Основные стили чат-виджета для отеля */
:root {
    --hotel-primary: #2c3e50;
    --hotel-secondary: #3498db;
    --hotel-accent: #1abc9c;
    --hotel-light: #ecf0f1;
    --hotel-dark: #2c3e50;
    --hotel-success: #27ae60;
    --hotel-warning: #f39c12;
    --hotel-danger: #e74c3c;
    --hotel-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --hotel-border-radius: 12px;
    --hotel-transition: all 0.3s ease;
}

/* Контейнер чат-бота */
.hotel-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Кнопка запуска чата */
.hotel-chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--hotel-secondary), var(--hotel-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--hotel-shadow);
    border: none;
    transition: var(--hotel-transition);
    position: relative;
    overflow: hidden;
}

.hotel-chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.3);
}

.hotel-chatbot-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.hotel-chatbot-toggle:hover::before {
    transform: scale(1);
}

.hotel-chatbot-toggle-icon {
    width: 28px;
    height: 28px;
    fill: white;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

/* Окно чата */
.hotel-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: 70vh;
    background: white;
    border-radius: var(--hotel-border-radius);
    box-shadow: var(--hotel-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.hotel-chatbot-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Заголовок чата */
.hotel-chatbot-header {
    background: linear-gradient(135deg, var(--hotel-primary), var(--hotel-dark));
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.hotel-chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hotel-chatbot-logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--hotel-primary);
    font-size: 18px;
}

.hotel-chatbot-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.hotel-chatbot-subtitle {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.hotel-chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hotel-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Область сообщений */
.hotel-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--hotel-light);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Сообщения */
.hotel-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
    animation: messageAppear 0.3s ease;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hotel-message-bot {
    align-self: flex-start;
    background: white;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.hotel-message-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--hotel-secondary), var(--hotel-accent));
    color: white;
    border-bottom-right-radius: 5px;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.2);
}

.hotel-message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
}

.hotel-message-bot .hotel-message-time {
    text-align: left;
    color: #666;
}

.hotel-message-user .hotel-message-time {
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
}

/* Быстрые вопросы */
.hotel-quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.hotel-quick-question {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--hotel-transition);
    color: var(--hotel-dark);
}

.hotel-quick-question:hover {
    background: var(--hotel-light);
    border-color: var(--hotel-secondary);
    transform: translateY(-2px);
}

/* Панель ввода */
.hotel-chatbot-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    display: flex;
    gap: 10px;
}

.hotel-chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    transition: var(--hotel-transition);
    outline: none;
}

.hotel-chatbot-input:focus {
    border-color: var(--hotel-secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.hotel-chatbot-send {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--hotel-secondary), var(--hotel-accent));
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hotel-transition);
    flex-shrink: 0;
}

.hotel-chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.hotel-chatbot-send:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Индикатор ввода бота */
.hotel-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.hotel-typing-dot {
    width: 8px;
    height: 8px;
    background: var(--hotel-secondary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.hotel-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.hotel-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.6; }
    40% { transform: scale(1); opacity: 1; }
}

/* Контактная информация */
.hotel-contact-info {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
    font-size: 13px;
}

.hotel-contact-info h4 {
    margin: 0 0 10px 0;
    color: var(--hotel-primary);
    font-size: 14px;
}

.hotel-contact-info p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hotel-contact-icon {
    width: 14px;
    height: 14px;
    fill: var(--hotel-secondary);
}

/* Адаптивность */
@media (max-width: 480px) {
    .hotel-chatbot-container {
        bottom: 10px;
        right: 10px;
    }
    
    .hotel-chatbot-window {
        width: calc(100vw - 20px);
        max-width: none;
        right: -10px;
        bottom: 70px;
    }
    
    .hotel-chatbot-toggle {
        width: 50px;
        height: 50px;
    }
    
    .hotel-chatbot-toggle-icon {
        width: 24px;
        height: 24px;
    }
}

/* Прокрутка */
.hotel-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.hotel-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.hotel-chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.hotel-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Уведомление о новых сообщениях */
.hotel-new-messages-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--hotel-danger);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}