/* ==========================================================================
   WS48 Dealer Resources
   Brand palette: Deep Blue #26526E · Warm Cream #EDE8DE · Terracotta #C1694A
   Greige #A8A296 · Soft Black #1A1A1A · Brick Red #9C3A2B
   ========================================================================== */

:root {
	--ws48-blue: #26526E;
	--ws48-cream: #EDE8DE;
	--ws48-terracotta: #C1694A;
	--ws48-greige: #A8A296;
	--ws48-black: #1A1A1A;
	--ws48-brick: #9C3A2B;
	--ws48-ink-2: #4F4B45;      /* body text on cream/white */
	--ws48-ink-3: #5E5950;      /* secondary text */
	--ws48-line: #DDD6C9;       /* card borders */
	--ws48-on-dark: #D4CFC5;    /* secondary text on black */
	--ws48-radius: 14px;
	--ws48-font: 'Instrument Sans', system-ui, sans-serif;
	--ws48-max: 1240px;
}

/* Theme page title duplicates the hero heading; hide it on this page.
   Remove these lines if your theme already hides it. */
.ws48-dr-page .entry-title,
.ws48-dr-page .page-title { display: none; }

.ws48-dr-page .entry-content,
.ws48-dr-page .site-main { background: var(--ws48-cream); }

[class*="ws48-dr-"] { font-family: var(--ws48-font); box-sizing: border-box; }
[class*="ws48-dr-"] *, [class*="ws48-dr-"] *::before, [class*="ws48-dr-"] *::after { box-sizing: border-box; }

/* ---------- Hero ---------- */
.ws48-dr-hero {
	background: var(--ws48-black);
	color: #fff;
	padding: 56px 32px 88px !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
.ws48-dr-hero .ws48-dr-title {
	margin: 0 0 18px;
	color: #fff;
	font-size: clamp(36px, 5vw, 52px);
	line-height: 1.05;
	letter-spacing: -0.03em;
	font-weight: 600;
}
.ws48-dr-hero .ws48-dr-lead {
	margin: 0 0 24px;
	max-width: 640px;
	font-size: 18px;
	line-height: 1.5;
	color: var(--ws48-on-dark);
}

/* Search box (added by dealer-resources.js) */
.ws48-dr-search {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 640px;
	height: 54px;
	padding: 0 18px;
	background: #fff;
	border-radius: 12px;
}
.ws48-dr-search .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.ws48-dr-search svg { flex: none; color: var(--ws48-ink-3); }
.ws48-dr-search input {
	flex: 1;
	min-width: 0;
	height: 50px;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	font: inherit;
	font-size: 16px;
	color: var(--ws48-black);
	padding: 0 !important;
}
.ws48-dr-search:focus-within { outline: 2px solid var(--ws48-terracotta); outline-offset: 2px; }
.ws48-dr-search input:focus { outline: none; }

/* ---------- Quick cards ---------- */
.ws48-dr-cards {
	max-width: var(--ws48-max);
	margin: -32px auto 0 !important;
	padding: 0 32px;
	gap: 16px !important;
	position: relative;
	z-index: 1;
}
.ws48-dr-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 28px;
	min-height: 170px;
	padding: 28px;
	border-radius: var(--ws48-radius);
	box-shadow: 0 20px 40px -24px rgba(26, 26, 26, 0.5);
	transition: transform 0.15s ease;
}
.ws48-dr-card:hover { transform: translateY(-2px); }
.ws48-dr-card h3 {
	margin: 0 !important;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: inherit;
}
.ws48-dr-card .ws48-dr-card__link { margin: 0 !important; font-size: 16px; font-weight: 600; }
.ws48-dr-card .ws48-dr-card__link a { color: inherit; text-decoration: none; }
/* Whole card clickable */
.ws48-dr-card .ws48-dr-card__link a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ws48-dr-card .ws48-dr-card__link a:focus-visible { outline: none; }
.ws48-dr-card:focus-within { outline: 3px solid var(--ws48-terracotta); outline-offset: 3px; }

