/*
 * MX Social — readability fixes shared by every page (loaded from social/partials/top-nav, after mx-social-mobile.css).
 * Contrast (WCAG AA: 4.5:1 for normal text), form-control fonts, filter checkbox size, minimum text size, section spacing.
 * Colour fixes for light surfaces are scoped to the light theme; the dark theme keeps the lime accents.
 * They use !important because the older layers (mx-social-pro.css, inline page styles) set these colours with !important.
 */

:root {
	--mx-read-green: #3f6212;      /* 7.6:1 on white: links and labels on light surfaces */
	--mx-read-green-soft: #4d7c0f; /* 5.4:1 on white: secondary labels */
	--mx-read-blue: #0369a1;       /* 5.9:1 on white: breadcrumb and contact links */
}

/* Track sheet title: the hero card is always dark, the title was #111827 on #0f172a (1:1). */
body.mx-social-app .detail-hero-overlay h1 {
	color: #fff;
	font-size: clamp(1.75rem, 6vw, 2.25rem);
	line-height: 1.15;
	margin: 2px 0 10px;
	overflow-wrap: anywhere;
}

/* Form controls use the site font (WebKit fell back to Times, Chromium to Arial). Size stays as set by each page. */
body.mx-social-app button,
body.mx-social-app input,
body.mx-social-app select,
body.mx-social-app textarea {
	font-family: inherit;
}

/* Filter and form checkboxes: 22px instead of 12px, with the whole label as touch area. */
body.mx-social-app #mxFiltersForm input[type="checkbox"],
body.mx-social-app .mx-check input[type="checkbox"] {
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	margin: 0 8px 0 0;
	accent-color: var(--mx-read-green);
}

body.mx-social-app #mxFiltersForm .mx-filters__checks label,
body.mx-social-app #mxFiltersForm .mx-filters__services label {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
}

/* Minimum text size 13px (several labels were 10.9-11.5px). */
body.mx-social-app #mapLegendStats,
body.mx-social-app .mx-pro-tags span,
body.mx-social-app .ad-label,
body.mx-social-app .track-tag,
body.mx-social-app .track-item__reviews,
body.mx-social-app .track-rating__count,
body.mx-social-app .mx-managed-badge--sm,
body.mx-social-app .spec-label,
body.mx-social-app .tag-list .tag,
body.mx-social-app #pitchWordCount,
body.mx-social-app .mx-office-brand__meta span {
	font-size: 0.8125rem;
}

/* Track sheet: space between the map/back actions and "Nearby tracks", and between the manager link and "Contacts". */
body.mx-social-app .detail-card > .actions + .block,
body.mx-social-app .detail-card > .manage-cta + .block {
	margin-top: 24px;
}

body.mx-social-app .detail-card > .manage-cta {
	margin-bottom: 8px;
}

/* ---- Light theme only: lime and mid-green text on light surfaces ---- */
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-howto__more > summary,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-howto__link,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) #track-reviews .mx-reviews-head h2,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-review-card__avatar,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .track-item__reviews,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-book-back,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-pill-indicative,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-pill-free,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-btn-soft,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .btn.btn-soft,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .italy-map-hint {
	color: var(--mx-read-green) !important;
}

/* Rating average next to the stars in track lists (lime on white). */
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .track-item .track-rating__avg {
	color: var(--mx-read-green) !important;
}

/* D13 — "Social" in the header and footer wordmarks: #65a30d was 3.1:1 on white and 2.9:1 on the footer, now 5.4:1. */
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-pro-wordmark span,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-pro-footer-brand span {
	color: var(--mx-read-green-soft) !important;
}

/* D11 — Filled stars on light cards: pale yellow #facc15 was 1.5:1 on white; amber #d97706 is 3.2:1 (3:1 is the bar
   for graphics). The dark track hero and the black rating summary keep the bright yellow. */
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-stars > span.is-on {
	color: #d97706 !important;
	text-shadow: none !important;
}

