/* ==========================================================================
   Quotes Directory — front-end styles
   Palette: warm cream / olive green / muted gold
   ========================================================================== */

/* Declared on :root (not just .cq-app) because the quote detail popup
   modal is printed separately in wp_footer, outside any .cq-app wrapper —
   it still needs these variables to resolve correctly. */
:root {
	--cq-bg: #ffffff;
	--cq-cream: #f2ede1;
	--cq-cream-border: #e7ddc9;
	--cq-olive: #3b4a32;
	--cq-olive-dark: #2c3826;
	--cq-gold: #c9a24b;
	--cq-text: #2b2a26;
	--cq-text-muted: #6f6b60;
	--cq-border: #e4ddd0;
	--cq-radius: 10px;
	--cq-font-display: Georgia, 'Times New Roman', serif;
	--cq-font-body: Georgia, 'Times New Roman', serif;
}

.cq-app {
	font-family: var(--cq-font-body);
	color: var(--cq-text);
	max-width: 1180px;
	margin: 0 auto;
	padding: 8px 4px 40px;
	box-sizing: border-box;
	overflow-x: hidden; /* safety net: a very long unbroken word in a quote
	                       should never be able to stretch the page sideways */
}
.cq-app *,
.cq-app *::before,
.cq-app *::after {
	box-sizing: border-box;
	min-width: 0; /* prevents flex/grid children with text content from
	                 forcing their container wider than available space */
}

/* ---------- Toolbar ---------- */
.cq-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-bottom: 16px;
}

.cq-search {
	position: relative;
	flex: 1 1 260px;
	min-width: 200px;
}
.cq-search input {
	width: 100%;
	padding: 11px 14px 11px 42px;
	border: 1px solid var(--cq-border);
	border-radius: 8px;
	font-family: var(--cq-font-body);
	font-size: 14.5px;
	color: var(--cq-text);
	background: #fff;
}
.cq-search input:focus {
	outline: none;
	border-color: var(--cq-gold);
	box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.15);
}
.cq-search-btn {
	position: absolute;
	left: 4px;
	top: 4px;
	bottom: 4px;
	width: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	border-radius: 6px;
	color: #9c968a;
	cursor: pointer;
	padding: 0;
}
.cq-search-btn:hover,
.cq-search-btn:focus-visible {
	color: var(--cq-olive);
	background: rgba(59, 74, 50, 0.08);
	outline: none;
}
.cq-search-btn .dashicons {
	font-size: 17px;
	width: 17px;
	height: 17px;
	line-height: 1;
}

/* On desktop the panel's children (the four selects) become direct flex
   items of .cq-toolbar, so everything sits in one row: search, Author,
   Topic, Category, Sort By, Filters. */
.cq-filters-panel {
	display: contents;
}

.cq-filters-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 20px;
	height: 44px;
	background: var(--cq-olive);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-family: var(--cq-font-body);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
}
.cq-filters-toggle:hover {
	background: var(--cq-olive-dark);
}
.cq-filters-toggle .dashicons {
	font-size: 17px;
	width: 17px;
	height: 17px;
	line-height: 1;
}
/* Desktop: swap the label to "Clear Filters" once any filter is active
   (the button has nothing to "open" there — all dropdowns are already
   visible in the row, so it functions as a reset). */
.cq-filters-toggle .cq-filters-label-clear {
	display: none;
}
.cq-filters-toggle.has-active-filters .cq-filters-label-default {
	display: none;
}
.cq-filters-toggle.has-active-filters .cq-filters-label-clear {
	display: inline;
}
.cq-filter-badge {
	background: var(--cq-gold);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	min-width: 17px;
	height: 17px;
	padding: 0 5px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.cq-filter-badge[hidden] {
	display: none !important;
}

.cq-select-wrap {
	position: relative;
}

/* The real <select> stays functional but invisible — the custom trigger/menu
   below is what people actually see and interact with. */
.cq-native-select {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cq-dd-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--cq-border);
	border-radius: 8px;
	background: #fff;
	font-family: var(--cq-font-body);
	font-size: 14px;
	color: var(--cq-text);
	min-width: 118px;
	cursor: pointer;
	text-align: left;
}
.cq-dd-trigger:focus-visible {
	outline: none;
	border-color: var(--cq-gold);
	box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.15);
}
.cq-select-wrap.is-open .cq-dd-trigger {
	border-color: var(--cq-gold);
}
.cq-dd-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cq-dd-caret {
	font-size: 14px;
	width: 14px;
	height: 14px;
	line-height: 1;
	color: #6f6b60;
	flex-shrink: 0;
	transition: transform 0.15s ease;
}
.cq-select-wrap.is-open .cq-dd-caret {
	transform: rotate(180deg);
}