.ws48-dr-card--blue { background: var(--ws48-blue); color: #fff; }
.ws48-dr-card--light { background: #fff; color: var(--ws48-black); }
.ws48-dr-card--terracotta { background: var(--ws48-terracotta); color: #fff; }
/* White on terracotta needs large/bold text to stay readable */
.ws48-dr-card--terracotta .ws48-dr-card__link { font-size: 19px; font-weight: 700; }

.ws48-dr-card__link--video a { display: inline-flex; align-items: center; gap: 10px; }
.ws48-dr-card__link--video a::before {
	content: "";
	flex: none;
	width: 22px;
	height: 22px;
	background: var(--ws48-terracotta);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m10 8 6 4-6 4z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m10 8 6 4-6 4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Recently updated ---------- */
.ws48-dr-recent {
	max-width: calc(var(--ws48-max) - 64px);
	margin: 36px auto 0 !important;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	padding: 14px 20px;
	background: #fff;
	border: 1px solid var(--ws48-line);
	border-radius: 12px;
}
.ws48-dr-recent .ws48-dr-recent__label {
	margin: 0 !important;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ws48-brick);
}
.ws48-dr-recent .ws48-dr-recent__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 0;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	font-size: 15px;
	color: var(--ws48-ink-3);
}
.ws48-dr-recent__list li { margin: 0; }
.ws48-dr-recent__list li + li::before { content: "|"; color: var(--ws48-greige); margin: 0 14px; }
.ws48-dr-recent__list a { color: var(--ws48-black); font-weight: 500; text-decoration: none; }
.ws48-dr-recent__list a:hover { color: var(--ws48-brick); text-decoration: underline; }

/* ---------- Filter tabs (added by dealer-resources.js) ---------- */
.ws48-dr-tabs {
	max-width: calc(var(--ws48-max) - 64px);
	margin: 36px auto 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.ws48-dr-tabs button {
	height: 44px;
	padding: 0 18px;
	border-radius: 999px;
	border: 1px solid var(--ws48-greige);
	background: #fff;
	color: var(--ws48-black);
	font: 600 15px/1 var(--ws48-font);
	cursor: pointer;
}
.ws48-dr-tabs button:hover { border-color: var(--ws48-black); }
.ws48-dr-tabs button[aria-pressed="true"] { background: var(--ws48-black); border-color: var(--ws48-black); color: #fff; }
.ws48-dr-tabs button:focus-visible { outline: 2px solid var(--ws48-terracotta); outline-offset: 2px; }

/* ---------- Resource library ---------- */
.ws48-dr-library {
	max-width: var(--ws48-max);
	margin: 0 auto !important;
	padding: 0 32px;
	gap: 20px !important;
	align-items: start;
}
.ws48-dr-panel {
	background: #fff;
	border: 1px solid var(--ws48-line);
	border-radius: var(--ws48-radius);
	overflow: hidden;
	margin: 0 !important;
}
.ws48-dr-panel[hidden] { display: none !important; }
.ws48-dr-panel h2 {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin: 0 !important;
	padding: 20px 22px 14px;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--ws48-black);
}
.ws48-dr-panel h2 .ws48-dr-count { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--ws48-ink-3); }
.ws48-dr-list { list-style: none; margin: 0 !important; padding: 0 !important; }
.ws48-dr-list li {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	min-height: 48px;
	margin: 0;
	padding: 8px 22px;
	border-top: 1px solid var(--ws48-cream);
	font-size: 15px;
	line-height: 1.35;
}
.ws48-dr-list li[hidden] { display: none; }
.ws48-dr-list li:hover { background: #F7F4EE; }
.ws48-dr-list a { color: var(--ws48-black); font-weight: 500; text-decoration: none; }
.ws48-dr-list a::after { content: ""; position: absolute; inset: 0; } /* whole row clickable */
.ws48-dr-list a:hover { color: var(--ws48-brick); }
.ws48-dr-list a:focus-visible { outline: none; }
.ws48-dr-list li:focus-within { outline: 2px solid var(--ws48-terracotta); outline-offset: -2px; }

/* Italic text in a row = badge (e.g. "Updated", "New") */
.ws48-dr-list em {
	font-style: normal;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ws48-brick);
	border: 1px solid var(--ws48-brick);
	border-radius: 4px;
	padding: 2px 6px;
}
/* Inline code in a row = file type tag (PDF, Form, Video…) */
.ws48-dr-list code {
	margin-left: auto;
	font: 600 12px/1.4 var(--ws48-font);
	padding: 3px 8px;
	border-radius: 6px;
	background: var(--ws48-cream);
	color: #3E3A35;
}

.ws48-dr-empty {
	max-width: calc(var(--ws48-max) - 64px);
	margin: 0 auto;
	padding: 32px;
	background: #fff;
	border: 1px solid var(--ws48-line);
	border-radius: var(--ws48-radius);
	color: var(--ws48-ink-2);
	font-size: 16px;
}
.ws48-dr-empty[hidden] { display: none; }

/* ---------- Help band ---------- */
.ws48-dr-help {
	max-width: calc(var(--ws48-max) - 64px);
	margin: 40px auto 64px !important;
	padding: 32px;
	gap: 24px !important;
	background: var(--ws48-blue);
	color: #fff;
	border-radius: 16px;
}
.ws48-dr-help__text { flex: 1 1 400px; }
.ws48-dr-help h2 { margin: 0 0 6px !important; font-size: 22px; font-weight: 600; color: #fff; }
.ws48-dr-help p { margin: 0 !important; font-size: 16px; color: #D9E2E8; }

/* ---------- Buttons ---------- */
.ws48-dr-btn .wp-block-button__link,
.ws48-dr-cta,
.ws48-dr-login button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 50px;
	padding: 0 24px;
	border: 0;
	border-radius: 10px;
	background: var(--ws48-terracotta);
	color: #fff;
	font: 700 19px/1 var(--ws48-font);
	text-decoration: none;
	cursor: pointer;
}
.ws48-dr-btn .wp-block-button__link:hover,
.ws48-dr-cta:hover,
.ws48-dr-login button:hover { background: var(--ws48-brick); color: #fff; }
.ws48-dr-btn--ghost .wp-block-button__link {
	background: transparent;
	border: 1px solid #fff;
	font-size: 16px;
	font-weight: 600;
}
.ws48-dr-btn--ghost .wp-block-button__link:hover { background: #fff; color: var(--ws48-black); }

/* ==========================================================================
   Login gate (password screen)
   ========================================================================== */
.ws48-dr-gate { color: var(--ws48-black); }
.ws48-dr-gate__hero,
.ws48-dr-gate__band {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	background: var(--ws48-black);
	color: #fff;
}
.ws48-dr-gate__inner {
	max-width: var(--ws48-max);
	margin: 0 auto !important;
	padding: 88px 32px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 56px;
}
.ws48-dr-gate__intro { flex: 1 1 520px; min-width: 0; }
.ws48-dr-eyebrow {
	margin: 0 0 20px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ws48-terracotta);
}
.ws48-dr-gate__title {
	margin: 0 0 22px;
	color: #fff;
	font-size: clamp(38px, 5vw, 60px);
	line-height: 1.02;
	letter-spacing: -0.03em;
	font-weight: 600;
}
.ws48-dr-dot { color: var(--ws48-terracotta); }
.ws48-dr-gate__lead { margin: 0 0 24px; max-width: 540px; font-size: 19px; line-height: 1.55; color: var(--ws48-on-dark); }
.ws48-dr-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ws48-dr-chips li { margin: 0; padding: 8px 14px; border: 1px solid var(--ws48-ink-2); border-radius: 999px; font-size: 14px; color: var(--ws48-cream); }

.ws48-dr-login {
	flex: 1 1 400px;
	max-width: 460px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 40px;
	background: #fff;
	color: var(--ws48-black);
	border-radius: 16px;
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.ws48-dr-login__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ws48-dr-login__icon {
	flex: none;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: var(--ws48-terracotta);
	color: #fff;
}
.ws48-dr-login h2 { margin: 0; font-size: 22px; font-weight: 600; color: var(--ws48-black); }
.ws48-dr-login__head p { margin: 0; font-size: 14px; color: var(--ws48-ink-3); }
.ws48-dr-login label { font-size: 14px; font-weight: 500; }
.ws48-dr-login input[type="password"] {
	height: 50px;
	padding: 0 16px;
	border: 1px solid var(--ws48-greige);
	border-radius: 10px;
	background: #fff;
	font: 16px var(--ws48-font);
	color: var(--ws48-black);
}
.ws48-dr-login input[type="password"]:focus { outline: 2px solid var(--ws48-blue); outline-offset: 2px; }
.ws48-dr-login button { width: 100%; height: 52px; margin-top: 8px; }
.ws48-dr-login__error {
	margin: 0;
	padding: 10px 14px;
	border-radius: 8px;
	background: #F6E6E2;
	color: var(--ws48-brick);
	font-size: 14px;
	font-weight: 600;
}
.ws48-dr-login__help {
	margin: 10px 0 0;
	padding-top: 18px;
	border-top: 1px solid #E6E0D4;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ws48-ink-2);
}
.ws48-dr-login__help a { color: var(--ws48-black); font-weight: 600; }
.ws48-dr-login__help a:hover { color: var(--ws48-brick); }

.ws48-dr-gate__inside { max-width: var(--ws48-max); margin: 0 auto; padding: 72px 32px; }
.ws48-dr-gate__inside > h2 { margin: 0 0 24px; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; color: var(--ws48-black); }
.ws48-dr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ws48-dr-tile {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 26px;
	background: #fff;
	border: 1px solid var(--ws48-line);
	border-radius: 12px;
}
.ws48-dr-tile svg { color: var(--ws48-terracotta); }
.ws48-dr-tile h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--ws48-black); }
.ws48-dr-tile p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ws48-ink-3); }

.ws48-dr-gate__band-inner {
	max-width: var(--ws48-max);
	margin: 0 auto !important;
	padding: 44px 32px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.ws48-dr-gate__band p { margin: 0; font-size: 16px; color: var(--ws48-on-dark); }
.ws48-dr-gate__band .ws48-dr-gate__band-title { margin: 0 0 6px; font-size: 22px; font-weight: 600; color: #fff; }

/* ---------- Theme compatibility ----------
   The theme's content box has a fixed height, so the gate spilled into the
   "You're in good company" section below it. Let every wrapper around our
   content grow to fit, and stop the full-width bands from causing side-scroll. */
body.ws48-dr-page { overflow-x: clip; }
.ws48-dr-page *:has(.ws48-dr-gate),
.ws48-dr-page *:has(.ws48-dr-library),
.ws48-dr-page *:has(.ws48-dr-hero) {
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
}

/* The theme's heading styles were overriding ours (font, weight, size). */
.ws48-dr-gate h1, .ws48-dr-gate h2, .ws48-dr-gate h3,
.ws48-dr-gate p, .ws48-dr-gate li, .ws48-dr-gate label, .ws48-dr-gate button, .ws48-dr-gate a,
.ws48-dr-hero h1, .ws48-dr-hero p,
.ws48-dr-card h3, .ws48-dr-panel h2, .ws48-dr-help h2,
.ws48-dr-recent p, .ws48-dr-list li {
	font-family: var(--ws48-font) !important;
	text-transform: none !important;
}
.ws48-dr-gate .ws48-dr-eyebrow,
.ws48-dr-recent .ws48-dr-recent__label { text-transform: uppercase !important; }
.ws48-dr-gate h1.ws48-dr-gate__title { font-weight: 600 !important; letter-spacing: -0.03em !important; color: #fff !important; }
.ws48-dr-gate .ws48-dr-gate__inside h2 { font-size: 28px !important; font-weight: 600 !important; letter-spacing: -0.01em !important; color: var(--ws48-black) !important; }
.ws48-dr-gate .ws48-dr-tile h3 { font-size: 18px !important; font-weight: 600 !important; letter-spacing: 0 !important; color: var(--ws48-black) !important; margin: 0 !important; }
.ws48-dr-gate .ws48-dr-login h2 { font-size: 22px !important; font-weight: 600 !important; letter-spacing: 0 !important; margin: 0 !important; }
/* "What's inside": full-width cream band; content lines up with the hero text above */
.ws48-dr-gate .ws48-dr-gate__inside {
	background: var(--ws48-cream);
	width: 100vw;
	max-width: none;
	margin: 0 0 0 calc(50% - 50vw) !important;
	padding: 72px 0 !important;
}
.ws48-dr-gate .ws48-dr-gate__inside-inner {
	max-width: var(--ws48-max);
	margin: 0 auto !important;
	padding: 0 32px;
}
.ws48-dr-gate .ws48-dr-gate__inside-inner > h2 { margin: 0 0 24px !important; }
.ws48-dr-gate__band { margin-bottom: 0; }

/* ---------- In the block editor: no click overlays, so every heading and link is easy to select ---------- */
.editor-styles-wrapper .ws48-dr-card .ws48-dr-card__link a::after,
.editor-styles-wrapper .ws48-dr-list a::after { content: none; }
.editor-styles-wrapper .ws48-dr-card:hover { transform: none; }
.editor-styles-wrapper .ws48-dr-list a,
.editor-styles-wrapper .ws48-dr-card__link a { text-decoration: underline; text-decoration-style: dotted; }

/* ---------- Phones ---------- */
@media (max-width: 600px) {
	.ws48-dr-hero { padding: 40px 16px 72px !important; }
	.ws48-dr-cards, .ws48-dr-library { padding: 0 16px; }
	.ws48-dr-recent, .ws48-dr-tabs, .ws48-dr-help, .ws48-dr-empty { margin-left: 16px !important; margin-right: 16px !important; }
	.ws48-dr-library { grid-template-columns: 1fr !important; }
	.ws48-dr-gate__inner { padding: 56px 16px; gap: 36px; }
	.ws48-dr-login { padding: 28px; }
	.ws48-dr-gate .ws48-dr-gate__inside-inner, .ws48-dr-gate__band-inner { padding-left: 16px; padding-right: 16px; }
	.ws48-dr-recent__list li + li::before { margin: 0 10px; }
}