html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .detail-hero .mx-stars > span.is-on,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-reviews-summary .mx-stars > span.is-on {
	color: #facc15 !important;
}

/* Inactive language chip and breadcrumb/contact links. */
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .lang-switcher .lang-chip:not(.is-active) {
	color: #4b5563 !important;
}

html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .seo-crumbs a,
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .contact-value a {
	color: var(--mx-read-blue) !important;
}

/* "Verified by the manager" badge on the dark hero: white on a darker green (3.0:1 -> 5.5:1). */
body.mx-social-app .mx-managed-badge--hero {
	background: #047857;
}

/* Dark theme: the light office-brand card (booking page) kept the light theme-dark text colour (white on white). */
html.theme-dark .mx-office-brand:not(.mx-office-brand--dark) .mx-office-brand__meta strong,
body.theme-dark .mx-office-brand:not(.mx-office-brand--dark) .mx-office-brand__meta strong {
	color: #111827 !important;
}

html.theme-dark .mx-office-brand:not(.mx-office-brand--dark) .mx-office-brand__meta span,
body.theme-dark .mx-office-brand:not(.mx-office-brand--dark) .mx-office-brand__meta span {
	color: #4b5563 !important;
}

/* ==== Desktop round (D2, D6, D7, D8) ==== */

/* D2 — Dark theme: badges and counters keep their own light background, so lime text on it was 1.44:1.
   They get a dark tinted background instead (lime on #1c2a12 is about 11:1). Applies to phones too. */
html.theme-dark body.mx-social-app .badge,
html.theme-dark body.mx-social-app .region-item-count,
html.theme-dark body.mx-social-app .sidebar-count,
html.theme-dark body.mx-social-app .track-tag,
body.mx-social-app.theme-dark .badge,
body.mx-social-app.theme-dark .region-item-count,
body.mx-social-app.theme-dark .sidebar-count,
body.mx-social-app.theme-dark .track-tag {
	background: #1c2a12 !important;
	border-color: rgba(163, 230, 53, 0.45) !important;
	color: #bef264 !important;
}

/* Dark theme: empty stars (1.69:1), blue links on dark cards (3.5:1), search clear button (3.1:1). */
html.theme-dark body.mx-social-app .mx-stars > span:not(.is-on),
body.mx-social-app.theme-dark .mx-stars > span:not(.is-on) {
	color: #9ca3af !important;
}

html.theme-dark body.mx-social-app .seo-crumbs a,
html.theme-dark body.mx-social-app .contact-value a,
body.mx-social-app.theme-dark .seo-crumbs a,
body.mx-social-app.theme-dark .contact-value a {
	color: #7dd3fc !important;
}

html.theme-dark body.mx-social-app .mx-pro-search-clear,
body.mx-social-app.theme-dark .mx-pro-search-clear {
	color: #d1d5db !important;
}

/* Dark theme, "manage your track" page: module cards and contact buttons had a fixed white background
   with theme text (phone number white on white). */
html.theme-dark body.mx-social-app .mx-mod,
html.theme-dark body.mx-social-app .mx-contact-link,
body.mx-social-app.theme-dark .mx-mod,
body.mx-social-app.theme-dark .mx-contact-link {
	background: #1b2129 !important;
	border-color: #374151 !important;
}

html.theme-dark body.mx-social-app .mx-mod strong,
body.mx-social-app.theme-dark .mx-mod strong {
	color: #7dd3fc !important;
}

html.theme-dark body.mx-social-app .mx-mod span,
html.theme-dark body.mx-social-app .mx-contact-link small,
body.mx-social-app.theme-dark .mx-mod span,
body.mx-social-app.theme-dark .mx-contact-link small {
	color: #d1d5db !important;
}

/* Light theme, same page: module names in #0284c7 were 3.99:1 on their pale card. */
html:not(.theme-dark) body.mx-social-app:not(.theme-dark) .mx-mod strong {
	color: var(--mx-read-blue) !important;
}

