.ContenedorPrincipal {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
}
.ContenedorIzquierda {
    position: sticky;
    top: 0;
    overflow-y: auto;
    height: 100vh;
    justify-content: center;
    margin-left: 0px;
    border-right: 1px solid rgba(0, 0, 0, 0.268);
    background-color: #35CB83;
    /* Por encima del header fixed (z:100) para que las barras verdes laterales
       no queden tapadas por el titulo de la pagina. */
    z-index: 200;
}

.ContenedorIzquierda ul li:last-child {
    position: absolute;
    bottom: 12px;
}
.ContenedorIzquierda ul li:last-child a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 30px;
    transition: background-color 0.15s ease;
}
.ContenedorIzquierda ul li:last-child a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.ContenedorIzquierda ul li#Iniciar {
    position: absolute;
    bottom: 65px;
}

.ContenedorIzquierda ul {
    padding-left: 40%;
}

.ContenedorDerecha {
    position: sticky;
    top: 0;
    overflow-y: auto;
    flex: 1;
    height: 100vh;
    background-color: #35CB83;
    border-left: 1px solid rgba(0, 0, 0, 0.268);
    z-index: 200;
}

#ImagenHeader {
    width: 45%;
    margin-top: 13px;
    margin-bottom: 13px;
    margin-left: 20px;
}

.TextoHeader {
    width: 30%;
    text-align: left;
    font-size: 26px;
    background: none;           
    border: none;               
    color: black;               
    transition: all 0.3s ease;  
    border-radius: 20px;  
    padding-top: 10px; 
    padding-bottom: 10px;
    padding-left: 10px;
    margin-bottom: 2px;
}

.TextoHeader:hover {
    cursor: pointer;
    background-color: #E7E7E8;           
}

.TextoHeaderMovil {
    width: 60%;
    background: none;           
    border: none;               
    color: black;               
    transition: all 0.3s ease;  
    margin-top: 10px; 
    margin-bottom: 10px;   
}

.TextoHeaderMovil:hover {
    cursor: pointer;
    background-color: #E7E7E8;           
}

.Icono {
    width: 60%;
    vertical-align: top;
}

.IconoMovil {
    width: 90%;
}

.NoDecoracion {
    text-decoration: none;
}

.PerfilAuth {
    display: flex;
    align-items: center;
    padding-top: 10px; 
    padding-bottom: 10px;
    padding-left: 10px;
    border-radius: 20px;  
    color: black;
    bottom: 10px;
}

.PerfilAuth:hover {
    cursor: pointer;
    background-color: #E7E7E8;   
}

.ImagenPerfilAuth {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1/1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    flex-shrink: 0;
    margin: 0;
}

.ImagenPerfilAuthFooter {
    width: 33px;  
    height: 33px;
    border-radius: 100%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.AuthPerfilTexto {
    font-size: 25px;
    margin-top: 0px;
    margin-bottom: 0px;
    margin-left: 6px;
}


@media (min-width: 840px) {
    .ContenedorCentral {
        width: 750px;
    }
}

@media (max-width: 840px) {
    .ContenedorCentral {
        width: 90%;
    }
}

@media (max-width: 550px) {
    .ContenedorCentral {
        flex: 1;
    }
}


.DivTextoFlecha {
    background-color: rgba(255, 255, 255, 0.85);
    display: flex;
    height: 60px;
    align-items: center;
    margin: 0;
    padding-left: 10px;
    backdrop-filter: blur(30px);
    /* sticky dentro de la columna central — asi el titulo solo ocupa el ancho
       de la zona blanca (no se mete bajo los sidebars verdes) y sigue
       pegado arriba al hacer scroll. */
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.DivTextoFlecha h1 {
    margin-top: 0px;
    margin-bottom: 0px;
    margin-left: 10px; 
    font-size: 30px; 
}

.TextoFlecha {
    font-size: 30px;
    margin-top: 4px;
    margin-bottom: 4px;
    margin-left: 30px;
}

#ImagenFlecha {
    width: 30px; 
    height: auto;
    margin-top: 0px; 
    margin-bottom: 0px;
    transition: transform 0.2s ease;
}

#ImagenFlecha:hover {
    transform: scale(1.04);
    cursor: pointer;
}

.Footer {
    box-sizing: border-box;
    padding-left: 2%;
    padding-right: 2%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    height: 50px;
    position: fixed;
    bottom: 0;
    left: 0;
    border-top: 2px solid rgb(26, 23, 24);
    background-color: #35CB83;
    z-index: 200;
}

@media (min-width: 550px) {
    .Footer {
        display: none;
    }
}

.BotonFooter {
    all: unset;
}

@media (min-width: 1420px) {
    .ContenedorIzquierda {
        flex: 1;
    }
}

@media (max-width: 1420px) {
    .ContenedorIzquierda {
        width: 10%;
    }
}

@media (max-width: 1200px) {
    .ContenedorIzquierda {
        flex: 1;
    }
}


@media (max-width: 550px) {
    .ContenedorIzquierda  {
        display: none;
    }
}

@media (max-width: 550px) {
    .EliminarCuandoPequeno  {
        display: none;
    }
}

@media (max-width: 950px) {
    .ContenedorDerecha {
        display: none;
    }
}

.LiBarra {
    margin-bottom: 18px;
}

.Idiomaa:hover{
    cursor: pointer;
}

.BotonBarra {
    all: unset;
    padding-top: 6px;
    padding-bottom: 6px;
    padding-left: 20px;
    padding-right: 20px;
}

.BotonBarra:hover {
    background-color: #0BA243;
    border-radius: 30px;
}

.Icono {
    font-size: 30px;
    color: black;
}

ul {
    list-style-type: none;
}

.PequenoMargen {
    margin-left: 15px;
}

@media (max-width: 1420px) {
    .TextoBarra {
        display: none;
    }
}

/* ============== Buscador móvil ============== */
/* En escritorio NO existe: vive solo en pantallas <= 950px, donde la columna
   .ContenedorDerecha se oculta y aprovecha la franja central. */
.BuscadorMovil {
    display: none !important;
    visibility: hidden;
}

@media (max-width: 950px) {
    .BuscadorMovil {
        display: block !important;
        visibility: visible;
        margin: 70px 10px 10px 10px;
    }
    .BuscadorMovil .LupayBarra {
        width: 100%;
    }
    .BuscadorMovil .BuscadorPersonas {
        flex: 1;
        margin-left: 0;
        max-width: none;
        padding: 8px 10px;
        border: 1px solid #ccc;
        border-right: none;
    }
    .BuscadorMovil .BotonLupa {
        background-color: #35CB83;
        border: 1px solid #ccc;
        border-left: none;
    }
}
/* ============== Notificaciones ============== */
/* Wrapper pequeño alrededor de la campana: inline-block para que el badge
   pueda posicionarse de forma absoluta sin sacar nada del flujo del menú. */
.CampanaWrapper {
    position: relative;
    display: inline-block;
    line-height: 1;
}

.BadgeNotif {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background-color: #ff5252;
    color: white;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    font-family: sans-serif;
}

/* Lista de notificaciones (página /notificaciones/) */
.ListaNotificaciones {
    padding: 14px 12px 24px;
    max-width: 720px;
    margin: 0 auto;
}

.NotifLink {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 10px;
}

.NotifTarjeta {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: #ffffff;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.NotifTarjeta:hover {
    background-color: #F4FFF9;
    transform: translateY(-1px);
}

.NotifNoLeida .NotifTarjeta {
    background-color: #E8F8F0;
    border-color: #35CB83;
}

.NotifAvatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.NotifContenido {
    flex: 1;
    min-width: 0;
}

