/* YECHAN brand layer for ViTransfer (server.yechandocolor.com)
 * Injected by nginx (sub_filter) after ViTransfer's own styles: nothing inside
 * the ViTransfer container is modified, so this survives ViTransfer updates.
 * Look: a NEGATIVE of yechandocolor.com: black page, white type, #454545 rules,
 *       and the logo square turns white with black text.
 * ViTransfer uses shadcn/Tailwind HSL variables; ":root:root" / ":root.dark"
 * outrank its ":root" and ".dark" rules whatever the load order.
 */
/* Fonts are served from this same server (/yechan-brand/fonts/): ViTransfer's security
 * policy blocks Google Fonts, and self-hosting is faster and more private anyway. */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400; font-display: swap;
	src: url("/yechan-brand/fonts/inter-tight-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400; font-display: swap;
	src: url("/yechan-brand/fonts/inter-tight-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 500; font-display: swap;
	src: url("/yechan-brand/fonts/inter-tight-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 500; font-display: swap;
	src: url("/yechan-brand/fonts/inter-tight-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 700; font-display: swap;
	src: url("/yechan-brand/fonts/inter-tight-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 700; font-display: swap;
	src: url("/yechan-brand/fonts/inter-tight-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 800; font-display: swap;
	src: url("/yechan-brand/fonts/inter-tight-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 800; font-display: swap;
	src: url("/yechan-brand/fonts/inter-tight-latin-ext-800-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 900; font-display: swap;
	src: url("/yechan-brand/fonts/inter-tight-latin-900-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 900; font-display: swap;
	src: url("/yechan-brand/fonts/inter-tight-latin-ext-900-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root:root,
:root.dark,
:root:root.dark {
	--background: 0 0% 0%;
	--foreground: 0 0% 100%;
	--card: 0 0% 4%;
	--card-foreground: 0 0% 100%;
	--popover: 0 0% 6%;
	--popover-foreground: 0 0% 100%;

	/* accent: blue / beige -> white on black.
	 * ViTransfer writes the admin "accent color" setting inline on <html>;
	 * !important is the only way a stylesheet beats an inline value. */
	--primary: 0 0% 100% !important;
	--primary-foreground: 0 0% 0%;
	--primary-visible: 0 0% 22% !important;
	--ring: 0 0% 100% !important;
	--accent: 0 0% 12%;
	--accent-foreground: 0 0% 100% !important;
	--secondary: 0 0% 10%;
	--secondary-foreground: 0 0% 100%;
	--muted: 0 0% 10%;
	--muted-foreground: 0 0% 54%;   /* #8a8a8a: readable secondary text on black */
	--border: 0 0% 27%;            /* #454545 = negative of the site's #bababa */
	--input: 0 0% 27%;

	/* square, like the website */
	--radius: 0rem;
	--radius-sm: 0rem;
	--radius-lg: 0rem;

	--logo-bg: #000000;
	--logo-panel: #000000;
	--logo-wedge: #ffffff;

	--y-font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
	/* Logo square = the website's formula: 16% of the window width (max 248px) */
	--y-mark: min(248px, max(48px, calc((100vw - 48px) * 0.16)));
}

/* ---------- Type ---------- */
html body,
body button,
body input,
body select,
body textarea {
	font-family: var(--y-font) !important;
}

body h1, body h2, body h3,
body [class*="CardTitle"],
body th {
	font-family: var(--y-font) !important;
	font-weight: 800 !important;
	text-transform: uppercase;
	letter-spacing: -0.005em;
}

body button,
body a[role="button"],
body [data-slot="button"] {
	font-weight: 800 !important;
	text-transform: uppercase;
	letter-spacing: .02em;
}
body label {
	text-transform: uppercase;
	font-weight: 700 !important;
	font-size: 12px !important;
	letter-spacing: .04em;
	color: hsl(var(--muted-foreground));
}

/* ---------- Square everything (Tailwind rounded-* utilities included) ---------- */
body *:not(.rounded-full):not([class*="avatar"]):not([role="slider"]),
body *::before,
body *::after {
	border-radius: 0 !important;
}

/* ---------- Logo: the site's square block, as a negative ----------
 * A white SQUARE (same proportion as on yechandocolor.com) with black YECHAN
 * centred near the bottom. ViTransfer's logo file (147x52, white on transparent,
 * lettering x 7-139 / y 8-43) is inverted and placed so the lettering spans 78%
 * of the square, 9% above its bottom edge.
 * Selectors are deliberately heavy ([title][title], [alt][alt]) to outrank the
 * existing nginx snippet "hide-vitransfer-branding.conf" (logo height 52px). */
html body a[title="ViTransfer"][title]:has(> img[alt^="Company"]) {
	--s: var(--y-mark);
	position: relative;
	display: block !important;
	width: var(--s) !important;
	max-width: none !important;
	height: var(--s) !important;
	flex: none !important;
	background: #fff;
	overflow: hidden;
	padding: 0 !important;
}
html body a[title="ViTransfer"][title] > img[alt^="Company"][alt] {
	position: absolute !important;
	left: 50%;
	bottom: calc(var(--s) * 0.043);
	transform: translateX(-50%);
	width: calc(var(--s) * 0.862) !important;   /* 0.78 x 147/133 */
	height: auto !important;
	max-width: none !important;
	max-height: none !important;
	padding: 0 !important;
	background: none !important;
	filter: invert(1);
}

/* The video itself: pure black surround, no rounding, nothing tinting it */
body video {
	background: #000;
	filter: none !important;
}

/* ---------- Client onboarding tour (driver.js "Welcome" popup) ----------
 * Default is a white rounded box: make it black, white type, #454545 rule. */
body .driver-popover {
	background: #000 !important;
	color: #fff !important;
	border: 1px solid #454545;
	box-shadow: 0 0 0 1px #000, 0 20px 60px rgba(0, 0, 0, .6) !important;
	font-family: var(--y-font) !important;
}
body .driver-popover-title {
	font-family: var(--y-font) !important;
	font-weight: 800 !important;
	text-transform: uppercase;
	font-size: 16px !important;
	color: #fff !important;
}
body .driver-popover-description { color: #d0d0d0 !important; font-family: var(--y-font) !important; }
body .driver-popover-progress-text { color: #8a8a8a !important; }
body .driver-popover-close-btn { color: #8a8a8a !important; }
body .driver-popover-close-btn:hover { color: #fff !important; }
body .driver-popover-navigation-btns button {
	background: transparent !important;
	color: #fff !important;
	border: 1px solid #454545 !important;
	text-shadow: none !important;
	font-family: var(--y-font) !important;
	font-weight: 800 !important;
	text-transform: uppercase;
	font-size: 12px !important;
	padding: 6px 12px !important;
}
body .driver-popover-navigation-btns .driver-popover-next-btn {
	background: #fff !important;
	color: #000 !important;
	border-color: #fff !important;
}
body .driver-popover-navigation-btns button:hover { border-color: #fff !important; }
/* arrow follows the black box */
body .driver-popover-arrow-side-left { border-left-color: #000 !important; }
body .driver-popover-arrow-side-right { border-right-color: #000 !important; }
body .driver-popover-arrow-side-top { border-top-color: #000 !important; }
body .driver-popover-arrow-side-bottom { border-bottom-color: #000 !important; }

/* ---------- Room for the website-size logo ----------
 * Desktop sidebar (normally 240px, class w-60): widen to logo + 24px each side,
 * logo 24px from the top-left corner like on yechandocolor.com. */
@media (min-width: 768px) {
	/* any width class (w-60 open, narrower if it was ever collapsed): always open */
	html body aside:has(a[title="ViTransfer"]) {
		width: calc(var(--y-mark) + 48px) !important;
	}
	html body aside > div:first-child:has(a[title="ViTransfer"]) {
		position: relative;
		height: auto !important;
		min-height: 0 !important;
		padding: 24px !important;
	}
	/* No collapsing sidebar: it doesn't fit the website-size logo */
	/* matched by position (the button beside the logo), not by its label,
	 * because the label is translated (FR, DE, ...) */
	html body aside > div:first-child:has(a[title="ViTransfer"]) > button,
	html body aside button[aria-label="Collapse sidebar"],
	html body aside button[aria-label="Expand sidebar"] {
		display: none !important;
	}
}
/* Phones/tablets: the 56px top bar grows to hold the logo (69px at 500px wide, like the site) */
@media (max-width: 767px) {
	html body div.h-14:has(> a[title="ViTransfer"]) {
		height: auto !important;
		padding-top: 8px !important;
		padding-bottom: 8px !important;
	}
}
