﻿/* ================================================================
   TOGGLE VISTA GRILLA / LISTA - SOLO MOBILE
================================================================ */

.vista-toggle {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: #f1f3f5;
    border-radius: 10px;
    flex-shrink: 0;
}

.vista-toggle-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #6c757d;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

    .vista-toggle-btn:hover:not(.active) {
        color: #1a1a1a;
    }

    .vista-toggle-btn.active {
        background: #fff;
        color: #8B1D1D;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

/* ================================================================
   VISIBILIDAD DE LAS VISTAS
================================================================ */

/* Por defecto: solo se muestra la que tiene .active */
.vista-publicaciones {
    display: none;
}

    .vista-publicaciones.active {
        display: block;
    }

/* La grilla mantiene flex/row de Bootstrap cuando está activa */
.vista-grilla.active {
    display: flex;
    flex-wrap: wrap;
}

/* Lista compacta: una columna con gap */
.vista-lista.active {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* ================================================================
   DESKTOP: siempre grilla, ignorar localStorage
================================================================ */
@media (min-width: 768px) {
    .vista-grilla {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .vista-lista {
        display: none !important;
    }
}