/* D6 — Minimum text size 13px on every screen size (counters, legend, language, theme, notes, small labels). */
body.mx-social-app .ad-text,
body.mx-social-app .ad-cta,
body.mx-social-app .badge,
body.mx-social-app .region-item-count,
body.mx-social-app .sidebar-count,
body.mx-social-app .mx-near-me-status,
body.mx-social-app .mx-near-me__copy small,
body.mx-social-app .italy-map-legend-title,
body.mx-social-app .italy-map-legend-item span,
body.mx-social-app .italy-map-hint,
body.mx-social-app #italyMapToggleBtn,
body.mx-social-app .theme-toggle-label,
body.mx-social-app .lang-switcher .lang-chip,
body.mx-social-app .mx-pro-login-link,
body.mx-social-app .mx-pro-stat span,
body.mx-social-app .mx-pro-socials a,
body.mx-social-app .mx-pro-footer-bottom span,
body.mx-social-app .mx-pro-featured-meta span,
body.mx-social-app .mx-fav__text,
body.mx-social-app .section-title,
body.mx-social-app .seo-eyebrow,
body.mx-social-app .chip,
body.mx-social-app .mx-managed-badge--hero,
body.mx-social-app .mx-book-slot__cta,
body.mx-social-app .contact-label,
body.mx-social-app .track-meta-line,
body.mx-social-app .track-rating__avg,
body.mx-social-app .mx-review-sort-btn,
body.mx-social-app .mx-reviews-summary__meta span,
body.mx-social-app .mx-pill,
body.mx-social-app .mx-help,
body.mx-social-app .mx-field label,
body.mx-social-app .mx-filters__note,
body.mx-social-app #mx-newsletter p,
body.mx-social-app #mx-contact-form p,
body.mx-social-app .mx-mod strong,
body.mx-social-app .mx-mod span,
body.mx-social-app .mx-contact-link small,
body.mx-social-app .mx-word-count,
body.mx-social-app .mx-field-error,
body.mx-social-app .detail-hero-overlay .seo-eyebrow,
body.mx-social-app #mapLegendStats,
body.mx-social-app .mx-reviews-head h2,
body.mx-social-app .nearby-list .muted,
body.mx-social-app .seo-stats span,
body.mx-social-app .mx-contact__aside dt,
body.mx-social-app .mx-pro-directory-results span,
body.mx-social-app .mx-pro-directory-regions span,
body.mx-social-app #mx-hours li > span {
	/* !important on purpose: mx-social-mobile.css sets a 12px floor with !important on phones; this file loads after it. */
	font-size: 13px !important;
}

/* D7 — Keyboard focus: a two-tone ring (white inside, dark green outside) that shows on light and dark
   surfaces alike. Only for keyboard focus (:focus-visible), mouse clicks keep the current look. */
body.mx-social-app :focus-visible {
	outline: 3px solid #fff !important;
	outline-offset: 0 !important;
	box-shadow: 0 0 0 6px #3f6212 !important;
}

html.theme-dark body.mx-social-app :focus-visible,
body.mx-social-app.theme-dark :focus-visible {
	box-shadow: 0 0 0 6px #bef264 !important;
	outline-color: #0b0f14 !important;
}

/* D8 — Comfortable line length (about 70 characters) for running text on wide screens. */
body.mx-social-app .faq-block p,
body.mx-social-app .seo-lede,
body.mx-social-app section.panel-main > p,
body.mx-social-app .mx-help,
body.mx-social-app .mx-pro-directory > p {
	/* About 70-75 characters: average glyph width is close to 0.45em, "ch" (the zero) is wider and let lines reach 100+. */
	max-width: 33em;
}

/* Booking help text is set at 13px, so it needs a narrower box for the same number of characters. */
body.mx-social-app .mx-book .mx-help {
	max-width: 30em;
}

/* "Recently updated" list: names in columns instead of one full-width line each. */
body.mx-social-app .mx-pro-directory-recent {
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 10px 16px;
}
