/*
 * HyflipPlay 2.5.1 — forum spacing hotfix.
 * Adds breathing room to forum indexes, listings, topics and forms without
 * changing the navbar, hero, store, games page or module code.
 */

/* Breadcrumbs should not feel attached to the hero or the page title. */
body.hyflip-theme .hyflip-page-container > .ui.breadcrumb {
    margin: 0 .75rem 1.45rem !important;
}

/* Give the forum title/search row a consistent inner gutter and separation. */
.hy-forum-toolbar.ui.grid {
    margin: 0 0 1.55rem !important;
    padding: 0 .75rem !important;
}

.hy-forum-toolbar > .row {
    margin: 0 !important;
}

.hy-forum-toolbar > .row > .column {
    padding-left: .75rem !important;
    padding-right: .75rem !important;
}

/* Stop the negative grid margin from making the cards look glued to the edge. */
.hy-forum-content-grid.ui.grid {
    margin: 0 !important;
    padding: .2rem .75rem 1.8rem !important;
}

.hy-forum-content-grid > .row {
    margin: 0 !important;
    padding: 0 !important;
}

.hy-forum-content-grid > .row > .column {
    padding-left: .75rem !important;
    padding-right: .75rem !important;
    padding-bottom: 1rem !important;
}

.hy-forum-category-card.ui.segment {
    margin-bottom: 1.7rem !important;
}

/* Forum listings and pagination receive the same visual rhythm. */
.hy-forum-table.ui.table {
    margin-bottom: 1.55rem !important;
}

.hy-forum-toolbar + .ui.pagination.menu,
.hy-forum-toolbar + nav,
.hy-forum-toolbar + .pagination {
    margin: 0 .75rem 1.35rem !important;
}

/* Topic pages: keep headers, actions, posts and editor away from the edges. */
.hy-topic-heading.ui.header,
.hy-topic-card.ui.segments,
body.hyflip-theme #topic-reply,
body.hyflip-theme #new-topic,
body.hyflip-theme #post-edit,
body.hyflip-theme #forum-search,
body.hyflip-theme #forum-search-result.ui.segments {
    margin-left: .75rem !important;
    margin-right: .75rem !important;
}

.hy-topic-actions {
    margin-right: .75rem !important;
}

/* A little more breathing room before the footer on forum screens. */
.hy-forum-content-grid + * {
    scroll-margin-top: 1rem;
}

@media (max-width: 991px) {
    .hy-forum-toolbar.ui.grid,
    .hy-forum-content-grid.ui.grid {
        padding-left: .5rem !important;
        padding-right: .5rem !important;
    }

    .hy-forum-toolbar > .row > .column,
    .hy-forum-content-grid > .row > .column {
        padding-left: .55rem !important;
        padding-right: .55rem !important;
    }
}

@media (max-width: 767px) {
    body.hyflip-theme .hyflip-page-container > .ui.breadcrumb {
        margin: 0 .2rem 1.15rem !important;
    }

    .hy-forum-toolbar.ui.grid {
        margin-bottom: 1.15rem !important;
        padding: 0 .15rem !important;
    }

    .hy-forum-content-grid.ui.grid {
        padding: .1rem .15rem 1.35rem !important;
    }

    .hy-forum-toolbar > .row > .column,
    .hy-forum-content-grid > .row > .column,
    .hy-forum-sidebar {
        padding-left: .35rem !important;
        padding-right: .35rem !important;
    }

    .hy-forum-category-card.ui.segment {
        margin-bottom: 1.25rem !important;
    }

    .hy-topic-heading.ui.header,
    .hy-topic-card.ui.segments,
    body.hyflip-theme #topic-reply,
    body.hyflip-theme #new-topic,
    body.hyflip-theme #post-edit,
    body.hyflip-theme #forum-search,
    body.hyflip-theme #forum-search-result.ui.segments {
        margin-left: .2rem !important;
        margin-right: .2rem !important;
    }

    .hy-topic-actions {
        margin-right: .2rem !important;
    }
}
