﻿/* ============================================================
   LOBBY69 — MOBILE RESPONSIVE (limpio)
   Breakpoints: 767px (tablet/phone)
   ============================================================ */

/* ══ LANDING ══ */
@media (max-width: 767px) {
    .lp-hero { min-height: 100svh; }
    .lp-hero__content { padding: 5rem 1.25rem 2rem; }
    .lp-hero__title { font-size: clamp(1.8rem, 8vw, 2.8rem) !important; }
    .lp-hero__sub { font-size: .9rem; }
    .lp-hero__badges { flex-wrap: wrap; gap: .4rem; justify-content: center; }
    .lp-hero__cta { flex-direction: column; align-items: stretch; }
    .lp-hero__cta a, .lp-hero__cta button { width: 100%; text-align: center; justify-content: center; }
    .lp-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; padding: 1.5rem 1rem !important; }
    .lp-features__grid, .lp-steps__grid, .lp-plans__grid, .lp-testimonials { grid-template-columns: 1fr !important; }
    .lp-section { padding: 3rem 1.25rem !important; }
    .lp-section__title { font-size: clamp(1.5rem, 6vw, 2rem) !important; }
}

/* ══ FORMULARIO INVITACIÓN ══ */
@media (max-width: 767px) {
    .auth-section { padding: 1rem .75rem !important; align-items: flex-start !important; }
    .auth-card { padding: 1.5rem 1.25rem !important; }
    .auth-card__header img { height: 40px !important; }
    .invitation-profile-types { flex-direction: column !important; }
    .form-control, select.form-control { font-size: 16px !important; }
}

