/* Marc Chat Widget - Estilos */

.marc-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Estado cerrado */
.marc-chat-closed {
    cursor: pointer;
    user-select: none;
    min-width: 240px;
    max-width: 280px;
}

.marc-chat-closed-content {
    background: white;
    border-radius: 12px 12px 12px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: visible;
    position: relative;
}

.marc-chat-title {
    color: #4A64D5;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    padding: 12px 16px 8px 16px;
    line-height: 1.4;
    background: white;
    text-align: center;
    display: block;
}

/* Barra azul inferior con foto y nombre */
.marc-chat-agent-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    background: #4A64D5;
    padding: 8px 16px;
    border-radius: 0 0 12px 12px;
    position: relative;
    min-height: 45px;
    z-index: 1;
}

/* Foto del agente */
.marc-chat-agent-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #4A64D5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid white;
    position: static;
    transform: none;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.marc-chat-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    border-radius: 50%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden !important;
}

.marc-chat-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
}

/* Nombre "Marc" */
.marc-chat-agent-name {
    color: white;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    text-align: left;
    flex: 1;
}

/* Estado abierto */
.marc-chat-open {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 380px;
    overflow: hidden;
}

.marc-chat-open-header {
    background: #4A64D5;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.marc-chat-open-agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.marc-chat-open-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    flex-shrink: 0;
    box-sizing: border-box;
}

.marc-chat-open-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden !important;
}

.marc-chat-open-avatar .marc-chat-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.marc-chat-open-name {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.marc-chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.marc-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.marc-chat-open-content {
    padding: 20px;
}

.marc-chat-open-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
}

.marc-chat-open-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.marc-chat-channels {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.marc-chat-channel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    border: 1px solid #e9ecef;
}

.marc-chat-channel:hover {
    background: #e9ecef;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.marc-chat-channel:hover .marc-chat-channel-text {
    color: #000;
}

.marc-chat-channel:hover .marc-chat-icon {
    color: #000;
}

.marc-chat-channel:hover .marc-chat-arrow {
    color: #000;
}

.marc-chat-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: #4A64D5;
}

.marc-chat-channel-text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.marc-chat-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .marc-chat-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .marc-chat-closed {
        min-width: 220px;
        max-width: 260px;
    }
    
    .marc-chat-open {
        min-width: calc(100vw - 30px);
        max-width: calc(100vw - 30px);
    }
}

/* Animaciones */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.marc-chat-open {
    animation: slideUp 0.3s ease-out;
}

