/* =============================================
   Panel de Comunicaciones Lateral - Estilos (Tamaño Reducido y Ajustado)
   ============================================= */

#pcl-panel {
    position: fixed;
    top: 80px;
    left: 0;
    z-index: 99999;
    font-family: Arial, sans-serif;
    display: flex;
    align-items: flex-start;
}

/* ----- Botón toggle (campana) ----- */
.pcl-toggle-btn {
    position: relative;
    background: #2d6a2d;
    border: none;
    border-radius: 0 8px 8px 0;
    width: 44px;
    height: 58px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.25);
    transition: background 0.2s;
}
.pcl-toggle-btn:hover { background: #1f4f1f; }

.pcl-toggle-icon {
    font-size: 18px;
    color: #fff;
}

.pcl-badge {
    background: #e53935;
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    border-radius: 10px;
    padding: 1px 4px;
    min-width: 14px;
    text-align: center;
    display: inline-block;
}

/* ----- Contenido del panel ----- */
.pcl-content {
    width: 290px; /* ¡REDUCIDO! Tamaño intermedio perfecto */
    max-height: 75vh;
    background: #1a1a1a;
    border-radius: 0 8px 8px 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 16px rgba(0,0,0,0.4);

    /* Estado inicial: oculto */
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ----- Panel abierto ----- */
#pcl-panel.pcl-open .pcl-content {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

#pcl-panel.pcl-open .pcl-toggle-btn {
    display: none;
}

/* ----- Header ----- */
.pcl-header {
    background: #2d6a2d;
    color: #fff;
    font-size: 12px; /* Un poco más pequeño */
    font-weight: bold;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.pcl-close-btn {
    background: #e53935;
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.pcl-close-btn:hover { background: #b71c1c; }

/* ----- Lista de items ----- */
.pcl-items {
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pcl-items::-webkit-scrollbar { width: 4px; }
.pcl-items::-webkit-scrollbar-track { background: #222; }
.pcl-items::-webkit-scrollbar-thumb { background: #555; border-radius: 2px; }

/* ----- Item individual ----- */
.pcl-item {
    background: #2a2a2a;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pcl-item-title {
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ----- Imagen Adaptada ----- */
.pcl-item-img {
    width: 100%;          
    height: auto;         /* Se adapta proporcionalmente al nuevo ancho de 290px */
    max-height: 280px;    
    object-fit: contain;  /* Sigue garantizando que la imagen se vea completa */
    border-radius: 4px;   
    display: block;       
}

/* ----- Botón ----- */
.pcl-btn {
    display: block;
    background: #2d6a2d;
    color: #fff !important;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}
.pcl-btn:hover { background: #1f4f1f; }

/* ----- Responsive móvil ----- */
@media (max-width: 600px) {
    .pcl-content { width: 230px; } /* Más pequeño aún en celulares para no tapar toda la pantalla */
}