/* ASISTENTE IMPRENTA - ESTILOS CSS*/
.assistant-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transform: translateY(100px) scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.assistant-container.open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* HEADER */
.assistant-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.assistant-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.assistant-icon {
    font-size: 1.5em;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.assistant-title h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.assistant-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.assistant-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ÁREA DE MENSAJES */
.assistant-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.assistant-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
    word-wrap: break-word;
    white-space: pre-line;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-message {
    background: var(--secondary);
    color: white;
    align-self: flex-end;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.bot-message {
    background: white;
    color: #333;
    align-self: flex-start;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ÁREA DE INPUT */
.assistant-input-container {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    gap: 10px;
    align-items: center;
}

.assistant-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 25px;
    font-size: 0.95em;
    transition: all 0.3s;
    outline: none;
}

.assistant-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.assistant-send {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.assistant-send:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.assistant-send:active {
    transform: scale(0.95);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .assistant-container {
        width: calc(100% - 30px);
        right: 15px;
        bottom: 15px;
        height: 70vh;
        max-height: 500px;
    }
}

/* SCROLLBAR PERSONALIZADA */
.assistant-messages::-webkit-scrollbar {
    width: 6px;
}

.assistant-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.assistant-messages::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 3px;
}

.assistant-messages::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}