#lp-chatbot-container {
    position: fixed;
    bottom: 120px;
    right: 30px;
    z-index: 999999;
    font-family: 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.lp-chatbot-flex-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#lp-chatbot-notification {
    background-color: #ffffff;
    color: #333;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    transform: translateY(10px);
    margin-right: 5px;
    max-width: 200px;
    text-align: right;
    border: 1px solid #eee;
}

#lp-chatbot-notification::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 22px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #ffffff;
}

#lp-chatbot-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#lp-chatbot-bubble {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid white;
}

#lp-chatbot-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.5);
}

#lp-chatbot-bubble .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
}

#lp-chatbot-window {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 500px;
    background-color: #fdfdfd;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    border: 1px solid #f0f0f0;
}

/* --- MASTER-DETAIL VIEW STYLES --- */

.lp-chatbot-view {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header for List View */
.lp-chatbot-list-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: #fff;
    border-bottom: 1px solid #004466;
    text-align: left;
}

.lp-chatbot-list-header h4 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.lp-chatbot-list-header p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

/* List Items Container */
.lp-chatbot-list-items {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
    background: #fdfdfd;
}

.lp-chatbot-list-items:empty:before {
    content: "Cargando temas disponibles...";
    display: block;
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 13px;
    font-style: italic;
}

/* Individual List Item Card */
.lp-chatbot-list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.lp-chatbot-list-item:hover {
    border-color: #bce0fd;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 115, 170, 0.1);
}

.lp-chatbot-item-icon {
    font-size: 20px;
    color: #fff;
    background: #0073aa;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.lp-chatbot-list-item[data-key="general"] .lp-chatbot-item-icon {
    background: #6c757d;
    /* Grey for general */
}

.lp-chatbot-item-info {
    flex-grow: 1;
}

.lp-chatbot-item-info strong {
    display: block;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
}

.lp-chatbot-item-info span {
    font-size: 12px;
    color: #7f8c8d;
    display: block;
    line-height: 1.3;
}

.lp-chatbot-item-arrow {
    color: #cbd5e0;
    font-size: 18px;
    transition: transform 0.2s;
}

.lp-chatbot-list-item:hover .lp-chatbot-item-arrow {
    color: #0073aa;
    transform: translateX(3px);
}

/* --- CHAT VIEW STYLES --- */

/* Sub-header in chat view */
.lp-chatbot-sub-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border-bottom: 1px solid #eef0f2;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    z-index: 10;
}

#lp-chatbot-back-btn {
    background: #f0f4f8;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: background 0.2s;
}

#lp-chatbot-back-btn:hover {
    background: #e1e8ed;
    color: #333;
    text-decoration: none;
}

#lp-chatbot-back-btn .dashicons {
    font-size: 14px;
    margin-right: 3px;
}

#lp-chatbot-current-context-name {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    min-height: 0;
    scroll-behavior: smooth;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lp-chatbot-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.lp-chatbot-msg.bot {
    align-self: flex-start;
    background-color: #fff;
    color: #333;
    border: 1px solid #eef0f2;
    border-bottom-left-radius: 2px;
}

.lp-chatbot-msg.user {
    align-self: flex-end;
    background-color: #0073aa;
    color: white;
    border-bottom-right-radius: 2px;
}

.lp-chatbot-input {
    border-top: 1px solid #eee;
    padding: 12px;
    display: flex;
    gap: 10px;
    background-color: white;
}

#lp-chatbot-text {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    transition: border 0.2s;
}

#lp-chatbot-text:focus {
    border-color: #0073aa;
}

#lp-chatbot-send {
    padding: 8px 18px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

#lp-chatbot-send:hover {
    background-color: #005177;
}

#lp-chatbot-send:disabled {
    background-color: #ccc;
    cursor: default;
}

.lp-chatbot-msg.thinking {
    font-style: italic;
    color: #888;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-left: 5px;
}