/**
 * Hotel Smart Manager - Estilos del chatbot de Analytics IA
 * Sintesia Studio - Sistema de gestión hotelera
 */

.hotel-analytics-ai {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ai-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(to bottom right, var(--primary), var(--primary-dark));
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    position: relative;
}

.ai-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.ai-toggle .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.ai-panel {
    position: absolute;
    bottom: 65px;
    right: 0;
    width: 500px;
    height: 600px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s;
    opacity: 0;
    visibility: hidden;
}

.ai-panel.open {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

.ai-header {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-title i {
    font-size: 1.5rem;
}

.ai-title h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.ai-title span {
    font-size: 0.8rem;
    opacity: 0.8;
}

.ai-controls {
    display: flex;
    gap: 10px;
}

.ai-controls button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-controls button:hover {
    color: #fff;
}

.ai-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f9f9f9;
}

.ai-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.4;
    font-size: 0.9rem;
    position: relative;
    animation: messageAppear 0.3s ease;
}

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

.message-ai {
    background-color: #fff;
    color: var(--text-dark);
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    align-self: flex-start;
}

.message-user {
    background-color: var(--primary);
    color: #fff;
    border-bottom-right-radius: 5px;
    align-self: flex-end;
}

.ai-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background-color: #fff;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-width: 60px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

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

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

@keyframes typingAnimation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.ai-suggestions {
    padding: 0 15px 10px;
    background-color: #f9f9f9;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-chip {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    border-radius: 15px;
    padding: 5px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.suggestion-chip:hover {
    background-color: var(--primary);
    color: #fff;
}

.ai-input {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.ai-input input {
    flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.ai-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.ai-send {
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    cursor: pointer;
}

.ai-send:hover {
    background-color: var(--primary-dark);
}

@media (max-width: 576px) {
    .ai-panel {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: 0;
    }
    
    .ai-message {
        max-width: 85%;
    }
}