.cq-dd-menu {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 100%;
	width: max-content;
	max-width: 320px;
	z-index: 60;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--cq-border);
	border-radius: 10px;
	box-shadow: 0 10px 28px rgba(43, 42, 38, 0.14);
	max-height: 260px;
	overflow-y: auto;
}
.cq-select-wrap.is-open .cq-dd-menu {
	display: block;
}
.cq-dd-option {
	padding: 9px 12px;
	border-radius: 6px;
	font-family: var(--cq-font-body);
	font-size: 14px;
	line-height: 1.4;
	color: var(--cq-text);
	cursor: pointer;
	white-space: normal;
	word-break: break-word;
}
.cq-dd-option:hover,
.cq-dd-option:focus {
	background: var(--cq-olive);
	color: #fff;
}
.cq-dd-option.is-selected {
	background: var(--cq-olive);
	color: #fff;
	font-weight: 600;
}

.cq-clear-filters-mobile {
	display: none;
}

/* ---------- Tabs ---------- */
.cq-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 22px;
}
.cq-tab {
	padding: 9px 18px;
	background: #fff;
	border: 1px solid var(--cq-border);
	border-radius: 8px;
	font-family: var(--cq-font-body);
	font-size: 14px;
	color: var(--cq-text);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: all 0.15s ease;
}
.cq-tab:hover {
	border-color: var(--cq-gold);
}
.cq-tab.is-active {
	background: var(--cq-olive);
	border-color: var(--cq-olive);
	color: #fff;
}
.cq-badge {
	background: var(--cq-gold);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Hero / featured quote ---------- */
.cq-hero {
	background: var(--cq-cream);
	border: 1px solid var(--cq-cream-border);
	border-radius: 16px;
	padding: 56px 60px;
	text-align: center;
	margin-bottom: 40px;
	position: relative;
	cursor: pointer;
	transition: opacity 0.2s ease;
}
.cq-hero.is-loading {
	opacity: 0.5;
}
.cq-hero-marks {
	font-family: var(--cq-font-display);
	color: var(--cq-gold);
	font-size: 30px;
	font-weight: 700;
	display: flex;
	justify-content: center;
	gap: 20px;
	margin-bottom: 18px;
	line-height: 1;
}
.cq-hero-text {
	font-family: var(--cq-font-display);
	font-style: italic;
	font-weight: 500;
	font-size: 30px;
	line-height: 1.45;
	color: var(--cq-text);
	margin: 0 0 22px;
	max-width: 880px;
	margin-left: auto;
	margin-right: auto;
	overflow-wrap: anywhere;
	word-break: break-word;
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.cq-hero-text::before { content: '\201C'; }
.cq-hero-text::after { content: '\201D'; }
.cq-hero-hint {
	font-family: var(--cq-font-body);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--cq-gold);
	margin: 0 0 4px;
}
.cq-hero-author {
	font-family: var(--cq-font-display);
	font-style: italic;
	font-weight: 700;
	font-size: 17px;
	color: var(--cq-text);
	margin: 0;
}
.cq-hero-author::before {
	content: '— ';
}

/* ---------- List header ---------- */
.cq-list-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 26px;
}
.cq-list-header h2 {
	font-family: var(--cq-font-display);
	font-size: 38px;
	font-weight: 700;
	margin: 0;
	color: var(--cq-text);
}
.cq-view-toggle {
	display: flex;
	gap: 4px;
	background: #f5f2eb;
	border: 1px solid var(--cq-border);
	border-radius: 8px;
	padding: 3px;
}
.cq-view-btn {
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	border-radius: 6px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cq-view-btn.is-active {
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.cq-view-btn {
	color: #4a4438;
}
.cq-view-btn .dashicons {
	font-size: 15px;
	width: 15px;
	height: 15px;
	line-height: 1;
}

/* ---------- Grid / cards ---------- */
.cq-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}
.cq-grid[data-view="list"] {
	grid-template-columns: 1fr;
}
.cq-loading,
.cq-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--cq-text-muted);
	padding: 40px 0;
	font-size: 15px;
}

