/**
 * 220 Listings — Local Resources Stylesheet
 *
 * Owns every Local Resource shortcode and template:
 *   • Tagged Rows list layout
 *   • Category Accordion (LR-specific design layer over accordion.css)
 *
 * Lazy-loaded by AssetLoader::has_local_resource_content() — only
 * enqueued when the page surfaces Local Resource content (singular,
 * archive, taxonomy, or one of the LR shortcodes).
 *
 * Companion stylesheets:
 *   • 220-listings-shared.css   — Buttons, contact links, pagination, a11y
 *   • 220-listings-accordion.css — Accordion shell + JS
 *
 * @package TwoTwenty\Listings
 */

/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS · Directory palette
   ---------------------------------------------------------------
   The --220-navy / --220-gold / --220-warm-white / --220-text-*
   tokens consumed throughout this file are defined globally by
   ColorSettings::output_css_variables() (src/Frontend). To
   customize, edit the Brand Colors in the plugin settings.
═══════════════════════════════════════════════════════════════ */
/* Local :root block removed in v2.3.1 — see ColorSettings.php */

/* ═══════════════════════════════════════════════════════════════
   SHARED · Typography
   ---------------------------------------------------------------
   Body type baseline (DM Sans) used across local-resource lists
   and accordions.
═══════════════════════════════════════════════════════════════ */
.twotwenty-lr-list,
.twotwenty-lr-accordion {
	font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	-webkit-font-smoothing: antialiased;
	color: var(--220-text);
	line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   LOCAL RESOURCES · List · Tagged Rows
   ---------------------------------------------------------------
   Default [220_local_resources] layout. Two-column information rows
   with category tag chips pulled from 220_lr_category. Class prefix
   .twotwenty-lr-*. Used by list-compact-rows.php.
═══════════════════════════════════════════════════════════════ */
.twotwenty-lr-list {
	list-style: none;
	max-width: 760px;
	margin: 0 0 2rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.twotwenty-lr-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
	align-items: start;
	padding: 16px 0;
	border-bottom: 1px solid var(--220-border-cool);
}
.twotwenty-lr-row:first-child { border-top: 1px solid var(--220-border-cool); }

.twotwenty-lr-row-left { min-width: 0; }
.twotwenty-lr-row-top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 4px;
	flex-wrap: wrap;
}
.twotwenty-lr-row-tag {
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--220-text-warm);
	background: var(--220-warm-white);
	border: 1px solid var(--220-border);
	border-radius: 3px;
	padding: 2px 8px;
	white-space: nowrap;
}
.twotwenty-lr-row-name {
	font-size: 15px;
	font-weight: 600;
	color: var(--220-navy);
	margin: 0;
	line-height: 1.3;
}
.twotwenty-lr-row-desc {
	font-size: 12px;
	color: var(--220-text-muted);
	line-height: 1.6;
	font-weight: 300;
	margin: 3px 0 0;
}
.twotwenty-lr-row-right {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-end;
	text-align: right;
	flex-shrink: 0;
}
.twotwenty-lr-row-phone {
	font-size: 12.5px;
	color: var(--220-text-2);
	display: flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}
.twotwenty-lr-row-phone svg { color: var(--220-gold); flex-shrink: 0; }
.twotwenty-lr-row-phone a { color: var(--220-text-2); text-decoration: none; }
.twotwenty-lr-row-phone a:hover { text-decoration: underline; }
.twotwenty-lr-row-website a {
	font-size: 12px;
	font-weight: 600;
	color: var(--220-gold-dark);
	text-decoration: none;
	white-space: nowrap;
}
.twotwenty-lr-row-website a:hover { text-decoration: underline; }

@media (max-width: 600px) {
	.twotwenty-lr-row { grid-template-columns: 1fr; }
	.twotwenty-lr-row-right { align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
}

/* ═══════════════════════════════════════════════════════════════
   LOCAL RESOURCES · Category Accordion · Tinted Panel
   ---------------------------------------------------------------
   [220_lr_categories] shortcode. Warm tinted panels with slug-keyed
   icons (school / restaurant / moving / health / service) keyed off
   the 220_lr_category taxonomy. Class prefix .twotwenty-lr-acc-*.
   Used by category-accordion.php.
═══════════════════════════════════════════════════════════════ */
.twotwenty-lr-accordion { max-width: 1200px; margin: 0 0 2rem; }

.twotwenty-lr-accordion .twotwenty-accordion-filter {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 0 0 20px;
	padding: 0 0 16px;
	border-bottom: 1px solid var(--220-border-cool);
	background: none;
	border-radius: 0;
	flex-wrap: wrap;
}
.twotwenty-lr-accordion .twotwenty-accordion-filter-label {
	font-size: 14px;
	font-weight: 600;
	color: var(--220-text-2);
	margin: 0;
}
.twotwenty-lr-accordion .twotwenty-accordion-filter-select {
	padding: 7px 28px 7px 11px;
	font-size: 14px;
	font-family: 'DM Sans', sans-serif;
	border: 1px solid var(--220-border);
	border-radius: 6px;
	background-color: #fff;
	color: var(--220-text);
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e99' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	cursor: pointer;
	min-width: 140px;
	max-width: 260px;
}

.twotwenty-lr-accordion .twotwenty-accordion-list {
	list-style: none;
	padding: 0;
	margin: 0;
	border: 1px solid var(--220-border);
	border-radius: 10px;
	overflow: hidden;
	display: block;
	gap: 0;
}
.twotwenty-lr-accordion .twotwenty-accordion-item {
	border: 0;
	border-bottom: 1px solid var(--220-border);
	border-radius: 0;
	background: #fff;
	overflow: hidden;
}
.twotwenty-lr-accordion .twotwenty-accordion-item:last-child { border-bottom: none; }

.twotwenty-lr-accordion .twotwenty-accordion-header { margin: 0; padding: 0; }
.twotwenty-lr-accordion .twotwenty-accordion-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 15px 20px;
	background: var(--220-warm-white);
	border: none;
	cursor: pointer;
	text-align: left;
	font-family: 'DM Sans', sans-serif;
	transition: background 0.15s;
	color: var(--220-navy);
}
.twotwenty-lr-accordion .twotwenty-accordion-trigger:hover,
.twotwenty-lr-accordion .twotwenty-accordion-trigger:focus-visible { background: #f3f1e9; }
.twotwenty-lr-accordion .twotwenty-accordion-trigger:focus-visible { outline: 2px solid var(--220-gold); outline-offset: -2px; }
.twotwenty-lr-accordion .twotwenty-accordion-item.is-open .twotwenty-accordion-trigger {
	background: #efece2;
	border-bottom: 1px solid var(--220-border);
}

.twotwenty-lr-acc-icon {
	width: 40px;
	height: 40px;
	border-radius: 6px;
	flex-shrink: 0;
	background: #fff;
	border: 1px solid var(--220-border);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--220-text-warm);
}

