/* Variables CSS */
:root {
    --chatbot-primary-color: #3284b4;
    --chatbot-primary-hover: #2a6f99;
}

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 450px;
    height: 650px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
    min-width: 450px;
    min-height: 650px;
}

.chatbot-container.minimized {
    height: 60px !important;
    min-height: 60px !important;
    bottom: 0;
    border-radius: 10px 10px 0 0;
}

.chatbot-container.minimized .chatbot-interface > *:not(.chatbot-header),
.chatbot-container.minimized .chatbot-welcome-screen > *:not(.chatbot-header),
.chatbot-container.minimized .welcome-content,
.chatbot-container.minimized .chatbot-messages,
.chatbot-container.minimized .chatbot-input-container,
.chatbot-container.minimized .chatbot-powered-by,
.chatbot-container.minimized .typing-indicator {
    display: none !important;
}

.chatbot-header {
    padding: 15px;
    background: var(--chatbot-primary-color);
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    flex-shrink: 0;
}

.chatbot-container.minimized .chatbot-header {
    border-radius: 10px 10px 0 0;
}

.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;
}

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

.chatbot-interface {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: calc(100% - 150px);
    margin-bottom: 90px;
    padding-bottom: 120px;
}

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

.user-message {
    background-color: #e9ecef;
    margin-left: auto;
    color: #212529;
}

.bot-message {
    background-color: var(--chatbot-primary-color);
    margin-right: auto;
    color: white;
}

/* Estilos para el texto formateado */
.message strong {
    font-weight: 600;
}

.message em {
    font-style: italic;
}

.message ol, .message ul {
    margin: 8px 0;
    padding-left: 20px;
}

.message li {
    margin: 4px 0;
}

.message br {
    margin: 4px 0;
}

.chatbot-input-container {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    z-index: 3;
}

.chatbot-input-container input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    font-size: 13px;
    line-height: 1.4;
    color: #212529;
    font-family: inherit;
}

.chatbot-input-container input::placeholder {
    color: #6c757d;
    font-size: 13px;
}

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

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

.chatbot-welcome-screen {
    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-welcome-screen.hidden {
    display: none;
}

.chatbot-powered-by {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    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;
}

.chatbot-powered-by a:hover {
    text-decoration: underline;
}

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

.chatbot-interface .chatbot-messages {
    padding-bottom: 100px;
}

.hidden {
    display: none !important;
}

/* Estilo para el botón de enviar cuando está activo */
.send-button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}


.quick-options-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 8px;
    max-width: 80%;
}

.quick-option-button {
    background-color: #f8f9fa;
    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);
}

.quick-option-button:active {
    transform: translateY(0);
    background-color: #dee2e6;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin: 10px;
    background: #f0f0f0;
    border-radius: 20px;
    width: fit-content;
    position: absolute;
    left: 10px;
    bottom: 130px;
    z-index: 4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.typing-indicator.hidden {
    display: none;
}

.typing-dot {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #666;
    border-radius: 50%;
    animation: typing-animation 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 typing-animation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
} 