/* -----------------------------------------------------------------
 * Facebook module: teaser card + live feed frame
 *
 *   [spartan_facebook_teaser]  compact "Follow us" card (no embed)
 *   [spartan_facebook_feed]    Smash Balloon free feed (text-only
 *                              posts) in a theme frame; falls back to
 *                              the teaser until a Page is connected.
 *
 * See the shortcode docblocks in inc/company-info.php.
 *
 * Teaser visual: bone-tinted rounded card with a small square icon
 * tile on the left, heading + deck copy stacked to the right, and a
 * solid gold "Open Facebook" CTA underneath. Mobile collapses to a
 * single column with the icon tile above the heading.
 * ---------------------------------------------------------------- */

.tx-fb-teaser {
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: 20px 20px;
	align-items: flex-start;
	background-color: var(--bone);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	padding: 22px 24px;
	margin: 32px 0;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.tx-fb-teaser__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background-color: var(--brand-primary);
	color: var(--ink);
}

.tx-fb-teaser__icon svg {
	width: 26px;
	height: 26px;
}

.tx-fb-teaser__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tx-fb-teaser__heading {
	margin: 0;
	font-size: clamp(1.15rem, 1.8vw, 1.35rem);
	font-weight: 700;
	color: var(--ink);
}

.tx-fb-teaser__deck {
	margin: 0;
	color: var(--ink-muted);
	line-height: 1.55;
}

.tx-fb-teaser__cta {
	margin: 6px 0 0;
}

@media (max-width: 599px) {
	.tx-fb-teaser {
		grid-template-columns: 1fr;
		text-align: left;
	}
}

/* ---------- Live feed frame ([spartan_facebook_feed]) ----------
   The plugin renders `#cff` with `.cff-item` children. We only
   frame it and align type/links with the theme; layout stays with
   the plugin so its customizer settings keep working. */

.tx-fb-feed {
	margin: 40px 0;
	padding-top: 24px;
	border-top: 1px solid var(--rule-light, rgba(0, 0, 0, 0.08));
}

.tx-fb-feed__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 24px;
	margin-bottom: 20px;
}

.tx-fb-feed__heading {
	margin: 0;
}

.tx-fb-feed__deck {
	margin: 6px 0 0;
	color: var(--ink-muted);
}

.tx-fb-feed__all {
	flex: 0 0 auto;
}

/* Editor-only diagnostic printed by the plugin when a feed exists but
   has no connected Page; visitors never see this. */
.tx-fb-feed__notice {
	margin: 0 0 12px;
	padding: 12px 16px;
	border-left: 4px solid var(--gold-2, #a88320);
	background-color: var(--bone);
	font-size: 0.95rem;
}

.tx-fb-feed__body #cff,
.tx-fb-feed__body #cff * {
	font-family: inherit;
}

.tx-fb-feed__body #cff .cff-item {
	background-color: var(--bone);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	padding: 20px 22px;
	margin-bottom: 16px;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.tx-fb-feed__body #cff .cff-item p,
.tx-fb-feed__body #cff .cff-post-text {
	color: var(--ink-muted);
	line-height: 1.55;
}

/* Author + date row: theme ink for the page name, muted date. */
.tx-fb-feed__body #cff .cff-page-name,
.tx-fb-feed__body #cff .cff-page-name a {
	color: var(--ink);
	text-decoration: none;
}

.tx-fb-feed__body #cff .cff-date {
	color: var(--text-muted, #5a5a60);
}

/* In-post links, hashtags and the "View on Facebook" link follow the
   site-wide plum link colour so nothing here reads as a button. */
.tx-fb-feed__body #cff a:not(.cff-page-name a):not(.tx-btn) {
	color: var(--link);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.tx-fb-feed__body #cff a:hover,
.tx-fb-feed__body #cff a:focus-visible {
	color: var(--link-hover);
}

/* Shared-link preview cards (free tier keeps the link, drops the
   thumbnail) sit on white inside the bone card. */
.tx-fb-feed__body #cff .cff-shared-link {
	background-color: var(--surface-content, #fff);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 10px;
}

/* Pro-only "Load more" is an <a href="#"> rather than a <button>;
   keep it out of the tab order if Pro is ever installed. The heading
   link above already covers "see more". */
.tx-fb-feed__body #cff .cff-load-more,
.tx-fb-feed__body .cff-load-more {
	display: none !important;
}
