/* =====================================================================
 * Forum Borealis — front page widgets, 2026-11-20
 *
 * Three blocks, all from the same instruction set:
 *
 *   1  the newsletter form's name fields share a row
 *   2  the follow widget renders Avada's icon row, not text links
 *   3  the site-wide recent comments strip
 *
 * Loaded after 26-global.css and 28-home-hero.css because the child
 * theme's enqueue globs css/*.css and sorts by filename, so the number
 * in the name IS the cascade position.
 * ===================================================================== */

/* ---- 1. newsletter: first and last name on one row ------------------
   Ricky 2026-11-20: "Put the first and last name fields in the newsletter
   widget on the same line, half width each."

   The Newsletter plugin emits one `.tnp-field` div per input with no row
   wrapper, so the row has to be made by the container. Grid rather than
   flex: the two name fields take one track each and every other field
   spans both, which keeps the email field, the privacy checkbox and the
   submit button full width without a rule per field.

   `input[type="hidden"]` generates no box (UA `display: none`), so the
   `nlang` input does not consume a grid cell. Verified in the rendered
   markup: the only children of the form are that hidden input and the
   five `.tnp-field` divs.
   -------------------------------------------------------------------- */

.fb-signup .tnp-subscription form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 14px;
	row-gap: 0;
	align-items: start;
}
.fb-signup .tnp-subscription form > .tnp-field-firstname { grid-column: 1; }
.fb-signup .tnp-subscription form > .tnp-field-surname   { grid-column: 2; }
/* Everything that is not a name spans the row. Listed by class rather than
   with a `:not()` chain so a field the plugin adds later defaults to full
   width instead of silently landing in a half-width cell. */
.fb-signup .tnp-subscription form > .tnp-field-email,
.fb-signup .tnp-subscription form > .tnp-field-middlename,
.fb-signup .tnp-subscription form > .tnp-privacy-field,
.fb-signup .tnp-subscription form > .tnp-field-privacy,
.fb-signup .tnp-subscription form > .tnp-field-lists,
.fb-signup .tnp-subscription form > .tnp-field-button {
	grid-column: 1 / -1;
}
/* The plugin's own `.tnp-field` margin is what separates the rows; with
   row-gap at 0 the two name fields align with each other exactly. */
.fb-signup .tnp-subscription form > .tnp-field { margin-bottom: 14px; }
.fb-signup .tnp-subscription form > .tnp-field-button { margin-bottom: 0; }
.fb-signup .tnp-subscription form input[type="text"],
.fb-signup .tnp-subscription form input[type="email"] {
	width: 100%;
	box-sizing: border-box;
}

/* A 32rem form split in two leaves each name field around 15rem, which is
   enough; below 520px two fields in a 16rem column are not, so they stack. */
@media (max-width: 520px) {
	.fb-signup .tnp-subscription form {
		grid-template-columns: minmax(0, 1fr);
	}
	.fb-signup .tnp-subscription form > .tnp-field-firstname,
	.fb-signup .tnp-subscription form > .tnp-field-surname {
		grid-column: 1;
	}
}

/* ---- 2. follow widget: Avada's own icons ---------------------------
   Ricky 2026-11-20: "Make the social links widget beside the newsletter
   widget on the front page use icons, like the footer icons, these are
   supplied by Avada."

   [fb_social_links] now calls the same renderer footer-social-icons.php
   calls, so the markup is Avada's own. The footer's WRAPPER class is
   deliberately not applied: `.fusion-social-links-footer` is what Avada's
   footer-specific CSS keys on, and it is sized for a footer bar. Measured
   with it on, the row was 189px wide inside a 472px column, right-aligned
   and wrapped onto two lines, with the custom-image icons capped at
   `max-height: var(--footer_social_links_font_size)` = 16px and their
   anchors at `--footer_social_links_boxed_padding` = 8px. Everything below
   is this widget's own sizing.
   -------------------------------------------------------------------- */

