:root {
    --chatbot-primary-color: #3284b4;
    --chatbot-primary-hover: #2a6f99;
}

/* Contenedor Flotante Desplegable */
.chatbot-container {
    position: fixed;
    bottom: 0px !important;
    /* left: 20px; */
    right: 20px;
    width: 450px;
    height: 650px;
    background: white;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

/* Hide plus sign in header when minimized */
.chatbot-container.minimized .chatbot-minimize-button .minus {
    display: none !important;
}

/* Show minus sign in header when expanded */
.chatbot-container:not(.minimized) .chatbot-minimize-button .plus {
    display: none !important;
}

/* Estado Minimizado */
.chatbot-container.minimized {
    height: 60px !important;
    min-height: 60px !important;
}

.chatbot-container.minimized .chatbot-interface>*:not(.chatbot-header),
.chatbot-container.minimized .chatbot-welcome-screen>*:not(.chatbot-header) {
    display: none !important;
}

/* Cabecera */
.chatbot-header {
    padding: 15px;
    background: var(--chatbot-primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.chatbot-header span {
    font-size: 16px;
    font-weight: 500;
}

.chatbot-header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-minimize-button,
.chatbot-close-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.chatbot-minimize-button:hover,
.chatbot-close-button:hover {
    opacity: 1;
}

/* Pantalla de bienvenida */
.chatbot-welcome-screen,
.chatbot-interface {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.welcome-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-bottom: 60px;
}

.chatbot-welcome-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--chatbot-primary-color);
}

.chatbot-welcome-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
    text-align: center;
    max-width: 400px;
}

.chatbot-start-button {
    padding: 10px 20px;
    background: var(--chatbot-primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    margin-bottom: 10px;
}

.chatbot-start-button:hover {
    background: var(--chatbot-primary-hover);
}

.chatbot-privacy-policy {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin: 10px 20px;
    line-height: 1.4;
    font-style: italic;
}

/* Historial de Mensajes */
.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #ffffff;
    padding-bottom: 20px;
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 13px;
}

.message.bot-message {
    background-color: var(--chatbot-primary-color);
    color: white;
    align-self: flex-start;
}

.message.user-message {
    background-color: #e9ecef;
    color: #212529;
    align-self: flex-end;
}

/* Árbol de decisiones y botones */
.decision-tree-container {
    padding: 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 35px;
}

.node {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.node.active {
    display: flex;
}

.quick-option-button {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 15px;
    color: #212529;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 13px;
    line-height: 1.4;
}

.quick-option-button:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-1px);
}

.chat-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    font-size: 13px;
    color: #212529;
}

.send-button {
    padding: 10px 15px;
    background: var(--chatbot-primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s ease;
}

.send-button:hover {
    background: var(--chatbot-primary-hover);
}

.reset-btn {
    background-color: #ffffff;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.reset-btn:hover {
    background-color: #dc3545;
    color: white;
}

/* Footer Powered By */
.chatbot-powered-by {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: white;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 12px;
    color: #666;
    z-index: 2;
}

.chatbot-powered-by a {
    color: var(--chatbot-primary-color);
    text-decoration: none;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

@media (max-width: 992px) {
    .chatbot-container {
        width: 350px;
        right: 10px;
    }
}