/**
 * GC Theme — Single Post Sidebar Layout
 *
 * Sticky sidebar for single news/guide articles.
 *
 * Sticky strategy (proven pattern from pre-modular CSS):
 *   - .gc-single-sidebar    → flex column parent
 *   - .gc-sidebar-inner     → display: contents (transparent wrapper)
 *   - .gc-toc-widget        → IS the sticky element (sticks at top: 115px)
 *
 * The display: contents trick makes the wrapper "disappear"
 * from layout, so its children become direct flex children
 * of .gc-single-sidebar — and sticky works naturally.
 *
 * @package GC_Theme
 */


/* ═══════════════════════════════════════════════════════
 * DESKTOP — 2-column grid (default)
 * ═══════════════════════════════════════════════════════ */

.container .gc-single-wrap,
.gc-single-wrap {
    display: grid !important;
    grid-template-columns: 1fr 300px !important;
    align-items: start !important;
    padding: 32px 0 48px !important;
}

.gc-single-content {
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    padding-right: 30px !important;
}

.gc-single-sidebar {
    display: flex !important;
    flex-direction: column !important;
    align-self: flex-start;
}

/* Wrapper becomes transparent — children flow into sidebar flex */
.gc-sidebar-inner {
    display: contents !important;
}

/* Spacing between sidebar widgets (replaces flex gap since
   display: contents drops the wrapper from layout) */
.gc-sidebar-inner > * {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

.gc-sidebar-inner > *:last-child {
    margin-bottom: 0 !important;
}


/* ═══════════════════════════════════════════════════════
 * MOBILE — single column, sidebar hidden
 * ═══════════════════════════════════════════════════════ */

@media (max-width: 900px) {

    .container .gc-single-wrap,
    .gc-single-wrap {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        padding: 20px 0 32px !important;
    }

    .gc-single-content {
        padding-right: 0 !important;
    }

    .gc-single-sidebar {
        display: none !important;
    }
}


/* ═══════════════════════════════════════════════════════
 * MOBILE — Inline "Mentioned" widget visible only on mobile
 * ═══════════════════════════════════════════════════════ */

.gc-iaw-mobile {
    display: none;
}

@media (max-width: 900px) {
    .gc-iaw-mobile {
        display: block !important;
        margin-bottom: 24px;
    }
}