.fb-social-links-icons {
	display: block;
	margin-top: 4px;
}
/* Avada's footer row is a table cell in a right-aligned header/footer bar:
   `.fusion-social-networks { display: table-cell; max-width: 50%;
   text-align: right }` and `.fusion-social-networks-wrapper {
   justify-content: flex-end; margin: 0 -5px }`. Measured in the home
   widget that shrank the row to 209px of a 520px column and pushed it to
   the right edge, wrapping eleven icons onto two lines. Reset to a
   left-aligned full-width block; borrowing the footer's styling for size
   and colour does not mean borrowing its layout. */
.fb-social-links-icons .fusion-social-networks {
	display: block !important;
	max-width: none !important;
	width: 100%;
	text-align: left !important;
	vertical-align: baseline !important;
}
.fb-social-links-icons .fusion-social-networks-wrapper {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start !important;
	gap: 14px;
	margin: 0 !important;
}
.fb-social-links-icons .fusion-social-network-icon {
	font-size: 22px !important;      /* Avada's footer dynamic CSS sets this */
	line-height: 1 !important;
	margin: 0 !important;
	color: var(--awb-color2) !important;
	opacity: .9;
	transition: opacity .15s ease, color .15s ease, transform .15s ease;
}
.fb-social-links-icons .fusion-social-network-icon:hover,
.fb-social-links-icons .fusion-social-network-icon:focus-visible {
	color: var(--awb-color5) !important;
	opacity: 1;
	transform: translateY(-1px);
}
/* Four of the eleven entries are uploaded PNGs rather than icon-font
   glyphs (Rumble, Odysee, BitChute, Substack). Avada sizes those inline
   with `width:auto`, which on a 128px source would render 128px wide next
   to a 22px glyph. */
.fb-social-links-icons .fusion-social-network-icon img {
	width: 22px !important;
	height: 22px !important;
	max-width: none !important;
	max-height: none !important;   /* measured: capped at 16px otherwise */
	display: block;
	object-fit: contain;
}
@media (prefers-reduced-motion: reduce) {
	.fb-social-links-icons .fusion-social-network-icon { transition: none; }
	.fb-social-links-icons .fusion-social-network-icon:hover { transform: none; }
}

/* ---- 3. the site-wide recent comments strip ------------------------
   Ricky 2026-11-20, picking from the four options proposed: "Make the
   site-wide recent comments strip."

   A strip, not a column: on a desktop the items sit side by side so the
   block stays one band tall, which is the whole reason it is allowed on a
   front page Al wants short. `auto-fit` rather than a fixed count because
   the shortcode renders however many comments exist -- with two it must
   not leave two empty cells.
   -------------------------------------------------------------------- */

.fb-recent-comments { margin: 0 0 56px; }
.fb-recent-comments .fb-section-head { margin-bottom: 18px; }

.fb-rc-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.fb-rc-item { margin: 0; }
.fb-rc-link {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	gap: 12px;
	height: 100%;
	padding: 16px 18px;
	border: 1px solid var(--awb-color3);
	border-radius: var(--fb-radius);
	background: var(--awb-color7);
	text-decoration: none !important;
	transition: border-color .15s ease, transform .15s ease;
}
.fb-rc-link:hover,
.fb-rc-link:focus-visible {
	border-color: var(--awb-color5);
	transform: translateY(-2px);
}
.fb-rc-avatar { border-radius: var(--fb-radius-pill); display: block; }
.fb-rc-body { display: block; min-width: 0; }
.fb-rc-head { display: block; margin-bottom: 5px; font-size: .78rem; color: var(--awb-color6); }
.fb-rc-author { font-weight: 600; color: var(--fb-text); }
.fb-rc-head .fb-dot { margin: 0 .5em; opacity: .6; }
.fb-rc-text {
	display: block;
	margin-bottom: 8px;
	font-size: .92rem;
	line-height: 1.55;
	color: var(--fb-text);
}
.fb-rc-on {
	display: block;
	font-size: .78rem;
	color: var(--awb-color6);
}
.fb-rc-post { color: var(--awb-color5); }
.fb-rc-link:hover .fb-rc-post { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
	.fb-rc-link { transition: none; }
	.fb-rc-link:hover { transform: none; }
}
@media (max-width: 900px) {
	.fb-recent-comments { margin-bottom: 40px; }
	.fb-rc-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
