/**
 * Gym detail pages — desktop Reddit-style layout (≥1024px only).
 * Mobile / tablet (<1024px) keep the original stacked + side-sheet chat behavior.
 */

.gf-detail-page {
    --gf-bg: #0b0f1a;
    --gf-surface: rgba(17, 24, 39, 0.92);
    --gf-border: rgba(59, 130, 246, 0.25);
    --gf-neon: #00bfff;
    --gf-text: #f1f5f9;
}

/* Sidebar back link — hidden on mobile (sticky header link is used instead) */
.gf-detail-sidebar .gf-detail-back--desktop {
    display: none;
}

.gf-detail-layout {
    display: block;
}

/* Below desktop breakpoint: preserve centered narrow gym card */
.gf-detail-sidebar .gf-card {
    border-radius: 1.25rem;
    padding: 1.5rem;
}

@media (max-width: 1023px) {
    .gf-detail-sidebar {
        max-width: 32rem;
        margin: 0 auto;
        padding: 0 1rem;
    }
}

/* Desktop ≥1024px — left info rail + wide discussion */
@media (min-width: 1024px) {
    .gf-detail-header--mobile {
        display: none;
    }

    .gf-detail-sidebar .gf-detail-back--desktop {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
        color: var(--gf-neon, #00bfff);
        font-size: 0.8125rem;
        font-weight: 700;
        text-decoration: none;
    }

    .gf-detail-sidebar .gf-detail-back--desktop:hover {
        text-decoration: underline;
    }

    .gf-detail-layout {
        display: flex;
        align-items: stretch;
        gap: 1.5rem;
        max-width: min(1680px, 96vw);
        margin: 0 auto;
        padding: 1.25rem 1.5rem 2rem;
        box-sizing: border-box;
        min-height: calc(100vh - 1rem);
    }

    .gf-detail-sidebar {
        flex: 0 0 30%;
        max-width: 30%;
        min-width: 17.5rem;
        padding: 0;
    }

    .gf-detail-sidebar .gf-card {
        position: sticky;
        top: 1.25rem;
    }

    .gf-detail-discussion,
    #chat-container.gf-detail-discussion {
        flex: 1 1 70%;
        min-width: 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
        align-self: stretch;
        overflow: hidden;
    }

    .gf-detail-discussion > .gf-chat-root {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
    }
}