.cq-card {
	background: #fff;
	border: 1px solid var(--cq-border);
	border-radius: 14px;
	padding: 26px 26px 22px;
	position: relative;
	display: flex;
	flex-direction: column;
	cursor: pointer;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.cq-card:hover {
	box-shadow: 0 6px 20px rgba(43, 42, 38, 0.08);
	transform: translateY(-2px);
}
.cq-card.cq-card--accent {
	background: var(--cq-cream);
	border-color: var(--cq-cream-border);
}

.cq-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 4px;
}
.cq-card-mark {
	font-family: var(--cq-font-display);
	font-size: 26px;
	font-weight: 700;
	color: var(--cq-gold);
	line-height: 1;
}
.cq-bookmark-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: #b7b0a0;
	transition: color 0.15s ease;
}
.cq-bookmark-btn svg {
	width: 18px;
	height: 18px;
	display: block;
}
.cq-bookmark-btn.is-bookmarked {
	color: var(--cq-gold);
}

.cq-card-text {
	font-family: var(--cq-font-display);
	font-style: italic;
	font-size: 18px;
	line-height: 1.5;
	color: var(--cq-text);
	margin: 6px 0 16px;
	flex: 1;
	overflow-wrap: anywhere;
	word-break: break-word;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.cq-card-text::before { content: '\201C'; }
.cq-card-text::after { content: '\201D'; }

.cq-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
}
.cq-card-author {
	font-family: var(--cq-font-display);
	font-style: italic;
	font-weight: 700;
	font-size: 14.5px;
	color: var(--cq-text);
}
.cq-card-author::before { content: '— '; }
.cq-card-actions {
	display: flex;
	gap: 6px;
}
.cq-copy-btn {
	background: transparent;
	border: 1px solid var(--cq-border);
	border-radius: 6px;
	font-family: var(--cq-font-body);
	font-size: 12px;
	color: var(--cq-text-muted);
	padding: 5px 10px;
	cursor: pointer;
}
.cq-copy-btn:hover {
	border-color: var(--cq-gold);
	color: var(--cq-text);
}

.cq-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
}
.cq-tag {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--cq-olive);
	background: rgba(59, 74, 50, 0.08);
	padding: 3px 9px;
	border-radius: 999px;
}
.cq-tag--level {
	color: #8a6a1f;
	background: rgba(201, 162, 75, 0.16);
}

/* List view adjustments — pure listing look: no boxed card, just rows
   separated by a thin bottom border, edge to edge. */
.cq-grid[data-view="list"] {
	display: block;
	border-top: 1px solid var(--cq-border);
}
.cq-grid[data-view="list"] .cq-card {
	flex-direction: row;
	align-items: center;
	gap: 20px;
	padding: 18px 4px;
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--cq-border);
	border-radius: 0;
}
.cq-grid[data-view="list"] .cq-card:hover {
	box-shadow: none;
	transform: none;
	background: rgba(59, 74, 50, 0.03);
}
.cq-grid[data-view="list"] .cq-card.cq-card--accent {
	background: transparent;
}
.cq-grid[data-view="list"] .cq-card.cq-card--accent:hover {
	background: rgba(59, 74, 50, 0.03);
}
.cq-grid[data-view="list"] .cq-card-top {
	flex-direction: column;
	align-items: center;
	margin: 0;
}
.cq-grid[data-view="list"] .cq-card-text {
	margin: 0;
	flex: 1;
}
.cq-grid[data-view="list"] .cq-card-footer {
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	margin: 0;
}

