/* Widget principal */
.livehelp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 370px;
    height: 600px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0,0,0,0.16);
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
    z-index: 9999;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.livehelp-widget.active {
    transform: translateY(0);
    opacity: 1;
}

/* Header estilo Crisp */
.livehelp-header {
    background: #3A86FF;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.livehelp-title {
    font-weight: 600;
    font-size: 16px;
}

.livehelp-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* Cuerpo de mensajes */
.livehelp-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
}

.message {
    max-width: 80%;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 18px;
    line-height: 1.4;
    font-size: 14px;
    position: relative;
}

.client-message {
    background: #E3E3E3;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.agent-message {
    background: #3A86FF;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

.agent-message .message-time {
    color: rgba(255,255,255,0.7);
}

/* Área de entrada */
.livehelp-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    background: #fff;
}

.livehelp-input-container {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 24px;
    padding: 8px 15px;
}

.livehelp-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
}

.livehelp-send {
    background: #3A86FF;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Botón de toggle */
.livehelp-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 56px;
    height: 56px;
    background: #3A86FF;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9998;
    transition: all 0.3s ease;
}

.livehelp-toggle:hover {
    transform: scale(1.1);
}

/* Indicador de notificación */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF5A5F;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}