/* YouthMonk theme toggle (Figma "Toggle/Theme" 88:746) + dark-mode basics that belong to it. Built by ym-theme.js. */
html[data-theme="dark"] { color-scheme: dark; }

/* Header logo: the black SVG rendered pure white (#FFF, same as ym-logo-white.svg). CSS, so no flash before the JS runs. */
html[data-theme="dark"] .elementor-location-header img[src*="ym-logo-dark"] { filter: brightness(0) invert(1); }

.ym-theme-toggle {
	--ym-tt-border: #E4E4DF; --ym-tt-muted: #5C5C5C; --ym-tt-hover: #0A0A0A; --ym-tt-focus: #0A0A0A;
	display: inline-flex; flex: none; align-items: center; gap: 2px; box-sizing: border-box;
	width: 84px; height: 46px; padding: 4px;
	border: 1px solid var(--ym-tt-border); border-radius: 999px; background: transparent;
}
html[data-theme="dark"] .ym-theme-toggle { --ym-tt-border: #2A2A2A; --ym-tt-muted: #A3A3A3; --ym-tt-hover: #FFFFFF; --ym-tt-focus: #D4F36B; }
.ym-theme-toggle button {
	position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 36px; height: 36px; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: var(--ym-tt-muted);
	box-shadow: none; cursor: pointer; transition: background-color 200ms ease, color 200ms ease;
}
.ym-theme-toggle button:hover { background: transparent; color: var(--ym-tt-hover); }
.ym-theme-toggle button[aria-pressed="true"] { background: #D4F36B; color: #0A0A0A; }
.ym-theme-toggle button:focus { outline: none; }
.ym-theme-toggle button:focus-visible { outline: 2px solid var(--ym-tt-focus); outline-offset: 2px; }
.ym-theme-toggle svg { display: block; flex: none; pointer-events: none; }
/* 44px touch targets without changing the 36px look: grow outward and vertically only, so the segments never overlap. */
@media (pointer: coarse) {
	.ym-theme-toggle button::before { content: ""; position: absolute; top: -4px; bottom: -4px; left: -1px; right: -1px; }
	.ym-theme-toggle button:first-child::before { left: -5px; }
	.ym-theme-toggle button:last-child::before { right: -5px; }
}

/* Small desktops: the toggle (108px) would wrap the nav onto two lines below 1380px, so the phone number gives way,
   as it already does on tablet (the floating actions still offer it). */
@media (min-width: 1025px) and (max-width: 1379px) {
	.elementor-location-header .ym-header-inner :has(> a[href^="tel:"]):has(~ .ym-btn) { display: none; }
}

/* Tablet/mobile: inside the nav widget right before the burger, 12px from it (widget gap is 20px). The widget is a
   column (Elementor) and the burger is pushed right with an !important auto margin, so both are overridden here. */
@media (max-width: 1024px) {
	.elementor-location-header .ym-header-inner .elementor-widget-nav-menu:has(> .ym-theme-toggle) { flex-direction: row; align-items: center; }
	.elementor-location-header .ym-theme-toggle { margin: -5px -8px -5px auto; } /* -5px: the 46px pill keeps the 36px burger row height */
	.elementor-location-header .ym-theme-toggle + .elementor-menu-toggle { margin-inline-start: 0 !important; }
}

/* Theme change cross-fade: only while ym-theme.js holds .ym-theme-fading after a click (never on load). */
@media (prefers-reduced-motion: no-preference) {
	html.ym-theme-fading,
	html.ym-theme-fading :is(body, .ym-section, .ym-header, .elementor-location-footer, .ym-mega) {
		transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease !important;
	}
}