/* ---------- Pagination ---------- */
.cq-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 34px;
}
.cq-page-btn {
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--cq-border);
	background: #fff;
	border-radius: 8px;
	cursor: pointer;
	font-family: var(--cq-font-body);
	font-size: 14px;
	color: var(--cq-text);
}
.cq-page-btn.is-active {
	background: var(--cq-olive);
	border-color: var(--cq-olive);
	color: #fff;
}
.cq-page-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ---------- Quote detail modal ---------- */
.cq-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(43, 42, 38, 0.55);
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.cq-modal-overlay[hidden] { display: none; }
.cq-modal {
	background: #fff;
	border-radius: 16px;
	max-width: 640px;
	width: 100%;
	max-height: 88vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	font-family: var(--cq-font-body);
	color: var(--cq-text);
}
.cq-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--cq-border);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--cq-text);
}
.cq-modal-close .dashicons { font-size: 18px; width: 18px; height: 18px; }
.cq-modal-content-inner {
	padding: 50px 44px 40px;
	text-align: center;
}
.cq-modal-marks {
	font-family: var(--cq-font-display);
	color: var(--cq-gold);
	font-size: 30px;
	font-weight: 700;
	margin-bottom: 14px;
	line-height: 1;
}
.cq-modal-text {
	font-family: var(--cq-font-display);
	font-style: italic;
	font-size: 22px;
	line-height: 1.5;
	color: var(--cq-text);
	margin: 0 0 18px;
	overflow-wrap: anywhere;
	word-break: break-word;
}
.cq-modal-text::before { content: '\201C'; }
.cq-modal-text::after { content: '\201D'; }
.cq-modal-author {
	font-family: var(--cq-font-display);
	font-style: italic;
	font-weight: 700;
	font-size: 16px;
	color: var(--cq-text);
	margin: 0 0 6px;
}
.cq-modal-author::before { content: '— '; }
.cq-modal-source {
	font-size: 13.5px;
	color: var(--cq-text-muted);
	margin: 0 0 16px;
}
.cq-modal-tags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-top: 8px;
}

/* ---------- Toast (copy confirmation) ---------- */
.cq-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: var(--cq-olive);
	color: #fff;
	padding: 10px 20px;
	border-radius: 8px;
	font-family: var(--cq-font-body);
	font-size: 14px;
	opacity: 0;
	pointer-events: none;
	transition: all 0.25s ease;
	z-index: 9999;
}
.cq-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.cq-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.cq-hero {
		padding: 40px 28px;
	}
	.cq-hero-text {
		font-size: 24px;
	}
}

/* Below this width: filters collapse behind the "Filters" button (which
   doubles as a toggle here instead of a clear action), tabs scroll
   horizontally instead of wrapping into a wall of buttons. */
@media (max-width: 760px) {
	.cq-filters-panel {
		display: none;
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		background: #fff;
		border: 1px solid var(--cq-border);
		border-radius: 10px;
		padding: 14px;
		gap: 12px;
		order: 3;
	}
	.cq-filters-panel.is-open {
		display: flex;
	}
	.cq-filters-panel .cq-select-wrap,
	.cq-filters-panel .cq-dd-trigger {
		width: 100%;
	}
	.cq-filters-toggle.is-active {
		background: var(--cq-olive-dark);
	}

	/* On mobile the button always opens/closes the panel, so it always
	   reads "Filters" (with the count badge) — the label never swaps to
	   "Clear Filters" here; clearing happens via the button inside the panel. */
	.cq-filters-toggle.has-active-filters .cq-filters-label-default {
		display: inline;
	}
	.cq-filters-toggle.has-active-filters .cq-filters-label-clear {
		display: none;
	}

	.cq-clear-filters-mobile {
		display: block;
		width: 100%;
		padding: 10px;
		background: transparent;
		border: 1px solid var(--cq-border);
		border-radius: 8px;
		font-family: var(--cq-font-body);
		font-size: 13.5px;
		font-weight: 600;
		color: var(--cq-text-muted);
		cursor: pointer;
	}
	.cq-clear-filters-mobile:hover {
		border-color: var(--cq-gold);
		color: var(--cq-text);
	}

	.cq-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 2px;
	}
	.cq-tabs::-webkit-scrollbar {
		display: none;
	}
	.cq-tab {
		flex-shrink: 0;
	}
}

