/* KONEXT ASISTENTE - COLORES SUAVES */

#konextbot-container * {
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

#konextbot-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #a94442;
    border: 2px solid #fff;
    box-shadow: 0 4px 15px rgba(169,68,66,0.2);
    cursor: pointer;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
    color: white;
}

#konextbot-toggle:hover {
    transform: scale(1.05);
    background: #8b3a38;
    box-shadow: 0 6px 20px rgba(169,68,66,0.3);
}

#konextbot-toggle.konextbot-active {
    background: #555;
    border-color: #a94442;
}

#konextbot-chat {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 140px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    z-index: 999999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

#konextbot-header {
    background: #f5f5f5;
    padding: 16px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#konextbot-header-title {
    color: #333;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#konextbot-header-close {
    background: none;
    border: none;
    color: #777;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}

#konextbot-header-close:hover {
    color: #a94442;
}

#konextbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.konextbot-message {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.konextbot-user-message {
    background: #a94442;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

.konextbot-bot-message {
    background: #ffffff;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    border: 1px solid #e8e8e8;
}

.konextbot-bot-message a {
    color: #a94442;
    text-decoration: none;
    font-weight: 600;
}

.konextbot-bot-message a:hover {
    color: #8b3a38;
    text-decoration: underline;
}

.konextbot-typing {
    align-self: flex-start;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
}

.konextbot-typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a94442;
    margin: 0 3px;
    animation: konextbot-bounce 1.4s infinite ease-in-out both;
    opacity: 0.5;
}

.konextbot-typing span:nth-child(1) { animation-delay: -0.32s; }
.konextbot-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes konextbot-bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.2; }
    40% { transform: scale(1); opacity: 0.8; }
}

#konextbot-input-area {
    display: flex;
    padding: 14px 16px;
    background: #ffffff;
    border-top: 1px solid #e8e8e8;
    gap: 10px;
}

#konextbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 30px;
    background: #ffffff;
    color: #333;
    outline: none;
    font-size: 14px;
}

#konextbot-input:focus {
    border-color: #a94442;
}

#konextbot-send {
    background: #a94442;
    border: none;
    border-radius: 30px;
    padding: 0 22px;
    cursor: pointer;
    font-weight: 600;
    color: white;
    font-size: 14px;
    transition: background 0.2s;
}

#konextbot-send:hover {
    background: #8b3a38;
}

#konextbot-send:disabled {
    background: #bbb;
    cursor: not-allowed;
}

#konextbot-messages::-webkit-scrollbar {
    width: 5px;
}

#konextbot-messages::-webkit-scrollbar-track {
    background: #eee;
}

#konextbot-messages::-webkit-scrollbar-thumb {
    background: #a94442;
    border-radius: 10px;
}
