/**
 * Front end styles for products, disclosure and the dress code table.
 *
 * Matches design handoff 4a: light ground, steel blue as line and accent
 * rather than fill, outlined buttons, 8px radii, hairline card shadows.
 * Scoped to bdg- classes so the plugin never fights the theme, but the token
 * values mirror the theme's so the two read as one system.
 *
 * The design commits to a single light interface, so there is no dark variant
 * here by choice rather than omission.
 */

.bdg-product,
.bdg-disclosure,
.bdg-dresscode-wrap,
.bdg-dresscode-rules,
.bdg-product-grid {
	--bdg-ink: #111827;
	--bdg-slate: #4b5563;
	--bdg-muted: #6b7280;
	--bdg-faint: #9ca3af;
	--bdg-rule: #e5e7eb;
	--bdg-rule-soft: #d1d5db;
	--bdg-paper: #ffffff;
	--bdg-panel: #f7f8fa;
	--bdg-steel: #4682b4;
	--bdg-steel-deep: #3a6f99;
	--bdg-steel-ink: #2f5878;
	--bdg-steel-light: #8fb8da;
	--bdg-mist: #dbe9f6;
	--bdg-mist-pale: #eff5fb;
	--bdg-radius: 8px;
	--bdg-shadow: 0 0 0 1px var(--bdg-rule), 0 1px 3px rgba(17, 24, 39, 0.06);
}

/* --- disclosure ---------------------------------------------------------- */

.bdg-disclosure {
	font-size: 13px;
	line-height: 1.6;
	color: var(--bdg-slate);
	background: var(--bdg-mist-pale);
	border: 0;
	border-left: 2px solid var(--bdg-steel);
	border-radius: 0 var(--bdg-radius) var(--bdg-radius) 0;
	padding: 11px 14px;
	margin: 0 0 24px;
}

.bdg-disclosure a {
	color: var(--bdg-steel-deep);
	text-underline-offset: 3px;
}

.bdg-disclosure a:hover {
	color: var(--bdg-ink);
}

/* --- picks panel ---------------------------------------------------------
   Sits above the prose so a reader can decide without scrolling. This is the
   highest-converting element on a buying guide.
   ------------------------------------------------------------------------- */

.bdg-picks {
	--bdg-ink: #111827;
	--bdg-slate: #4b5563;
	--bdg-muted: #6b7280;
	--bdg-rule: #e5e7eb;
	--bdg-paper: #ffffff;
	--bdg-steel: #4682b4;
	--bdg-steel-deep: #3a6f99;
	--bdg-steel-ink: #2f5878;
	--bdg-mist: #dbe9f6;
	--bdg-mist-pale: #eff5fb;
	--bdg-radius: 8px;

	background: var(--bdg-mist-pale);
	border-radius: var(--bdg-radius);
	padding: 17px 20px 14px;
	margin: 0 0 32px;
}

/* Stated with the container class so `.wp-block-post-content h2` cannot win
   on specificity and render this as a 22px prose heading. */
.bdg-picks .bdg-picks-title,
.bdg-picks-title {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bdg-steel-deep);
	margin: 0 0 11px;
	line-height: 1.2;
}

.bdg-picks-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: none;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.bdg-pick {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 11px 0;
	border-bottom: 1px solid rgba(70, 130, 180, 0.22);
	margin: 0;
	flex-wrap: wrap;
}

.bdg-pick:last-child {
	border-bottom: none;
}

.bdg-pick-main {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 12rem;
	flex: 1;
}

.bdg-pick-label {
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bdg-steel-ink);
}

.bdg-pick-name {
	font-size: 15px;
	font-weight: 500;
	color: var(--bdg-ink);
	text-decoration: none;
	line-height: 1.3;
}

.bdg-pick-name:hover {
	color: var(--bdg-steel-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bdg-pick-meta {
	font-size: 12px;
	color: var(--bdg-muted);
	font-variant-numeric: tabular-nums;
}

.bdg-picks-foot {
	font-size: 12px;
	line-height: 1.55;
	color: var(--bdg-muted);
	margin: 11px 0 0;
	max-width: none;
}

/* --- product card --------------------------------------------------------
   Two columns on desktop: media left, everything else right. A guide is
   scanned before it is read, so the image, the "best for" label and the CTA
   all need to be reachable without parsing a paragraph.
   ------------------------------------------------------------------------- */

.bdg-product {
	display: grid;
	grid-template-columns: 168px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
	background: var(--bdg-paper);
	border: 0;
	border-radius: var(--bdg-radius);
	box-shadow: var(--bdg-shadow);
	padding: 18px;
	margin: 24px 0;
	color: var(--bdg-ink);
	scroll-margin-top: 24px;
}

.bdg-product-media {
	display: block;
}

.bdg-product-img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 168px;
	object-fit: cover;
	border-radius: 6px;
	background: var(--bdg-mist-pale);
}

.bdg-product-img-empty {
	display: grid;
	place-items: center;
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bdg-steel-deep);
	position: relative;
}

.bdg-product-img-empty::before {
	content: "";
	position: absolute;
	top: 12px;
	left: 12px;
	width: 22px;
	height: 3px;
	border-radius: 2px;
	background: var(--bdg-steel);
}

.bdg-product-body {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
}

/* Eyebrow: who it suits, plus the brand, on one line above the name. */
.bdg-eyebrow {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: wrap;
	margin: 0;
	max-width: none;
}

.bdg-best-for {
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bdg-steel-ink);
	background: var(--bdg-mist);
	padding: 3px 10px;
	border-radius: 6px;
}

/* --- spec row --- */

.bdg-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: none;
}