@media (max-width: 620px) {
	.cq-grid {
		grid-template-columns: 1fr;
	}
	.cq-list-header h2 {
		font-size: 28px;
	}
	.cq-hero {
		padding: 32px 20px;
	}
	.cq-hero-text {
		font-size: 21px;
	}
	.cq-grid[data-view="list"] .cq-card {
		flex-direction: column;
		align-items: stretch;
	}
	.cq-grid[data-view="list"] .cq-card-footer {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

@media (max-width: 400px) {
	.cq-filters-toggle .cq-filters-label-default,
	.cq-filters-toggle .cq-filters-label-clear {
		display: none !important;
	}
	.cq-filters-toggle {
		min-width: 48px;
		width: auto;
		justify-content: center;
		padding: 0 12px;
	}
}

/* ==========================================================================
   Theme / page-builder conflict guard
   ==========================================================================
   Themes like Hello Elementor (and Elementor's Global Colors / Buttons
   settings) apply broad styling to plain <button>, <input> and <select>
   elements. Those rules can carry enough specificity (or load order) to
   override the plugin's own colors, leaving buttons looking like unstyled
   theme defaults (e.g. outline-only pink buttons instead of our olive/cream
   palette). The rules below re-assert the plugin's core colors at higher
   specificity with !important so the widget always renders correctly
   regardless of the active theme.
   ========================================================================== */

.cq-app input[type="text"],
.cq-app select,
.cq-app button {
	font-family: var(--cq-font-body) !important;
	box-shadow: none !important;
	text-shadow: none !important;
}

.cq-app .cq-search input[type="text"] {
	background: #fff !important;
	border: 1px solid var(--cq-border) !important;
	color: var(--cq-text) !important;
}
.cq-app .cq-search input[type="text"]:focus {
	border-color: var(--cq-gold) !important;
}
.cq-app .cq-search-btn {
	background: transparent !important;
	border: none !important;
	color: #9c968a !important;
}

.cq-app .cq-dd-trigger {
	background-color: #fff !important;
	border: 1px solid var(--cq-border) !important;
	color: var(--cq-text) !important;
}
.cq-app .cq-dd-menu {
	background-color: #fff !important;
	border: 1px solid var(--cq-border) !important;
}
.cq-app .cq-dd-option {
	background-color: transparent !important;
	color: var(--cq-text) !important;
}
.cq-app .cq-dd-option:hover,
.cq-app .cq-dd-option.is-selected {
	background-color: var(--cq-olive) !important;
	color: #fff !important;
}

.cq-app .cq-filters-toggle {
	background-color: var(--cq-olive) !important;
	border: none !important;
	color: #fff !important;
}
.cq-app .cq-filters-toggle:hover {
	background-color: var(--cq-olive-dark) !important;
}
.cq-app .cq-filters-toggle .cq-filter-badge {
	background-color: var(--cq-gold) !important;
	color: #fff !important;
}

.cq-app .cq-clear-filters-mobile {
	background: transparent !important;
	border: 1px solid var(--cq-border) !important;
	color: var(--cq-text-muted) !important;
}

.cq-app .cq-tab {
	background-color: #fff !important;
	border: 1px solid var(--cq-border) !important;
	color: var(--cq-text) !important;
}
.cq-app .cq-tab.is-active {
	background-color: var(--cq-olive) !important;
	border-color: var(--cq-olive) !important;
	color: #fff !important;
}
.cq-app .cq-tab .cq-badge {
	background-color: var(--cq-gold) !important;
	color: #fff !important;
}

.cq-app .cq-hero {
	background-color: var(--cq-cream) !important;
	border: 1px solid var(--cq-cream-border) !important;
}
.cq-app .cq-hero-marks {
	color: var(--cq-gold) !important;
}
.cq-app .cq-hero-text,
.cq-app .cq-hero-author {
	color: var(--cq-text) !important;
}

.cq-app .cq-list-header h2 {
	color: var(--cq-text) !important;
}
.cq-app .cq-view-toggle {
	background-color: #f5f2eb !important;
	border: 1px solid var(--cq-border) !important;
}
.cq-app .cq-view-btn {
	background-color: transparent !important;
	border: none !important;
	color: #4a4438 !important;
}
.cq-app .cq-view-btn.is-active {
	background-color: #fff !important;
}

.cq-app .cq-card {
	background-color: #fff !important;
	border: 1px solid var(--cq-border) !important;
}
.cq-app .cq-card.cq-card--accent {
	background-color: var(--cq-cream) !important;
	border-color: var(--cq-cream-border) !important;
}
/* List view must win over the general card hardening above — pure row
   listing, no boxed border/radius/background. */
.cq-app .cq-grid[data-view="list"] .cq-card,
.cq-app .cq-grid[data-view="list"] .cq-card.cq-card--accent {
	background-color: transparent !important;
	border: none !important;
	border-bottom: 1px solid var(--cq-border) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}
.cq-app .cq-grid[data-view="list"] .cq-card:hover,
.cq-app .cq-grid[data-view="list"] .cq-card.cq-card--accent:hover {
	background-color: rgba(59, 74, 50, 0.03) !important;
}
.cq-app .cq-card-mark {
	color: var(--cq-gold) !important;
}
.cq-app .cq-card-text,
.cq-app .cq-card-author {
	color: var(--cq-text) !important;
}
.cq-app .cq-bookmark-btn {
	background: transparent !important;
	border: none !important;
	color: #b7b0a0 !important;
}
.cq-app .cq-bookmark-btn.is-bookmarked {
	color: var(--cq-gold) !important;
}
.cq-app .cq-tag {
	background-color: rgba(59, 74, 50, 0.08) !important;
	color: var(--cq-olive) !important;
	border: none !important;
}
.cq-app .cq-tag--level {
	background-color: rgba(201, 162, 75, 0.16) !important;
	color: #8a6a1f !important;
}
.cq-app .cq-copy-btn {
	background: transparent !important;
	border: 1px solid var(--cq-border) !important;
	color: var(--cq-text-muted) !important;
}
.cq-app .cq-copy-btn:hover {
	border-color: var(--cq-gold) !important;
	color: var(--cq-text) !important;
}

.cq-app .cq-page-btn {
	background-color: #fff !important;
	border: 1px solid var(--cq-border) !important;
	color: var(--cq-text) !important;
}
.cq-app .cq-page-btn.is-active {
	background-color: var(--cq-olive) !important;
	border-color: var(--cq-olive) !important;
	color: #fff !important;
}

.cq-toast {
	background-color: var(--cq-olive) !important;
	color: #fff !important;
	border: none !important;
}

/* Modal-specific hardening (unscoped — the modal is printed outside .cq-app
   in wp_footer, so .cq-app-prefixed rules above don't reach it). */
.cq-modal { background-color: #fff !important; color: var(--cq-text) !important; }
.cq-modal-close { background-color: #fff !important; border: 1px solid var(--cq-border) !important; color: var(--cq-text) !important; }
.cq-modal-text, .cq-modal-author { color: var(--cq-text) !important; }
.cq-modal-marks { color: var(--cq-gold) !important; }
.cq-modal-tag, .cq-modal-tags .cq-tag { background-color: rgba(59, 74, 50, 0.08) !important; color: var(--cq-olive) !important; border: none !important; }
.cq-modal-tags .cq-tag--level { background-color: rgba(201, 162, 75, 0.16) !important; color: #8a6a1f !important; }
