/* ── Comunidad (UGC) — composer + lista en el perfil de sucursal ──
   Mobile-first, BEM. La tarjeta reutiliza .post-card (post-card.css). */

.profile-community__hint {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    color: var(--color-text-secondary, #6b7280);
}

.profile-community__empty {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--color-text-secondary, #6b7280);
}

/* ── Composer ── */

.community-composer {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding: 0.85rem;
    background: var(--c-surface, #fff);
    border: 1px solid var(--c-border, #e5e7eb);
    border-radius: 12px;
}

.community-composer__text {
    width: 100%;
    resize: vertical;
    min-height: 4.2rem;
    padding: 0.6rem 0.7rem;
    font: inherit;
    font-size: 0.9rem;
    border: 1px solid var(--c-border, #e5e7eb);
    border-radius: 8px;
}

.community-composer__row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.community-composer__add {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text-secondary, #6b7280);
    border: 1px dashed var(--c-border, #d1d5db);
    border-radius: 999px;
    cursor: pointer;
}

.community-composer__add:hover {
    color: var(--color-primary, #2563eb);
    border-color: var(--color-primary, #2563eb);
}

.community-composer__count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-secondary, #6b7280);
}

.community-composer__submit { margin-left: auto; }

.community-composer__note {
    margin: 0;
    font-size: 0.72rem;
    color: var(--color-text-secondary, #9ca3af);
}

.community-composer__error {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #b91c1c;
}

.community-composer__login {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: var(--color-text-secondary, #6b7280);
}

/* ── Previews de fotos (FileReader) ── */

.community-composer__previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.community-composer__preview {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--c-border, #e5e7eb);
}

.community-composer__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.community-composer__preview-del {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 1.35rem;
    height: 1.35rem;
    min-height: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.65);
    color: #fff;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
}

.community-composer__preview-del:hover {
    background: #dc2626;
    color: #fff;
}

@media (min-width: 768px) {
    .community-composer__preview {
        width: 88px;
        height: 88px;
    }
}

/* ── Anti scroll horizontal en mobile ──────────────────────────────
   La sección de comunidad nunca debe exceder el ancho del viewport.
   `overflow-x: clip` corta cualquier desbordamiento residual sin crear
   una barra de scroll, y los contenedores se fuerzan a encoger. */
.profile-community {
    max-width: 100%;
    overflow-x: clip;
}
.profile-community,
.profile-community .profile-posts__list,
.community-composer {
    min-width: 0;
}

/* El header del post (autor + chips + Destacar/Ocultar/borrar/abrir) envuelve
   en pantallas chicas: el autor toma la primera línea y las acciones del negocio
   bajan debajo en vez de apretarse o recortarse. */
@media (max-width: 600px) {
    .profile-community .post-card__head {
        flex-wrap: wrap;
        row-gap: 0.4rem;
    }
    .profile-community .post-card__who {
        min-width: 55%;
    }
}