.twotwenty-lr-accordion .twotwenty-accordion-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--220-navy);
	flex: 1;
	min-width: 0;
}
.twotwenty-lr-accordion .twotwenty-accordion-count {
	font-size: 14px;
	font-weight: 700;
	color: var(--220-gold-dark);
	background: var(--220-gold-light);
	border: 1px solid var(--220-gold-border);
	border-radius: 100px;
	padding: 2px 10px;
	flex-shrink: 0;
	display: inline-flex;
	line-height: 1.2;
}
.twotwenty-lr-accordion .twotwenty-accordion-chevron {
	color: var(--220-text-muted);
	flex-shrink: 0;
	transition: transform 0.25s ease;
}
.twotwenty-lr-accordion .twotwenty-accordion-trigger[aria-expanded="true"] .twotwenty-accordion-chevron {
	transform: rotate(180deg);
}

.twotwenty-lr-accordion .twotwenty-accordion-panel {
	background: #fff;
	padding: 0;
}
.twotwenty-lr-accordion .twotwenty-accordion-panel[hidden] { display: none; }

.twotwenty-lr-accordion .twotwenty-accordion-subgrid { display: flex; flex-direction: column; }
.twotwenty-lr-accordion .twotwenty-accordion-subsection { padding: 12px 20px 8px; border-bottom: 1px solid var(--220-border-cool); }
.twotwenty-lr-accordion .twotwenty-accordion-subsection:last-child { border-bottom: none; }
.twotwenty-lr-accordion .twotwenty-accordion-subtitle {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--220-gold-dark);
	margin: 0 0 6px;
}
.twotwenty-lr-accordion .twotwenty-accordion-subcount {
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	color: var(--220-text-muted);
	margin-left: 6px;
	font-size: 10.5px;
}

.twotwenty-lr-accordion .twotwenty-accordion-rows,
.twotwenty-lr-accordion > .twotwenty-accordion-panel > .twotwenty-accordion-rows {
	list-style: none;
	padding: 0;
	margin: 0;
	display: block;
	border: 0;
	border-radius: 0;
}
.twotwenty-lr-accordion .twotwenty-lr-acc-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 20px;
	border-bottom: 1px solid var(--220-border-cool);
	background: #fff;
	flex-wrap: wrap;
}
.twotwenty-lr-accordion .twotwenty-lr-acc-row:last-child { border-bottom: none; }
.twotwenty-lr-acc-row-name { font-size: 13.5px; font-weight: 600; text-align: left; color: var(--220-navy); flex: 1; min-width: 0; margin: 0; }
.twotwenty-lr-acc-row-contacts { display: flex; align-items: center; gap: 70px; flex-shrink: 0; flex-wrap: wrap; }
.twotwenty-lr-acc-row-phone {
	font-size: 14px;
	color: var(--220-text-2);
	display: flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}
.twotwenty-lr-acc-row-phone svg { color: var(--220-gold); flex-shrink: 0; }
.twotwenty-lr-acc-row-phone a { color: var(--220-text-2); text-decoration: none; }
.twotwenty-lr-acc-row-phone a:hover { text-decoration: underline; }
.twotwenty-lr-acc-row-website a {
	font-size: 14px;
	font-weight: 600;
	color: var(--220-gold-dark);
	text-decoration: none;
	white-space: nowrap;
}
.twotwenty-lr-acc-row-website a:hover { text-decoration: underline; }
.twotwenty-lr-acc-row-desc {
	font-size: 11.5px;
	color: var(--220-text-muted);
	line-height: 1.55;
	padding: 0 20px 11px;
	font-weight: 300;
	margin: 0;
}

.twotwenty-lr-accordion .twotwenty-no-results {
	padding: 14px 20px;
	margin: 0;
	color: var(--220-text-muted);
	font-size: 12.5px;
	font-style: italic;
}

@media (max-width: 600px) {
	.twotwenty-lr-accordion .twotwenty-lr-acc-row { flex-direction: column; align-items: flex-start; gap: 6px; }
	.twotwenty-lr-acc-row-contacts { flex-direction: column; align-items: flex-start; gap: 4px; }
}