/* ══ LAYOUT PRINCIPAL ══ */
@media (max-width: 767px) {
    body { padding-bottom: var(--bottom-nav-h, 62px) !important; }
    .l69-layout {
        grid-template-columns: 1fr !important;
        padding: .75rem !important;
        gap: .75rem !important;
    }
    .l69-sidebar.l69-sidebar--left {
        display: none !important;
        position: static !important;
        max-height: none !important;
        overflow-y: visible !important;
        width: 100% !important;
    }
    .l69-sidebar.l69-sidebar--right { display: none !important; }
    .l69-layout__content {
        width: 100% !important;
        min-width: 0 !important;
        padding-bottom: 80px !important;
    }
    .card, .l69-card { border-radius: 12px !important; padding: 1rem !important; }
    .toast {
        top: auto !important;
        bottom: calc(var(--bottom-nav-h, 62px) + 1rem) !important;
        right: .75rem !important;
        left: .75rem !important;
        max-width: 100% !important;
    }
    table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ══ DASHBOARD FEED ══ */
@media (max-width: 767px) {
    .l69-feed-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: .6rem !important;
        padding-bottom: 80px !important;
    }
    .l69-feed-tabs { gap: .35rem !important; margin-bottom: 1rem !important; }
    .l69-quick-btn { font-size: .8rem !important; padding: .45rem .9rem !important; }
    .l69-feed-card { border-radius: 10px; overflow: hidden; }
    .l69-feed-card__img { width: 100%; height: 100%; object-fit: cover; }
    .l69-feed-card__owner-top span {
        font-size: .7rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .l69-feed-card__overlay { opacity: 1 !important; }
    .l69-stories { overflow-x: auto; padding-bottom: .5rem; }
    .l69-stories::-webkit-scrollbar { display: none; }
}

/* ══ EXPLORAR ══ */
@media (max-width: 767px) {
    .exp-select, .exp-input { width: 100%; font-size: .85rem; padding: .45rem .6rem; }
    .exp-btn-filter, .exp-btn-reset { flex: 1 1 100%; text-align: center; padding: .55rem; font-size: .85rem; }
    .exp-count { font-size: .8rem; padding: .5rem .75rem; }
}

/* ══ PERFIL INDIVIDUAL ══ */
@media (max-width: 767px) {
    .l69-sidebar-card { border-radius: 12px; padding: .75rem; margin-bottom: .75rem; }
    .l69-sidebar--left .l69-sidebar-card + .l69-sidebar-card { display: none !important; }
    .l69-stat-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: .4rem !important;
        text-align: center;
    }
    .l69-stat__value { font-size: 1.1rem !important; font-weight: 800 !important; }
    .l69-stat__label { font-size: .65rem !important; }
    .profile-hero { min-height: 220px !important; }
    .profile-tabs {
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .profile-tabs::-webkit-scrollbar { display: none; }
    .profile-tab { display: inline-flex !important; }
    .profile-photos-grid { grid-template-columns: repeat(3, 1fr) !important; gap: .35rem !important; }
}

/* ══ FOTOS ══ */
@media (max-width: 767px) {
    .photos-grid { grid-template-columns: repeat(3, 1fr) !important; gap: .35rem !important; }
    .photos-upload-btn { width: 100% !important; }
}

/* ══ NOTIFICACIONES ══ */
@media (max-width: 767px) {
    .notif-list { padding: 0 !important; }
    .notif-item { padding: .85rem 1rem !important; border-radius: 0 !important; }
    .notif-filters { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
    .notif-filters::-webkit-scrollbar { display: none; }
}

/* ══ ADMIN PANEL ══ */
@media (max-width: 767px) {
    .admin-table-wrap { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
    .admin-table { min-width: 600px; }
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ══ CHAT MENSAJES ══ */
@media (max-width: 767px) {
    .ch-wrap {
        bottom: var(--bottom-nav-h, 62px) !important;
        height: calc(100vh - var(--nav-h, 64px) - var(--bottom-nav-h, 62px)) !important;
    }
}

/* ══ MODALES ══ */
@media (max-width: 767px) {
    .modal {
        border-radius: 16px 16px 0 0 !important;
        max-height: 92vh !important;
        margin: auto auto 0 !important;
        max-width: 100% !important;
    }
    .modal-overlay { align-items: flex-end !important; padding: 0 !important; }
}

/* ══ SAFE AREA (iPhone notch / Dynamic Island) ══ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body { padding-bottom: calc(var(--bottom-nav-h, 62px) + env(safe-area-inset-bottom)) !important; }
    .l69-bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
}
/* ══ EXPLORAR — ocultar sidebars en mobile ══ */
@media (max-width: 767px) {
    .page-explorar .l69-sidebar.l69-sidebar--left,
    .page-explorar .l69-sidebar.l69-sidebar--right {
        display: none !important;
    }
    .page-explorar .l69-layout {
        padding: .5rem !important;
    }
}
/* ══ EXPLORAR — filtros en grid 2 columnas mobile ══ */
@media (max-width: 767px) {
    .exp-filters {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: .6rem !important;
        padding: .75rem !important;
        background: var(--theme-surface, #fff);
        border-radius: 12px;
        margin-bottom: .75rem;
    }
    .exp-filter-group {
        display: flex !important;
        flex-direction: column;
        gap: .25rem;
        min-width: 0 !important;
    }
    .exp-filter-group label {
        font-size: .7rem !important;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--theme-muted);
        margin: 0;
    }
    .exp-select, .exp-input {
        width: 100% !important;
        font-size: .85rem !important;
        padding: .4rem .5rem !important;
        border-radius: 8px;
    }
    /* Ciudad ocupa las 2 columnas */
    .exp-filter-group:nth-child(3) {
        grid-column: 1 / -1;
    }
    /* Botones en fila al final */
    .exp-btn-filter {
        grid-column: 1 / -1;
        width: 100% !important;
        padding: .6rem !important;
        font-size: .9rem !important;
        border-radius: 10px;
        justify-content: center;
    }
    .exp-btn-reset {
        grid-column: 1 / -1;
        width: 100% !important;
        text-align: center !important;
        padding: .5rem !important;
        font-size: .85rem !important;
        border-radius: 10px;
    }
    /* Grid de perfiles */
    .exp-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: .6rem !important;
        padding-bottom: 80px !important;
    }
}
/* ══ DASHBOARD: ocultar sidebar izquierdo en mobile (contenido no util) ══ */
@media (max-width: 767px) {
    .l69-layout .l69-sidebar.l69-sidebar--left {
        display: none !important;
    }
}
