/* feed-columns.css  (OPTIONAL add-on: the 1 / 2 / 3 cards-per-row layout and its switch.)
   Independent from the card. Delete it together with feed-columns.js if you lay out your feed some other way. */

/* =====================================================================
   FEED LAYOUT (1 / 2 / 3 cards per row)
   JavaScript sets data-columns on .feed-wrapper to the number of columns that
   currently fit the screen. These rules only react to that attribute.
   To change the screen widths where 2 and 3 columns appear, edit
   COLUMN_MINIMUM_SCREEN_WIDTHS in the script (not here).
   ===================================================================== */
.feed-wrapper { margin: 0 auto; max-width: 720px; transition: max-width .2s; }          /* 1 column */
.feed-wrapper[data-columns="2"] { max-width: 1040px; }
.feed-wrapper[data-columns="3"] { max-width: 1400px; }
.feed { display: grid; gap: 16px; grid-template-columns: repeat(var(--columns, 1), minmax(0, 1fr)); }
.feed-wrapper[data-columns="2"] .feed { --columns: 2; }
.feed-wrapper[data-columns="3"] .feed { --columns: 3; }

/* thin bar above the feed: status text on the left, column switch on the right */
.feed-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: 12px; }
.feed-status-note { margin-right: auto; font-size: 13px; color: var(--post-card-text-secondary); }

/* the 1 / 2 / 3 column buttons */
.columns-per-row-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--post-card-background);
                          border: 1px solid var(--post-card-border); border-radius: 10px; }
.columns-per-row-switch button {
  all: unset; cursor: pointer; display: grid; place-items: center;
  width: 34px; height: 30px; border-radius: 7px; color: var(--post-card-text-muted);
}
.columns-per-row-switch button svg { width: 20px; height: 20px; }
.columns-per-row-switch button:hover { color: var(--post-card-text-secondary); }
.columns-per-row-switch button[aria-pressed="true"] { background: #a974f522; color: var(--post-card-accent); }
.columns-per-row-switch button:focus-visible { outline: 2px solid var(--post-card-accent); outline-offset: 1px; }
/* "all: unset" above would otherwise make the hidden attribute stop working */
.columns-per-row-switch [hidden], .columns-per-row-switch[hidden] { display: none !important; }