.bdg-spec {
	font-size: 11px;
	font-weight: 500;
	color: var(--bdg-slate);
	background: #f3f4f6;
	border-radius: 5px;
	padding: 3px 9px;
	margin: 0;
	font-variant-numeric: tabular-nums;
}

.bdg-spec.is-ok {
	color: #1f6f4a;
	background: #e7f4ed;
}

.bdg-spec.is-check {
	color: #8a5a18;
	background: #fbf1e2;
}

.bdg-cta-note {
	font-size: 11.5px;
	line-height: 1.5;
	color: var(--bdg-muted);
	margin: 2px 0 0;
	max-width: none;
}

@media (max-width: 640px) {
	.bdg-product {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.bdg-product-img {
		height: 190px;
	}

	.bdg-pick {
		align-items: flex-start;
	}
}

/* Dress-code badge reads as a tag, not a banner. */
.bdg-badge {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: none;
	color: var(--bdg-steel-ink);
	background: var(--bdg-mist);
	padding: 3px 10px;
	border-radius: 6px;
	margin: 0;
}

.bdg-brand {
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bdg-muted);
	margin: 0;
}

.bdg-product .bdg-name,
.bdg-name {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.015em;
	margin: 0;
	text-wrap: balance;
	color: var(--bdg-ink);
}

.bdg-tier {
	font-size: 12px;
	font-weight: 500;
	color: var(--bdg-muted);
	font-variant-numeric: tabular-nums;
	margin: 0;
}

.bdg-note,
.bdg-sizing {
	font-size: 13px;
	line-height: 1.6;
	color: var(--bdg-slate);
	margin: 0;
}

.bdg-note-label,
.bdg-sizing-label {
	display: inline-block;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bdg-steel-deep);
	margin-right: 0.4em;
}

/* Sizing sits on a tinted strip: it is the most useful line on the card. */
.bdg-sizing {
	background: var(--bdg-mist-pale);
	border-radius: 6px;
	padding: 9px 11px;
}

/* --- call to action ------------------------------------------------------
   The one filled button on the site. Everything else is outlined, but this is
   the conversion action and needs to read as primary at a glance. Steel-deep
   on white clears 4.5:1, which the lighter steel would not.
   ------------------------------------------------------------------------- */

.bdg-cta {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	padding: 10px 18px;
	border: 1px solid var(--bdg-steel-deep);
	border-radius: var(--bdg-radius);
	background: var(--bdg-steel-deep);
	color: #ffffff;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.bdg-cta:hover {
	background: var(--bdg-steel-ink);
	border-color: var(--bdg-steel-ink);
	color: #ffffff;
}

.bdg-cta:active {
	background: #274a66;
	border-color: #274a66;
}

/* Compact variant for the picks panel, where several sit in a row. */
.bdg-cta-sm {
	margin-top: 0;
	padding: 7px 14px;
	font-size: 13px;
	white-space: nowrap;
}

.bdg-cta:focus-visible {
	outline: 2px solid var(--bdg-steel);
	outline-offset: 2px;
}

.bdg-missing {
	font-size: 13px;
	color: #b45309;
	margin: 0;
}

/* --- grid ---------------------------------------------------------------- */

.bdg-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 11px;
	margin: 24px 0;
}

.bdg-product-grid .bdg-product {
	margin: 0;
}

/* --- dress code table ---------------------------------------------------- */

.bdg-dresscode-wrap {
	overflow-x: auto;
	background: var(--bdg-paper);
	border: 0;
	border-radius: var(--bdg-radius);
	box-shadow: var(--bdg-shadow);
	margin: 24px 0;
}

.bdg-dresscode {
	width: 100%;
	min-width: 34rem;
	border-collapse: collapse;
	background: transparent;
	color: var(--bdg-ink);
	font-size: 13px;
}

.bdg-dresscode th,
.bdg-dresscode td {
	text-align: left;
	vertical-align: top;
	padding: 11px 14px;
	border-bottom: 1px solid var(--bdg-rule);
	line-height: 1.6;
}

.bdg-dresscode thead th {
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bdg-steel-deep);
	background: var(--bdg-mist-pale);
	white-space: nowrap;
}

.bdg-dresscode tbody tr:last-child th,
.bdg-dresscode tbody tr:last-child td {
	border-bottom: none;
}

.bdg-dresscode tbody th {
	font-weight: 500;
	color: var(--bdg-ink);
	white-space: nowrap;
}

.bdg-dresscode-note {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: var(--bdg-muted);
}

.bdg-dresscode-rules {
	font-size: 13px;
	line-height: 1.65;
	color: var(--bdg-slate);
	background: var(--bdg-mist-pale);
	border-left: 2px solid var(--bdg-steel);
	border-radius: 0 var(--bdg-radius) var(--bdg-radius) 0;
	padding: 11px 14px;
	margin: 24px 0;
}

@media (prefers-reduced-motion: reduce) {
	.bdg-cta {
		transition: none;
	}
}

/* --- breadcrumbs ---------------------------------------------------------
   Visible trail plus matching BreadcrumbList data, so both a reader and a
   crawler can place the page in the site.
   ------------------------------------------------------------------------- */

.bdg-crumbs {
	margin: 0 0 17px;
	font-size: 12px;
}

.bdg-crumbs-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: none;
	color: #6b7280;
}

.bdg-crumbs-list li {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.bdg-crumbs-list li + li::before {
	content: "/";
	color: #d1d5db;
}

.bdg-crumbs-list a {
	color: #6b7280;
	text-decoration: none;
}

.bdg-crumbs-list a:hover {
	color: #3a6f99;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bdg-crumbs-list [aria-current="page"] {
	color: #111827;
}
