/* Estilos para el chat de ventas */
.chat-ventas-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-width: 90vw;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
    max-height: 600px;
}

.chat-ventas-header {
    background: linear-gradient(135deg, #5664d2 0%, #7e8fe6 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.chat-ventas-header.collapsed {
    border-radius: 10px;
}

.chat-ventas-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chat-ventas-body {
    display: flex;
    flex-direction: column;
    height: 450px;
    transition: all 0.3s ease;
    display: none;
}

.chat-ventas-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f8f9fa;
}

.chat-ventas-input {
    padding: 10px;
    border-top: 1px solid #e9ecef;
    background-color: #fff;
}

.message {
    max-width: 85%;
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 18px;
    position: relative;
    line-height: 1.5;
    font-size: 0.9rem;
}

.message-content {
    word-wrap: break-word;
}

.message-content p {
    margin: 0 0 10px 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul, .message-content ol {
    padding-left: 20px;
    margin: 5px 0;
}

.message-content code {
    font-family: monospace;
    background-color: rgba(0,0,0,0.05);
    padding: 2px 4px;
    border-radius: 3px;
}

.message-content pre {
    background-color: rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 5px 0;
}

.message-content a {
    color: inherit;
    text-decoration: underline;
}

.bot-message .message-content a {
    color: #3366BB;
}

.user-message .message-content a {
    color: #ffffff;
}

.user-message {
    background-color: #5C6BC0;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background-color: #e9ecef;
    color: #212529;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    text-align: right;
    margin-top: 4px;
}

.bot-message .message-time {
    color: rgba(0,0,0,0.5);
}

.typing-indicator {
    display: inline-block;
    padding: 10px 14px;
    background-color: #e9ecef;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    margin-bottom: 10px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    float: left;
    margin: 0 1px;
    background-color: #9E9EA1;
    display: block;
    border-radius: 50%;
    opacity: 0.4;
}

.typing-indicator span:nth-of-type(1) {
    animation: 1s blink infinite 0.3333s;
}

.typing-indicator span:nth-of-type(2) {
    animation: 1s blink infinite 0.6666s;
}

.typing-indicator span:nth-of-type(3) {
    animation: 1s blink infinite 0.9999s;
}

@keyframes blink {
    50% {
        opacity: 1;
    }
}

/* Botón flotante para abrir el chat cuando está cerrado */
.chat-ventas-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5664d2 0%, #7e8fe6 100%);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
}

.chat-ventas-fab:hover {
    transform: scale(1.1);
}

/* Estilos para la verificación telefónica */
.phone-verification-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #f8f9fa;
    padding: 20px;
}

.verification-step {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

#code-input {
    font-size: 1.5rem;
    letter-spacing: 5px;
    text-align: center;
}

.alert {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}