/*
 * Small reusable UI components shared across templates (social icons,
 * buttons, cards). Layout-level rules stay in layout.css; this file is for
 * self-contained widgets that appear in more than one template.
 */

.social-icons {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0;
}

.social-icons__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgb(255 255 255 / 12%);
	color: inherit;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.8125rem;
	text-transform: uppercase;
	transition: background-color var(--transition-base), transform var(--transition-base);
}

.site-topbar .social-icons__link {
	width: 24px;
	height: 24px;
	font-size: 0.75rem;
}

.social-icons__link:hover,
.social-icons__link:focus-visible {
	background: var(--color-primary);
}

/* ---------------------------------------------------------------------
 * Advertisement slots (inc/advertisement.php)
 * ------------------------------------------------------------------ */

.ad-slot {
	margin-block: 1.5rem;
	text-align: center;
}

.ad-slot__label {
	display: block;
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-text-muted);
	margin-bottom: 0.35rem;
}

.ad-slot img {
	max-width: 100%;
	height: auto;
	margin-inline: auto;
}

/* ---------------------------------------------------------------------
 * Widgets (sidebar.php + footer.php) — previously had no styling at all,
 * relying entirely on browser defaults.
 * ------------------------------------------------------------------ */

.widget {
	margin-bottom: 2rem;
}

.widget:last-child {
	margin-bottom: 0;
}

/*
 * `.widget-title` is what register_sidebar()'s before_title/after_title
 * wraps classic-widget titles in. Native block-based widgets added straight
 * from the block-based Widgets screen (Latest Posts, Categories, Archives,
 * etc.) render their own heading instead, with core's generic
 * `.wp-block-heading` class — so both selectors get the same treatment here,
 * scoped to `.widget` so article-body headings are never affected.
 */
.widget-title,
.widget .wp-block-heading {
	font-size: 1.0625rem;
	font-weight: 800;
	margin: 0 0 1rem;
	padding-bottom: 0.6rem;
	position: relative;
}

.widget-title::after,
.widget .wp-block-heading::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 32px;
	height: 3px;
	border-radius: var(--radius-pill);
	background: var(--color-primary);
}

.widget ul {
	margin: 0;
	padding-inline-start: 1.1rem;
}

.widget li {
	margin-bottom: 0.5rem;
}

.sidebar .widget {
	background: var(--color-surface);
	border-radius: var(--radius);
	padding: 1.25rem 1.5rem;
}

.sidebar .widget input[type="text"],
.sidebar .widget input[type="search"] {
	width: 100%;
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-sm);
}

/* Core Latest Posts block, when its "Featured Image" option is on — kept
   consistent with the rest of the site's rounded card imagery instead of
   the sharp corners it ships with by default. */
.widget .wp-block-latest-posts__featured-image img {
	border-radius: var(--radius-sm);
}
