/* Rider Hotel AI Chat Widget */
:root {
    --chat-primary: #c41e3a;
    --chat-primary-dark: #a01830;
    --chat-secondary: #2c3e50;
    --chat-light: #f8f9fa;
    --chat-white: #ffffff;
    --chat-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --chat-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.chat-widget-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--chat-primary);
    color: var(--chat-white);
    border: none;
    cursor: pointer;
    box-shadow: var(--chat-shadow);
    transition: all 0.3s ease;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.chat-widget-toggle:hover {
    background: var(--chat-primary-dark);
    transform: scale(1.1);
    box-shadow: var(--chat-shadow-lg);
}

.chat-widget-toggle.active {
    background: var(--chat-secondary);
}

.chat-widget-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 550px;
    max-height: calc(100vh - 120px);
    background: var(--chat-white);
    border-radius: 16px;
    box-shadow: var(--chat-shadow-lg);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: chatSlideIn 0.3s ease;
}

.chat-widget-container.active {
    display: flex;
}

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

.chat-header {
    background: linear-gradient(135deg, var(--chat-primary) 0%, var(--chat-primary-dark) 100%);
    color: var(--chat-white);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--chat-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chat-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-title p {
    margin: 2px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.chat-close {
    background: none;
    border: none;
    color: var(--chat-white);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chat-close:hover {
    opacity: 1;
}

.chat-language-selector {
    padding: 10px 20px;
    background: var(--chat-light);
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.chat-lang-btn {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: var(--chat-white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.chat-lang-btn:hover {
    background: #e9ecef;
}

.chat-lang-btn.active {
    background: var(--chat-primary);
    color: var(--chat-white);
    border-color: var(--chat-primary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: messageFadeIn 0.3s ease;
}

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

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--chat-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.chat-message.user .chat-message-avatar {
    background: var(--chat-primary);
    color: var(--chat-white);
}

.chat-message-content {
    background: var(--chat-light);
    padding: 12px 16px;
    border-radius: 12px;
    border-top-left-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.user .chat-message-content {
    background: var(--chat-primary);
    color: var(--chat-white);
    border-radius: 12px;
    border-top-right-radius: 4px;
}

.chat-message-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    text-align: right;
}

.chat-message.user .chat-message-time {
    color: rgba(255, 255, 255, 0.8);
}

.chat-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--chat-light);
    border-radius: 12px;
    border-top-left-radius: 4px;
    width: fit-content;
}

.chat-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    animation: typingBounce 1.4s infinite;
}

.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

.chat-quick-questions {
    padding: 12px 20px;
    background: var(--chat-light);
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.chat-quick-question {
    padding: 8px 14px;
    background: var(--chat-white);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chat-quick-question:hover {
    background: var(--chat-primary);
    color: var(--chat-white);
    border-color: var(--chat-primary);
}

.chat-input-container {
    padding: 16px 20px;
    background: var(--chat-white);
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--chat-primary);
}

.chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--chat-primary);
    color: var(--chat-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.chat-send:hover {
    background: var(--chat-primary-dark);
    transform: scale(1.05);
}

.chat-send:disabled {
    background: #dee2e6;
    cursor: not-allowed;
    transform: none;
}

.chat-contact-form {
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 12px;
}

.chat-contact-form.active {
    display: flex;
}

.chat-contact-form input,
.chat-contact-form textarea {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.chat-contact-form textarea {
    min-height: 100px;
    resize: vertical;
}

.chat-contact-form button {
    padding: 12px 24px;
    background: var(--chat-primary);
    color: var(--chat-white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-contact-form button:hover {
    background: var(--chat-primary-dark);
}

@media (max-width: 480px) {
    .chat-widget-container {
        bottom: 90px;
        right: 15px;
        left: 15px;
        width: auto;
        max-width: none;
        height: 70vh;
    }
    
    .chat-widget-toggle {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}