.NotifTexto {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.NotifFecha {
    margin: 0;
    font-size: 12px;
    color: #888;
}

.NotifPunto {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #35CB83;
    flex-shrink: 0;
}

.NotifVacia {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-style: italic;
}

/* ============== Chat ============== */
/* Lista de chats */
.ListaChats {
    padding: 14px 12px 24px;
    max-width: 720px;
    margin: 0 auto;
}

.ChatPreviewLink {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 10px;
}

.ChatPreview {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: #ffffff;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.ChatPreviewLink:hover .ChatPreview {
    background-color: #F4FFF9;
    transform: translateY(-1px);
}

.ChatAvatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ChatPreviewContenido {
    flex: 1;
    min-width: 0;
}

.ChatPreviewCabecera {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.ChatNombre {
    color: #00541C;
    font-size: 15px;
}

.ChatFecha {
    color: #888;
    font-size: 12px;
    flex-shrink: 0;
}

.ChatUltimoMsg {
    margin: 2px 0 0 0;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ChatVacio {
    color: #aaa;
}

.ChatBadge {
    position: static !important;
    top: auto !important;
    right: auto !important;
    flex-shrink: 0;
}

.ChatVacioPagina {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-style: italic;
}

/* Ventana de chat */
.ChatVentana {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
    height: calc(100dvh - 130px);  /* dvh se ajusta al teclado virtual movil */
    max-width: 720px;
    margin: 14px auto 0;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ChatCabecera {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: #35CB83;
    text-decoration: none;
    color: white;
    font-size: 16px;
}

.ChatCabecera:hover {
    background-color: #0BA243;
}

.ChatCabecera .ChatAvatar {
    width: 38px;
    height: 38px;
    border: 2px solid white;
}

.ChatMensajes {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #F4FFF9;
}

.ChatMensaje {
    display: flex;
    max-width: 75%;
}

.ChatMensaje.Mio {
    align-self: flex-end;
}

.ChatMensaje.Otro {
    align-self: flex-start;
}

.ChatBurbuja {
    padding: 9px 14px 16px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.ChatMensaje.Mio .ChatBurbuja {
    background-color: #35CB83;
    color: white;
    border-bottom-right-radius: 4px;
}

.ChatMensaje.Otro .ChatBurbuja {
    background-color: #ffffff;
    color: #333;
    border: 1px solid rgba(0,0,0,0.08);
    border-bottom-left-radius: 4px;
}

.ChatHora {
    position: absolute;
    bottom: 3px;
    right: 10px;
    font-size: 10px;
    opacity: 0.7;
}

.ChatVacioConv {
    text-align: center;
    color: #aaa;
    padding: 40px 20px;
    font-style: italic;
}

.ChatForm {
    display: flex;
    gap: 8px;
    padding: 10px;
    background-color: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    align-items: center;
    /* Evita que el form se ensanche mas alla del contenedor padre y
       provoque desbordes horizontales empujando el boton enviar fuera. */
    min-width: 0;
}

.ChatInput {
    flex: 1 1 auto;
    /* min-width 0 imprescindible: sin esto el input crece hasta su
       tamano intrinseco y empuja a los hermanos flex fuera de la vista
       (era el bug del boton enviar que 'no cabia' en mobile). */
    min-width: 0;
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #35CB83;
    border-radius: 24px;
    background-color: #F4FFF9;
    font-size: 14px;
    outline: none;
}

.ChatInput:focus {
    border-color: #0BA243;
    box-shadow: 0 0 0 3px rgba(11, 162, 67, 0.18);
}

.ChatEnviar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #35CB83;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.ChatEnviar:hover {
    background-color: #0BA243;
    transform: translateY(-1px);
}

/* En el footer móvil reducimos el badge un pelín para que no choque con el borde */
.Footer .BadgeNotif {
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    font-size: 10px;
}

/* ============== RGPD ============== */
/* Banner de cookies fijado abajo */
.CookieBanner[hidden] {
    display: none !important;
}
.CookieBanner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    background-color: #ffffff;
    border: 1px solid #35CB83;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 10px 30px rgba(0, 84, 28, 0.18);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #333;
    max-width: 720px;
    margin: 0 auto;
}
.CookieBanner p { margin: 0; flex: 1; }
.CookieBanner a { color: #0BA243; font-weight: 600; }
.CookieBannerOK {
    background-color: #35CB83;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
    font-family: "Passion One", sans-serif;
    font-size: 15px;
}
.CookieBannerOK:hover { background-color: #0BA243; }

@media (max-width: 550px) {
    .CookieBanner {
        bottom: 60px; /* dejar hueco para el .Footer móvil */
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
}

/* Enlaces legales en la columna derecha */
.FooterLegal {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
}
.FooterLegal a {
    color: #00541C;
    text-decoration: none;
    font-weight: 600;
}
.FooterLegal a:hover { text-decoration: underline; }
.FooterLegal span { margin: 0 6px; color: #00541C; }

/* Páginas legales */
.DocumentoLegal {
    max-width: 760px;
    margin: 18px auto 60px;
    padding: 0 16px;
    line-height: 1.55;
    color: #222;
}
.DocumentoLegal h2 {
    color: #00541C;
    font-family: "Passion One", sans-serif;
    margin-top: 26px;
    margin-bottom: 8px;
    font-size: 24px;
}
.DocumentoLegal p { margin: 8px 0; }
.DocumentoLegal ul { padding-left: 22px; margin: 8px 0; }
.DocumentoLegal li { margin-bottom: 4px; }
.DocumentoLegal a { color: #0BA243; font-weight: 600; }
.LegalFecha { color: #888; font-style: italic; font-size: 13px; }
.LegalCierre { margin-top: 30px; padding-top: 12px; border-top: 1px solid #ddd; }

/* Zona de peligro del modal de perfil */
.ZonaPeligro {
    padding: 18px 28px 22px;
    border-top: 1px solid #f1c0c0;
    background-color: #fff5f5;
}
.ZonaPeligro h3 {
    color: #c0392b;
    font-family: "Passion One", sans-serif;
    margin: 0 0 8px 0;
    font-size: 18px;
}
.ZonaPeligro p {
    font-size: 13px;
    color: #555;
    margin: 0 0 12px 0;
}
.BotonPeligro {
    background-color: rgb(255, 119, 119);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: "Passion One", sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.BotonPeligro:hover {
    background-color: #e64a4a;
    transform: translateY(-1px);
}

/* Checkbox de privacidad en el registro */
.form-group-checkbox { margin-top: 8px; }
.CheckboxPrivacidad {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #444;
    text-align: left;
    cursor: pointer;
}
.CheckboxPrivacidad input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #0BA243;
}
.CheckboxPrivacidad a {
    color: #0BA243;
    text-decoration: none;
    font-weight: 600;
}
.CheckboxPrivacidad a:hover { text-decoration: underline; }

/* ============== Lupa en el header (solo móvil) ============== */
/* En desktop la lupa NO existe — sigue funcionando el buscador de la columna derecha */
.BotonBuscarHeader {
    display: none;
    background-color: #35CB83;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: auto;          /* empuja al extremo derecho del flex */
    margin-right: 12px;
    font-size: 15px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.15s ease;
}
.BotonBuscarHeader:hover {
    background-color: #0BA243;
}

.BuscadorHeader {
    display: none;
    flex: 1;
    margin-left: 12px;
    margin-right: 12px;
}
.BuscadorHeader input {
    width: 100%;
    padding: 6px 14px;
    border: 2px solid #35CB83;
    border-radius: 20px;
    font-size: 15px;
    outline: none;
    background-color: white;
    color: #333;
    box-sizing: border-box;
}
.BuscadorHeader input:focus {
    border-color: #0BA243;
    box-shadow: 0 0 0 3px rgba(11, 162, 67, 0.18);
}

/* Móvil: mostrar lupa, ocultar el viejo BuscadorMovil */
@media (max-width: 950px) {
    .BotonBuscarHeader {
        display: inline-flex;
    }
    /* el viejo formulario movil de Base.html ya no se usa */
    .BuscadorMovil {
        display: none !important;
    }
    /* Cuando el usuario pulsa la lupa: input visible, titulo oculto */
    .DivTextoFlecha.busqueda-activa .TextoFlecha {
        display: none;
    }
    .DivTextoFlecha.busqueda-activa .BuscadorHeader {
        display: block;
    }
}

/* ============== Chat: fotos + una vez ============== */
.ChatImagen {
    max-width: 240px;
    max-height: 240px;
    border-radius: 8px;
    display: block;
    margin-bottom: 4px;
    cursor: pointer;
}

.ChatTexto {
    margin-top: 4px;
}

.ChatFotoExpirada {
    color: #999;
    font-style: italic;
    font-size: 13px;
    padding: 8px 4px;
}

.ChatFotoUnaVezPendiente {
    color: #d4f0e1;
    font-style: italic;
    font-size: 13px;
    padding: 8px 4px;
}

.ChatFotoRevelar {
    background-color: #0BA243;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.15s;
}

.ChatFotoRevelar:hover {
    background-color: #00541C;
}

/* Adjuntar */
.ChatBotonAdjunto {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #F4FFF9;
    border: 2px solid #35CB83;
    color: #0BA243;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.ChatBotonAdjunto:hover {
    background-color: #35CB83;
    color: white;
}

.ChatInputArea {
    flex: 1 1 auto;
    min-width: 0;   /* sin esto el input empuja los flex siblings fuera */
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ChatOpcionesFoto {
    display: none;
    align-items: center;
    gap: 12px;
    background-color: #F4FFF9;
    border: 1px solid #35CB83;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 13px;
    color: #00541C;
}

.ChatOpcionesFoto.mostrar {
    display: flex;
}

.ChatNombreImagen {
    flex: 1;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ChatChecboxUnaVez {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #00541C;
    font-weight: 600;
    white-space: nowrap;
}

.ChatChecboxUnaVez input[type="checkbox"] {
    accent-color: #0BA243;
}

/* Overlay fullscreen al revelar una foto "una vez" */
.ChatOverlayUnaVez {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: pointer;
}

.ChatOverlayUnaVez img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.ChatOverlayUnaVez p {
    color: white;
    margin-top: 16px;
    font-size: 14px;
    opacity: 0.85;
}

/* ============== Chat: extras (emoji, GIF, audio, reply, reacciones) ============== */

/* Burbuja con botones flotantes (reaccionar / responder) */
.ChatBurbuja { padding-bottom: 18px; }
.ChatBtnReaccionar, .ChatBtnResponder {
    position: absolute;
    top: -10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    background-color: #ffffff;
    color: #00541C;
    cursor: pointer;
    font-size: 11px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    z-index: 2;
}
.ChatBtnReaccionar { right: -6px; }
.ChatBtnResponder { right: 24px; }
.ChatMensaje.Otro .ChatBtnReaccionar { right: auto; left: -6px; }
.ChatMensaje.Otro .ChatBtnResponder { right: auto; left: 24px; }
.ChatMensaje:hover .ChatBtnReaccionar,
.ChatMensaje:hover .ChatBtnResponder { display: inline-flex; }
@media (hover: none) {
    .ChatBtnReaccionar, .ChatBtnResponder { display: inline-flex; opacity: 0.85; }
}

/* GIF en burbuja */
.ChatGif {
    max-width: 220px;
    max-height: 220px;
    border-radius: 10px;
    display: block;
}

/* Audio en burbuja */
.ChatAudio {
    display: block;
    width: 220px;
    max-width: 100%;
    margin: 2px 0;
}

/* Cita al responder (dentro de la burbuja) */
.ChatRespuestaCita {
    display: block;
    border-left: 3px solid rgba(255,255,255,0.6);
    padding: 4px 8px;
    margin-bottom: 6px;
    background-color: rgba(255,255,255,0.18);
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.3;
}
.ChatMensaje.Otro .ChatRespuestaCita {
    border-left-color: #35CB83;
    background-color: rgba(53, 203, 131, 0.08);
}
.ChatRespuestaAutor {
    display: block;
    font-weight: 700;
    opacity: 0.85;
    font-size: 11px;
    margin-bottom: 1px;
}
.ChatRespuestaTexto {
    display: block;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

/* Reacciones bajo la burbuja */
.ChatReacciones {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.ChatMensaje.Mio .ChatReacciones { justify-content: flex-end; }
.ChatReaccion {
    background-color: #ffffff;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.15s ease, transform 0.1s ease;
}
.ChatReaccion small { color: #555; font-size: 11px; }
.ChatReaccion:hover { background-color: #F4FFF9; transform: translateY(-1px); }
.ChatReaccion.Mia {
    background-color: #d9f5e6;
    border-color: #35CB83;
}

/* Preview de "respondiendo a..." encima del form */
.ChatReplyPreview, .ChatPreviewAdjunto {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #F4FFF9;
    border-top: 1px solid #35CB83;
    font-size: 13px;
    color: #00541C;
}
.ChatReplyPreview[hidden], .ChatPreviewAdjunto[hidden] { display: none; }
.ChatReplyPreviewBody { flex: 1; min-width: 0; }
.ChatReplyPreviewLabel { display: block; font-size: 11px; opacity: 0.8; }
.ChatReplyPreviewTexto {
    display: block;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ChatReplyCancelar {
    background: none;
    border: none;
    cursor: pointer;
    color: #00541C;
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}
.ChatReplyCancelar:hover { background-color: rgba(0,0,0,0.06); }
.ChatPreviewAdjuntoBody img { max-height: 80px; border-radius: 6px; }

/* Botones de adjuntar (icono mini) */
.ChatBotonesAdjuntar {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}
.ChatBotonMini {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #F4FFF9;
    border: 2px solid #35CB83;
    color: #0BA243;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    padding: 0;
}
.ChatBotonMini:hover {
    background-color: #35CB83;
    color: white;
}
.ChatBtnGifLabel {
    font-family: "Passion One", sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Paneles flotantes (emoji / gif) */
.ChatPanelFlotante {
    position: absolute;
    bottom: 70px;
    left: 12px;
    right: 12px;
    max-width: 340px;
    max-height: 320px;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    z-index: 50;
    display: flex;
    flex-direction: column;
}
.ChatPanelFlotante[hidden] { display: none; }
.ChatPanelTitulo {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-weight: 600;
    color: #00541C;
    font-size: 13px;
}
.ChatEmojiGrid {
    overflow-y: auto;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
}
.ChatEmojiBtn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    padding: 4px;
    border-radius: 6px;
    line-height: 1;
}
.ChatEmojiBtn:hover { background-color: #F4FFF9; }
.ChatGifBuscarInput {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #35CB83;
    border-radius: 18px;
    font-size: 13px;
    outline: none;
}
.ChatGifGrid {
    overflow-y: auto;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}
.ChatGifItem {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    background-color: #F4FFF9;
    transition: transform 0.1s;
}
.ChatGifItem:hover { transform: scale(1.02); }
.ChatGifMensaje {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    font-size: 13px;
    padding: 20px;
    margin: 0;
}

/* Panel de reaccionar (aparece flotante junto al mensaje) */
.ChatPanelReaccion {
    position: fixed;
    background-color: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 28px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    padding: 4px;
    display: flex;
    gap: 2px;
    z-index: 60;
}
.ChatPanelReaccion[hidden] { display: none; }
.ChatReaccionBtn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    padding: 4px 6px;
    border-radius: 50%;
    line-height: 1;
    transition: transform 0.1s, background-color 0.1s;
}
.ChatReaccionBtn:hover {
    transform: scale(1.25);
    background-color: #F4FFF9;
}

/* Overlay de grabación de audio */
.ChatGrabandoOverlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ChatGrabandoOverlay[hidden] { display: none; }
.ChatGrabandoBox {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 28px 36px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    min-width: 260px;
}
.ChatGrabandoIcon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: #ff4d4f;
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: chatPulse 1.2s ease-in-out infinite;
}
@keyframes chatPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,77,79,0.5); }
    50% { box-shadow: 0 0 0 14px rgba(255,77,79,0); }
}
.ChatGrabandoTimer {
    font-family: "Passion One", sans-serif;
    font-size: 32px;
    color: #00541C;
    margin-bottom: 18px;
}
.ChatGrabandoAcciones {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.ChatGrabandoBtn {
    border: none;
    padding: 10px 18px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ChatGrabandoCancelar { background-color: #f4f4f4; color: #555; }
.ChatGrabandoCancelar:hover { background-color: #e6e6e6; }
.ChatGrabandoEnviar { background-color: #35CB83; color: white; }
.ChatGrabandoEnviar:hover { background-color: #0BA243; }

/* La ventana de chat necesita ser referencia para los paneles flotantes y NO
   recortarlos. Compensamos los bordes redondeados aplicándolos a cabecera/form. */
.ChatVentana {
    position: relative;
    overflow: visible;
}
.ChatCabecera {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.ChatForm {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

@media (max-width: 550px) {
    .ChatPanelFlotante { left: 6px; right: 6px; bottom: 130px; max-width: none; }
    .ChatBotonMini { width: 34px; height: 34px; font-size: 13px; }
    .ChatGifItem { height: 80px; }
    .ChatEmojiGrid { grid-template-columns: repeat(7, 1fr); }
}

/* ============== Footer movil no debe tapar contenido ============== */
@media (max-width: 550px) {
    /* Reservamos 60px abajo en cualquier pagina para que el ultimo
       elemento no quede oculto por el .Footer fijo (50px + 10 de respiro) */
    .ContenedorCentral {
        padding-bottom: 60px;
    }

    /* La ventana de chat resta tambien el footer en su altura */
    .ChatVentana {
        height: calc(100vh - 130px - 50px);
        height: calc(100dvh - 130px - 50px);
        margin-top: 8px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    /* En mobile no descontamos padding-bottom del .ContenedorCentral
       para el chat (el form ya esta al final de su propia ventana). */
    .ContenedorCentral:has(.ChatVentana) { padding-bottom: 0; }

    /* === Form del chat en mobile === */
    /* El input con font-size 14 hace que iOS haga zoom-in al hacer focus.
       Lo subimos a 16 en mobile para evitar ese efecto. */
    .ChatInput {
        font-size: 16px !important;
        padding: 8px 12px !important;
    }
    /* Botones de adjuntar mas compactos para que quepa todo */
    .ChatForm {
        gap: 4px;
        padding: 6px 8px;
        align-items: center;
    }
    .ChatBotonesAdjuntar { gap: 2px; }
    .ChatBotonMini {
        width: 34px;
        height: 34px;
        font-size: 13px;
        border-width: 1.5px;
    }
    .ChatEnviar {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    .ChatBurbuja { font-size: 14px; }
    .ChatMensaje { max-width: 82%; }
    .ChatCabecera { padding: 10px 12px; font-size: 15px; }
    .ChatCabecera .ChatAvatar { width: 34px; height: 34px; }
    .ChatMensajes { padding: 12px 10px; }
    /* Botones de Reaccionar/Responder dentro de la burbuja: mas pequenos
       y mas pegados en mobile (estan SIEMPRE visibles porque no hay hover) */
    .ChatBtnReaccionar, .ChatBtnResponder {
        width: 22px;
        height: 22px;
        font-size: 9px;
        top: -8px;
    }
    .ChatBtnResponder { right: 20px; }
    .ChatMensaje.Otro .ChatBtnResponder { left: 20px; }
    /* Boton "Nuevos mensajes" centrado y mas pequenyo */
    .BtnNuevosMensajes {
        bottom: 80px;
        font-size: 12px;
        padding: 6px 12px;
    }
    /* Imagenes / GIFs en burbuja mas pequenyos en mobile */
    .ChatImagen, .ChatGif {
        max-width: 180px;
        max-height: 180px;
    }
    .ChatAudio { width: 180px; }
}

/* Pantallas muy estrechas: aun mas compacto el form del chat */
@media (max-width: 380px) {
    .ChatBotonMini {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    .ChatEnviar { width: 34px; height: 34px; }
    .ChatBtnGifLabel { font-size: 10px; }
}

/* ============== Actividad: botones de acción (Guardar/Hice/Voy) ============== */
.Likear {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.BotonAccion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 22px;
    border: 1.5px solid #35CB83;
    background-color: white;
    color: #00541C;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: background-color 0.15s ease, transform 0.1s ease, color 0.15s ease;
}
.BotonAccion:hover {
    background-color: #F4FFF9;
    transform: translateY(-1px);
}
.BotonAccion.Activo {
    background-color: #35CB83;
    color: white;
}
.BotonAccion.Activo:hover {
    background-color: #0BA243;
}
.BotonAccionLabel {
    font-weight: 600;
}
.BotonAccionContador {
    background-color: rgba(0, 84, 28, 0.08);
    color: #00541C;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}
.BotonAccion.Activo .BotonAccionContador {
    background-color: rgba(255,255,255,0.25);
    color: white;
}
.BotonVoyGroup {
    display: inline-flex;
    gap: 4px;
}
.BotonVoy {
    padding: 8px 12px;
    font-size: 12px;
}
@media (max-width: 550px) {
    .BotonAccion {
        padding: 7px 10px;
        font-size: 12px;
    }
    .BotonAccionLabel {
        display: none;
    }
}

/* ============== Actividad: intenciones (van hoy/mañana) ============== */
.ActividadIntenciones {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 16px;
    background-color: #F4FFF9;
    border-radius: 12px;
    margin: 14px 0;
    border: 1px solid rgba(53, 203, 131, 0.3);
}
.ActividadIntencionGrupo {
    flex: 1 1 200px;
}
.ActividadIntencionTitulo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #00541C;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}
.ActividadIntencionAvatares {
    display: flex;
    align-items: center;
    gap: -8px;
}
.ActividadIntencionAvatares a {
    display: inline-block;
    margin-left: -8px;
    transition: transform 0.15s ease;
}
.ActividadIntencionAvatares a:first-child {
    margin-left: 0;
}
.ActividadIntencionAvatares a:hover {
    transform: translateY(-2px) scale(1.08);
    z-index: 2;
}
.ActividadIntencionAvatares img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.ActividadIntencionMas {
    margin-left: 6px;
    font-size: 13px;
    color: #555;
    font-weight: 600;
}

/* ============== Actividad: valoración media ============== */
.ActividadValoracion {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    margin: 12px 0;
    background-color: #fffbea;
    border-radius: 10px;
    border: 1px solid #f5e1a4;
}
.ActividadValoracionEstrellas {
    color: #f5b800;
    font-size: 18px;
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ActividadValoracionEstrellas strong {
    color: #00541C;
    font-size: 15px;
}
.ActividadValoracionTexto {
    color: #555;
    font-size: 13px;
}

/* ============== Actividad: galería colaborativa ============== */
.ActividadGaleria {
    margin: 18px 0;
    padding: 16px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
}
.ActividadGaleriaCabecera {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.ActividadGaleriaTitulo {
    color: #00541C;
    font-family: "Passion One", sans-serif;
    font-size: 22px;
    margin: 0;
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ActividadGaleriaContador {
    color: #888;
    font-size: 14px;
    font-family: sans-serif;
    font-weight: normal;
}
.ActividadGaleriaPista {
    color: #888;
    font-size: 12px;
    font-style: italic;
}
.BotonGaleriaSubir {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background-color: #35CB83;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.BotonGaleriaSubir:hover {
    background-color: #0BA243;
}
.ActividadGaleriaGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.GaleriaItem {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #F4FFF9;
    aspect-ratio: 1/1;
}
.GaleriaItem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}
.GaleriaItem:hover img {
    transform: scale(1.04);
}
.GaleriaItemAutor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 8px 6px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    color: white;
    font-size: 11px;
    font-weight: 600;
}
.GaleriaItemBorrar {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.55);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 11px;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.GaleriaItem:hover .GaleriaItemBorrar {
    display: flex;
    opacity: 1;
}
.ActividadGaleriaVacia {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 24px 12px;
    margin: 0;
}

/* ============== Modal "Lo hice" ============== */
#ModalHice .HiceCampo {
    margin-bottom: 14px;
    text-align: left;
}
#ModalHice .HiceCampo label {
    display: block;
    font-weight: 600;
    color: #00541C;
    margin-bottom: 6px;
    font-size: 14px;
}
#ModalHice textarea,
#ModalHice input[type="date"] {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #35CB83;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    background-color: white;
}
#ModalHice textarea:focus,
#ModalHice input[type="date"]:focus {
    border-color: #0BA243;
    box-shadow: 0 0 0 3px rgba(11, 162, 67, 0.18);
}
.HiceEstrellas {
    display: inline-flex;
    gap: 4px;
}
.HiceEstrella {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 34px;
    color: #ddd;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.1s ease, transform 0.1s ease;
}
.HiceEstrella:hover {
    transform: scale(1.15);
}
.HiceEstrella.Activa {
    color: #f5b800;
}

/* Diario: estrellas dentro del listado */
.DiarioValoracion {
    color: #f5b800;
    font-size: 18px;
    letter-spacing: 2px;
    margin: 4px 0;
}

/* ============== Lista actividades: filtro 'cerca de mí' ============== */
.ListaActividadesFiltros {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 4px;
    margin: 0;
}
.ListaActividadesFiltros .form-filtro {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.FiltroCerca {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.BtnCercaDeMi {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #35CB83;
    background-color: white;
    color: #00541C;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.BtnCercaDeMi:hover {
    background-color: #F4FFF9;
}
.BtnCercaDeMi.Activo {
    background-color: #35CB83;
    color: white;
}
.BtnCercaDeMi.Activo:hover {
    background-color: #0BA243;
}
.BtnCercaDeMi.Cargando i {
    animation: cercaSpin 0.8s linear infinite;
}
@keyframes cercaSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.SelectRadio {
    padding: 6px 10px;
    border-radius: 16px;
    border: 1.5px solid #35CB83;
    background-color: white;
    font-size: 13px;
    color: #00541C;
    cursor: pointer;
    font-family: inherit;
}
.SelectRadio:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.CercaEstado {
    font-size: 12px;
    color: #555;
    padding: 2px 8px;
    background-color: #F4FFF9;
    border-radius: 10px;
}

/* Badge "a X km" dentro de cada tarjeta */
.BadgeDistancia {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #35CB83;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
}
.BadgeDistancia[hidden] { display: none; }

@media (max-width: 550px) {
    .BtnCercaTxt { display: none; }
    .ListaActividadesFiltros { padding: 10px 12px; gap: 8px; }
}

/* Botón flotante "Nuevos mensajes" en el chat — visible cuando entran
   mensajes mientras el usuario está scrolleado arriba leyendo */
.BtnNuevosMensajes {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #35CB83;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(0, 84, 28, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 40;
    transition: transform 0.15s ease;
}
.BtnNuevosMensajes:hover { transform: translateX(-50%) translateY(-2px); background-color: #0BA243; }
.BtnNuevosMensajes[hidden] { display: none; }

/* ============== Mapa: botón "Mi ubicación" ============== */
.MapaBotonUbicacion {
    background-color: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #00541C;
    font-size: 16px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    transition: background-color 0.15s ease;
}
.MapaBotonUbicacion:hover {
    background-color: #F4FFF9;
}
.MapaBotonUbicacion.Activo {
    background-color: #35CB83;
    color: white;
}
.MapaBotonUbicacion.Cargando i {
    animation: cercaSpin 0.8s linear infinite;
}


/* ============== Grupos de chat ============== */
.ChatsTabs {
    display: flex;
    gap: 4px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    background: #fafafa;
}
.ChatsTab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.12s;
}
.ChatsTab:hover { background: rgba(0,0,0,0.05); }
.ChatsTab.Activa {
    background: #35CB83;
    color: #fff;
}

.GruposToolbar {
    padding: 12px 14px;
    display: flex;
    justify-content: flex-end;
}
.GruposToolbar .BotonSeguir {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; font-size: 14px;
    text-decoration: none;
}

.GrupoEmoji {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, #E0F7EA 0%, #B7E4C7 100%);
    border-radius: 50%;
    flex: 0 0 50px;
}
.GrupoActividadTag {
    display: inline-block; margin-left: 6px;
    font-size: 11px; font-weight: 500;
    color: #1B5E20; background: #E8F5E9;
    padding: 1px 6px; border-radius: 10px;
}

.GrupoVentana .ChatCabecera.GrupoCabecera {
    display: flex; align-items: center; gap: 10px;
}
.GrupoCabeceraEmoji {
    width: 44px; height: 44px; flex: 0 0 44px;
    background: linear-gradient(135deg, #E0F7EA 0%, #B7E4C7 100%);
    border-radius: 50%; font-size: 24px;
    display: flex; align-items: center; justify-content: center;
}
.GrupoCabeceraInfo {
    flex: 1 1 auto; min-width: 0;
    display: flex; flex-direction: column;
}
.GrupoCabeceraInfo strong { font-size: 16px; }
.GrupoCabeceraSub { font-size: 12px; color: #777; }
.GrupoActividadLink { color: #2E7D32; text-decoration: none; }
.GrupoCabeceraBtn {
    flex: 0 0 36px; width: 36px; height: 36px;
    background: transparent; border: 0; cursor: pointer;
    color: #555; font-size: 18px;
}
.GrupoCabeceraBtn:hover { color: #2E7D32; }

.GrupoInfoPanel {
    padding: 14px 16px;
    background: #f7faf8;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.GrupoInfoPanel h3 { margin: 4px 0 8px; font-size: 14px; color: #444; }
.GrupoMiembrosLista { list-style: none; padding: 0; margin: 0 0 12px; }
.GrupoMiembroItem {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 0; font-size: 14px;
}
.GrupoMiembroItem img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.GrupoMiembroItem a { text-decoration: none; color: #333; flex: 1; }
.GrupoBadgeAdmin {
    background: #2E7D32; color: #fff;
    font-size: 10px; font-weight: 600;
    padding: 2px 6px; border-radius: 8px;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.GrupoBtnExpulsar {
    background: transparent; border: 0; color: #c62828;
    cursor: pointer; padding: 4px 6px; font-size: 14px;
}
.GrupoBtnExpulsar:hover { color: #b71c1c; }
.GrupoInvitarRow {
    display: flex; gap: 6px; margin-bottom: 4px;
}
.GrupoInvitarRow input {
    flex: 1; padding: 7px 10px; font-size: 13px;
    border: 1px solid #ccc; border-radius: 6px;
}
.GrupoInvitarHint { font-size: 11px; color: #888; margin: 4px 0 12px; }
.GrupoSalirForm { margin-top: 8px; }

/* Autor en cada mensaje "Otro" cuando estamos en grupo */
.ChatMensaje.EnGrupo.Otro { display: flex; flex-direction: column; align-items: flex-start; }
.ChatAutorGrupo {
    display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none; color: #555;
    font-size: 12px; margin-left: 8px; margin-bottom: 2px;
}
.ChatAutorGrupoAvatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.ChatAutorGrupoNombre { font-weight: 600; }

/* Boton "Chat del plan" en la pagina de actividad */
.BotonChatPlan {
    display: flex; align-items: center; gap: 10px;
    margin: 12px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #F4FFF9 0%, #E0F7EA 100%);
    border: 1px solid #B7E4C7;
    border-radius: 10px;
    color: #1B5E20;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.08s, box-shadow 0.12s;
}
.BotonChatPlan:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(46,125,50,0.18); }
.BotonChatPlan small { display: block; font-weight: 400; font-size: 12px; color: #555; }
.BotonChatPlan i { font-size: 22px; }


/* ============== Crear / Editar grupo (foto, banner, color, descripcion) ============== */
.GrupoFormCard {
    --color-grupo: #35CB83;
    max-width: 720px;
    margin: 18px auto 32px;
    padding: 0;
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
}

.GrupoPreviewCard {
    --color-grupo: #35CB83;
    position: relative;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.GrupoPreviewBanner {
    position: relative;
    height: 140px;
    background: linear-gradient(135deg, var(--color-grupo) 0%, rgba(255,255,255,0.3) 100%);
    background-size: cover; background-position: center;
}
.GrupoPreviewBanner.TieneBanner { background-color: #ccc; }
.GrupoBannerOverlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 6px;
    color: #fff; font-weight: 600; font-size: 13px;
    cursor: pointer;
    background: rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.15s;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.GrupoPreviewBanner:hover .GrupoBannerOverlay { opacity: 1; }
.GrupoPreviewBanner:not(.TieneBanner) .GrupoBannerOverlay { opacity: 1; }
.GrupoBannerOverlay i { font-size: 28px; }
.GrupoBannerQuitar {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,0.55); color: #fff;
    padding: 4px 10px; border-radius: 14px;
    font-size: 11px; cursor: pointer;
    display: flex; align-items: center; gap: 5px;
}
.GrupoBannerQuitar input { display: none; }
.GrupoBannerQuitar:has(input:checked) { background: #c62828; }

.GrupoPreviewBarra {
    display: flex; align-items: center; gap: 14px;
    padding: 0 20px 18px;
    position: relative;
    margin-top: -38px;
}
.GrupoPreviewFoto {
    width: 84px; height: 84px; flex: 0 0 84px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    cursor: pointer;
    background-size: cover; background-position: center;
    overflow: hidden;
}
.GrupoPreviewEmoji { font-size: 42px; line-height: 1; }
.GrupoPreviewFoto.TieneFoto .GrupoPreviewEmoji { display: none; }
.GrupoPreviewFotoOverlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.4); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; opacity: 0;
    transition: opacity 0.15s;
    border-radius: 50%;
}
.GrupoPreviewFoto:hover .GrupoPreviewFotoOverlay { opacity: 1; }
.GrupoPreviewTexto {
    flex: 1 1 auto; min-width: 0;
    margin-top: 38px;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.GrupoPreviewTexto strong {
    font-size: 20px; color: #222;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.GrupoPreviewSub { font-size: 12px; color: #777; margin-top: 2px; }

.GrupoQuitarToggle {
    display: flex; align-items: center; gap: 6px;
    margin: 8px 20px 0;
    padding: 7px 12px;
    font-size: 12px; color: #c62828;
    background: #FFEBEE; border-radius: 6px;
    cursor: pointer; width: fit-content;
}
.GrupoQuitarToggle input { margin-right: 4px; }

.GrupoSeccion {
    padding: 22px 24px;
    border-bottom: 1px solid #f0f0f0;
}
.GrupoSeccion:last-of-type { border-bottom: 0; }
.GrupoSeccionHead {
    display: flex; align-items: flex-start; gap: 12px;
    margin-bottom: 18px;
}
.GrupoSeccionHead > i {
    width: 36px; height: 36px; flex: 0 0 36px;
    border-radius: 8px;
    background: rgba(53,203,131,0.12); color: #35CB83;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.GrupoSeccionHead h3 {
    margin: 0; font-size: 16px; color: #222;
    display: flex; align-items: center; gap: 8px;
}
.GrupoSeccionHead p { margin: 4px 0 0; font-size: 12px; color: #888; }
.GrupoSeccionContador {
    background: #35CB83; color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 2px 9px; border-radius: 12px;
    min-width: 20px; text-align: center;
}

.GrupoCampo { margin-bottom: 18px; }
.GrupoCampo:last-child { margin-bottom: 0; }
.GrupoCampo > label {
    display: flex; align-items: center; gap: 6px; justify-content: space-between;
    font-size: 13px; font-weight: 700;
    margin-bottom: 8px; color: #333;
}
.GrupoCampo > label small { font-weight: 400; color: #888; font-size: 11px; }
.GrupoCampo input[type=text],
.GrupoCampo textarea {
    width: 100%; padding: 10px 14px; font-size: 14px;
    border: 1px solid #e0e0e0; border-radius: 10px; box-sizing: border-box;
    transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
    background: #fafafa;
    font-family: inherit;
}
.GrupoCampo textarea { resize: vertical; min-height: 70px; }
.GrupoCampo input[type=text]:focus,
.GrupoCampo textarea:focus {
    outline: 0;
    border-color: #35CB83;
    box-shadow: 0 0 0 3px rgba(53,203,131,0.15);
    background: #fff;
}

.GrupoEmojiInput { display: flex; }
.GrupoEmojiInput input {
    text-align: center;
    font-size: 28px !important;
    padding: 8px !important;
    width: 80px !important;
    background: #fff !important;
}

.EmojiSugeridos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.EmojiSugeridos button {
    border: 1px solid transparent; background: #f4f4f4;
    width: 36px; height: 36px;
    border-radius: 8px; cursor: pointer;
    font-size: 20px; padding: 0;
    transition: background 0.1s, transform 0.06s, border-color 0.1s;
}
.EmojiSugeridos button:hover { background: #E0F7EA; border-color: #B7E4C7; }
.EmojiSugeridos button:active { transform: scale(0.92); }

.GrupoColores { display: flex; flex-wrap: wrap; gap: 10px; }
.GrupoColor {
    width: 36px; height: 36px;
    border-radius: 50%; border: 3px solid #fff;
    box-shadow: 0 0 0 2px transparent, 0 1px 4px rgba(0,0,0,0.12);
    cursor: pointer; padding: 0;
    transition: box-shadow 0.12s, transform 0.08s;
}
.GrupoColor:hover { transform: scale(1.08); }
.GrupoColor.Activo {
    box-shadow: 0 0 0 2px #222, 0 1px 4px rgba(0,0,0,0.12);
    transform: scale(1.08);
}

.GrupoBuscadorWrap { position: relative; margin-bottom: 10px; }
.GrupoBuscadorWrap > i {
    position: absolute; top: 50%; left: 12px;
    transform: translateY(-50%);
    color: #aaa; font-size: 13px;
    pointer-events: none;
}
.BuscadorMutuos {
    width: 100%; padding: 10px 12px 10px 34px;
    border: 1px solid #e0e0e0; border-radius: 10px;
    font-size: 13px; box-sizing: border-box;
    background: #fafafa;
    transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.BuscadorMutuos:focus {
    outline: 0; border-color: #35CB83; background: #fff;
    box-shadow: 0 0 0 3px rgba(53,203,131,0.15);
}

.GrupoMutuosLista {
    display: flex; flex-direction: column; gap: 4px;
    max-height: 380px; overflow-y: auto;
    padding: 6px; border: 1px solid #eee; border-radius: 10px;
    background: #fafafa;
}
.GrupoMutuoItem {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    cursor: pointer; border-radius: 8px;
    background: #fff;
    border: 1px solid transparent;
    transition: background 0.1s, border-color 0.1s;
}
.GrupoMutuoItem:hover { background: #F4FFF9; }
.GrupoMutuoItem .ChkMiembro { position: absolute; opacity: 0; pointer-events: none; }
.GrupoMutuoItem:has(.ChkMiembro:checked) {
    background: #E8F5E9; border-color: #B7E4C7;
}
.GrupoMutuoAvatar {
    width: 40px; height: 40px; border-radius: 50%;
    object-fit: cover; flex: 0 0 40px;
}
.GrupoMutuoTexto {
    flex: 1 1 auto; min-width: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.GrupoMutuoTexto strong {
    font-size: 14px; color: #333;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.GrupoMutuoTexto small { font-size: 11px; color: #888; }
.GrupoMutuoCheck {
    width: 24px; height: 24px; flex: 0 0 24px;
    border-radius: 50%; background: #fff;
    border: 2px solid #ccc;
    display: flex; align-items: center; justify-content: center;
    color: transparent; font-size: 12px;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.GrupoMutuoItem:has(.ChkMiembro:checked) .GrupoMutuoCheck {
    background: #35CB83; border-color: #35CB83; color: #fff;
}
.GrupoMutuosVacio {
    padding: 24px 14px; text-align: center;
    color: #888; font-size: 13px; margin: 0;
}
.GrupoMutuosVacio i { display: block; font-size: 30px; margin-bottom: 10px; color: #ccc; }

.GrupoFormBotones {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 18px 24px 22px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}
.BotonCancelarGrupo {
    padding: 10px 20px;
    background: #fff; color: #555;
    border: 1px solid #ddd;
    border-radius: 10px; text-decoration: none;
    font-size: 14px; font-weight: 600;
    transition: background 0.1s, border-color 0.1s;
}
.BotonCancelarGrupo:hover { background: #f4f4f4; border-color: #ccc; }
.BotonCrearGrupoSubmit {
    padding: 10px 24px;
    background: #35CB83; color: #fff;
    border: 0; border-radius: 10px;
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    box-shadow: 0 3px 8px rgba(53,203,131,0.3);
    transition: background 0.12s, transform 0.08s, box-shadow 0.12s;
}
.BotonCrearGrupoSubmit:hover {
    background: #2EAE6F;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(53,203,131,0.4);
}
.BotonCrearGrupoSubmit:active { transform: translateY(0); }

@media (max-width: 600px) {
    .GrupoFormCard { margin: 8px; border-radius: 12px; }
    .GrupoPreviewBanner { height: 110px; }
    .GrupoPreviewFoto { width: 72px; height: 72px; flex: 0 0 72px; }
    .GrupoPreviewEmoji { font-size: 36px; }
    .GrupoSeccion { padding: 18px; }
    .GrupoFormBotones { flex-direction: column-reverse; padding: 14px; }
    .BotonCancelarGrupo, .BotonCrearGrupoSubmit {
        width: 100%; text-align: center; justify-content: center;
    }
}

/* GrupoChat: banner + foto en cabecera */
.GrupoBanner {
    height: 110px;
    background-size: cover; background-position: center;
    background-color: var(--color-grupo, #35CB83);
}
.GrupoVentana .ChatCabecera.GrupoCabecera {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 14px 12px;
    margin-top: -36px;
    position: relative;
    align-items: flex-end;
}
.GrupoCabeceraFoto {
    width: 68px; height: 68px; flex: 0 0 68px;
    border-radius: 50%;
    background-size: cover; background-position: center;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.GrupoVentana .GrupoCabeceraEmoji {
    width: 68px; height: 68px; flex: 0 0 68px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    font-size: 34px;
    background: linear-gradient(135deg, #E0F7EA 0%, #B7E4C7 100%);
}
.GrupoVentana .GrupoCabeceraInfo { padding-bottom: 6px; }

.GrupoDescripcionBox {
    display: flex; gap: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
}
.GrupoDescripcionBox i { color: #B7E4C7; font-size: 16px; flex: 0 0 auto; }
.GrupoDescripcionBox p {
    margin: 0; font-size: 13px; color: #444; line-height: 1.5; flex: 1 1 auto;
}

.BotonEditarGrupo {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    background: #fff; color: #1B5E20;
    border: 1px solid #B7E4C7; border-radius: 8px;
    text-decoration: none;
    font-size: 13px; font-weight: 600;
    margin-bottom: 14px;
    transition: background 0.1s;
}
.BotonEditarGrupo:hover { background: #E8F5E9; }

.GrupoFotoCircular {
    background-size: cover; background-position: center;
    font-size: 0 !important;
}


/* Modal compartir: items de grupo */
.ModalCompartirItemGrupo .ModalCompartirEmojiGrupo {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, #E0F7EA 0%, #B7E4C7 100%);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px; flex: 0 0 36px;
}

/* Toolbar arriba de /chat/ con el boton "Crear grupo" */
.ChatsToolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 14px 4px;
}
.BotonCrearGrupo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: #35CB83;
    border: 0;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.12s, transform 0.08s, box-shadow 0.12s;
    box-shadow: 0 2px 6px rgba(53, 203, 131, 0.25);
}
.BotonCrearGrupo i { font-size: 14px; }
.BotonCrearGrupo:hover {
    background: #2EAE6F;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(53, 203, 131, 0.35);
}
.BotonCrearGrupo:active { transform: translateY(0); }

/* Reduce el padding del bloque de pestanas para que no haya tanto hueco
   entre la cabecera y el toolbar. */
.ChatsTabs { padding: 6px 10px 4px; }

/* Avatar tipo emoji para notif de grupo */
.NotifAvatarEmoji {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}

/* Compartir grupo (panel info) */
.GrupoCompartirExterno {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin: 6px 0 10px;
}
.GrupoCompartirExterno .ShareBtn {
    display: flex; align-items: center; justify-content: center;
    gap: 7px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.08s, box-shadow 0.12s;
}
.GrupoCompartirExterno .ShareBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.GrupoCompartirExterno .ShareBtn i { font-size: 16px; }
.GrupoCompartirExterno .ShareBtn svg { width: 18px; height: 18px; flex: 0 0 18px; }

/* Colores para los botones de compartir en grupo (mismos que en Actividad) */
.GrupoCompartirExterno .ShareWhatsApp { background: #25D366; color: #fff; border-color: #25D366; }
.GrupoCompartirExterno .ShareTelegram { background: #0088cc; color: #fff; border-color: #0088cc; }
.GrupoCompartirExterno .ShareCopiar   { background: #F4F4F4; color: #333; }
.GrupoCompartirExterno .ShareCopiar:hover { background: #EBEBEB; }

/* Etiqueta "Grupo" dentro de la lista unificada de chats */
.ChatGrupoTag {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    background: #E8F5E9;
    color: #1B5E20;
    border-radius: 50%;
    font-size: 9px;
    margin-left: 4px;
    vertical-align: middle;
}

/* "Para ti" — sugerencias tipo IA (tokens y focus se han consolidado en DesignSystem.css) */
/* ============ "Para ti" — sugerencias tipo IA ============ */
.ParaTiCard {
    margin: 14px 16px 18px;
    padding: 18px;
    background: linear-gradient(135deg, #ffffff 0%, var(--eg-green-pale) 100%);
    border: 1px solid var(--eg-green-light);
    border-radius: var(--eg-radius-lg);
    box-shadow: var(--eg-shadow-md);
    position: relative;
    overflow: hidden;
}
.ParaTiHead {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    position: relative;
}
.ParaTiBadge {
    display: inline-flex; align-items: center;
    padding: 4px 12px;
    background: var(--eg-green);
    color: #fff;
    border-radius: 14px;
    font-weight: 700; font-size: 13px;
    letter-spacing: 0.2px;
}
.ParaTiSub { margin: 0; font-size: 13px; color: var(--eg-muted); }

.ParaTiScroll {
    display: flex; gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}
.ParaTiScroll::-webkit-scrollbar { height: 6px; }
.ParaTiScroll::-webkit-scrollbar-thumb { background: var(--eg-green-light); border-radius: 3px; }

.ParaTiItem {
    flex: 0 0 220px;
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--eg-border);
    border-radius: var(--eg-radius-md);
    text-decoration: none; color: var(--eg-text);
    overflow: hidden;
    scroll-snap-align: start;
    cursor: pointer;
}
.ParaTiItem:hover {
    transform: translateY(-3px);
    box-shadow: var(--eg-shadow-lg);
    border-color: var(--eg-green-light);
}
.ParaTiFoto {
    width: 100%; height: 110px;
    background-size: cover; background-position: center;
    background-color: var(--eg-green-light);
}
.ParaTiFotoGenerica {
    display: flex; align-items: center; justify-content: center;
    font-size: 38px; color: var(--eg-green);
    background: linear-gradient(135deg, var(--eg-green-pale) 0%, var(--eg-green-light) 100%);
}
.ParaTiInfo { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.ParaTiInfo strong { font-size: 14px; line-height: 1.3; color: var(--eg-text); }
.ParaTiChip {
    align-self: flex-start;
    font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 8px;
    color: #1B5E20;
}
.ParaTiMeta { display: flex; gap: 12px; font-size: 11px; color: var(--eg-muted); margin-top: 2px; }
.ParaTiMeta i { margin-right: 2px; }
.ParaTiMeta i.fa-heart { color: #e53935; }
.ParaTiMeta i.fa-location-arrow { color: var(--eg-green); }

@media (max-width: 600px) {
    .ParaTiCard { margin: 10px; padding: 14px; }
    .ParaTiItem { flex: 0 0 180px; }
    .ParaTiFoto { height: 90px; }
}

/* ============ Toast notifications ============ */
.EgToastContainer {
    position: fixed;
    bottom: 20px; right: 20px;
    z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
    max-width: calc(100vw - 40px);
}
@media (max-width: 600px) {
    .EgToastContainer { bottom: 80px; left: 12px; right: 12px; }
}
.EgToast {
    pointer-events: auto;
    background: #fff;
    border: 1px solid var(--eg-border);
    border-left: 4px solid var(--eg-green);
    border-radius: var(--eg-radius-md);
    box-shadow: var(--eg-shadow-lg);
    padding: 12px 16px 12px 14px;
    min-width: 240px;
    max-width: 380px;
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 14px; color: var(--eg-text);
    animation: egToastIn 0.32s var(--eg-ease);
}
.EgToast.fuera { animation: egToastOut 0.28s var(--eg-ease) forwards; }
.EgToast.success { border-left-color: var(--eg-green); }
.EgToast.error   { border-left-color: #e53935; }
.EgToast.warning { border-left-color: #FB8C00; }
.EgToast.info    { border-left-color: #1E88E5; }
.EgToastIcono {
    width: 28px; height: 28px; flex: 0 0 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    background: var(--eg-green-light); color: var(--eg-ink);
}
.EgToast.error .EgToastIcono { background: #FFEBEE; color: #c62828; }
.EgToast.warning .EgToastIcono { background: #FFF3E0; color: #E65100; }
.EgToast.info .EgToastIcono { background: #E3F2FD; color: #1565C0; }
.EgToastTexto { flex: 1; line-height: 1.4; }
.EgToastCerrar {
    background: transparent; border: 0; cursor: pointer;
    color: var(--eg-muted); padding: 2px 6px;
    font-size: 14px;
}
.EgToastCerrar:hover { color: var(--eg-text); }
@keyframes egToastIn {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes egToastOut {
    from { transform: translateY(0); opacity: 1; }
    to   { transform: translateY(20px); opacity: 0; }
}

/* Skeleton + EgEmpty consolidados en DesignSystem.css */
.EgSkeletonAvatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; }
.EgSkeletonLinea { height: 12px; width: 80%; margin: 4px 0; }
.EgSkeletonLinea.Corta { width: 50%; }

/* ============ Soft-prompts (instalar PWA + activar push) ============ */
.EgBannerPWA {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 9998;
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--eg-border);
    border-radius: var(--eg-radius-lg);
    box-shadow: var(--eg-shadow-lg);
    padding: 14px 16px;
    display: flex; align-items: center; gap: 14px;
    animation: egBannerIn 0.32s var(--eg-ease);
}
/* Bugfix critico: el atributo [hidden] del HTML perdia contra display:flex.
   Sin esta regla, los banners no se ocultaban al pulsar Si/No. */
.EgBannerPWA[hidden] { display: none !important; }
@keyframes egBannerIn {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.EgBannerIcono {
    width: 44px; height: 44px; flex: 0 0 44px;
    border-radius: 50%;
    background: var(--eg-green-pale);
    color: var(--eg-green);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.EgBannerTexto {
    flex: 1 1 auto; min-width: 0;
    display: flex; flex-direction: column;
}
.EgBannerTexto strong { font-size: 14px; color: var(--eg-text); line-height: 1.2; }
.EgBannerTexto span { font-size: 12px; color: var(--eg-muted); margin-top: 2px; line-height: 1.35; }
.EgBannerBotones { display: flex; gap: 6px; flex: 0 0 auto; }
.EgBannerSecundario, .EgBannerPrimario {
    border: 0;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s;
}
.EgBannerSecundario {
    background: transparent;
    color: var(--eg-muted);
}
.EgBannerSecundario:hover { background: #f4f4f4; }
.EgBannerPrimario {
    background: var(--eg-green);
    color: #fff;
    box-shadow: 0 2px 6px rgba(53,203,131,0.25);
}
.EgBannerPrimario:hover { background: var(--eg-green-dark); }
.EgBannerPrimario:disabled { opacity: 0.6; cursor: wait; }

@media (max-width: 540px) {
    .EgBannerPWA {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 14px;
        bottom: 80px;
    }
    .EgBannerTexto { align-items: center; }
    .EgBannerBotones { width: 100%; justify-content: space-between; }
    .EgBannerSecundario, .EgBannerPrimario { flex: 1; }
}

/* ============ Accesibilidad: Skip link ============ */
.EgSkipLink {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 99999;
    padding: 10px 16px;
    background: var(--eg-green);
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    border-radius: 0 0 8px 8px;
    transition: top 0.18s var(--eg-ease);
}
.EgSkipLink:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: -3px;
}

/* Mejora contraste de iconos solo-visuales y respeta reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        transition-duration: 0.05s !important;
    }
}

/* Variante suave del banner de instalar: menos system-dialog,
   mas notificacion discreta. Reduce el patron que Chrome Safe Browsing
   asocia con "instala software" enganoso. */
.EgBannerPWA.EgBannerPWASuave {
    bottom: 16px;
    border-radius: 12px;
    border: 1px solid var(--eg-border);
    border-left: 4px solid var(--eg-green);
    background: #fff;
    /* Sombra mas suave para no parecer un dialogo modal */
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.EgBannerCerrar {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: 0;
    color: var(--eg-muted);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
}
.EgBannerCerrar:hover {
    background: rgba(0,0,0,0.05);
    color: var(--eg-text);
}
.EgBannerPWASuave .EgBannerIcono {
    background: transparent;
    color: var(--eg-green);
    width: 36px; height: 36px; flex: 0 0 36px;
    font-size: 18px;
}
.EgBannerPWASuave .EgBannerTexto strong {
    font-size: 13px;
}
.EgBannerPWASuave .EgBannerTexto span {
    font-size: 11px;
    color: var(--eg-muted);
}
.EgBannerPWASuave .EgBannerPrimario {
    background: var(--eg-green);
    padding: 7px 12px;
    font-size: 12px;
}
.EgBannerPWASuave .EgBannerSecundario {
    font-size: 12px;
    padding: 7px 10px;
}

/* ============ FAB "+" crear actividad ============ */
.FabCrearActividad {
    position: fixed;
    bottom: 80px; right: 20px;
    width: 56px; height: 56px;
    background: var(--eg-green);
    color: #fff !important;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(53,203,131,0.4), 0 2px 4px rgba(0,0,0,0.1);
    z-index: 150;
    transition: transform 0.15s var(--eg-ease), box-shadow 0.15s var(--eg-ease), background 0.12s;
}
.FabCrearActividad:hover {
    background: var(--eg-green-dark);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 18px rgba(53,203,131,0.5), 0 2px 6px rgba(0,0,0,0.12);
}
.FabCrearActividad:active { transform: translateY(0) scale(1); }
@media (min-width: 550px) {
    /* En desktop no hay footer mobile, bajamos el FAB */
    .FabCrearActividad { bottom: 24px; }
}

/* ============ Crear actividad: mapa interactivo ============ */
.CrearMapaWrapper {
    border: 1px solid var(--eg-border);
    border-radius: var(--eg-radius-md);
    overflow: hidden;
    background: #fafafa;
    isolation: isolate;
}
#CrearMapa {
    width: 100%;
    height: 280px;
    z-index: 0;
}
#CrearMapa .leaflet-control { z-index: 10 !important; }
#CrearMapa .leaflet-top, #CrearMapa .leaflet-bottom { z-index: 10 !important; }

.CrearMapaCoords {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border-top: 1px solid var(--eg-border);
    font-size: 12px;
    color: var(--eg-muted);
    font-family: monospace;
}
.BotonGeoActual {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: var(--eg-green-pale);
    color: var(--eg-ink);
    border: 1px solid var(--eg-green-light);
    border-radius: 16px;
    font-size: 12px; font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.12s;
}
.BotonGeoActual:hover { background: var(--eg-green-light); }
.BotonGeoActual:disabled { opacity: 0.6; cursor: wait; }
