/* ==========================================================================
   uiux.pics — Shared site header & footer
   Default theme: light. Dark mode opt-in via body[data-theme="dark"].
   ========================================================================== */

/* ── Global background (tied to light/dark toggle) ───────────────────────── */

:root {
	--uiux-bg: #fff;
}

body[data-theme="dark"] {
	--uiux-bg: #181818;
	color: rgba(255, 255, 255, 0.85);
}

body {
	background: var(--uiux-bg);
}

/* ── Site header ──────────────────────────────────────────────────────────── */

.uiux-site-header {
	width: 100%;
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--uiux-bg);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	color: #111;
}

.uiux-site-header__inner {
	max-width: 1640px;
	margin: 0 auto;
	padding: 0 1.25rem;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

/* ── Logo ─────────────────────────────────────────────────────────────────── */

.uiux-site-header__logo {
	display: block;
	line-height: 0;
	text-decoration: none;
	flex-shrink: 0;
	margin-right: auto;
}

/* Vector header logo — inline SVG scales without raster re-sampling. */
.uiux-logo__svg {
	display: block;
	height: 22px;
	width: auto;
	flex-shrink: 0;
	color: #111;
}

.uiux-logo__svg path,
.uiux-logo__svg g {
	fill: currentColor;
}

body[data-theme="dark"] .uiux-logo__svg {
	color: rgba(255, 255, 255, 0.9);
}

/* ── Day / night pill toggle ──────────────────────────────────────────────── */

/*
 * Layout: [moon-icon] [knob] [sun-icon]
 * Light (default): knob right, over the sun icon.
 * Dark:            knob left, over the moon icon.
 */

.uiux-theme-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	width: 56px;
	height: 28px;
	padding: 0 6px;
	border: none;
	border-radius: 999px;
	background: #e2e2e2;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.2s ease;
	justify-content: space-between;
	box-sizing: border-box;
}

.uiux-theme-toggle:hover {
	background: #d6d6d6;
}

.uiux-theme-toggle__icon {
	position: relative;
	z-index: 1;
	flex-shrink: 0;
	transition: color 0.2s ease;
	pointer-events: none;
}

.uiux-theme-toggle__knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
	transition: transform 0.22s ease;
	pointer-events: none;
}

/* Light (default): knob sits right (over sun), sun bright, moon dim */
.uiux-theme-toggle__knob {
	transform: translateX(28px);
}
.uiux-theme-toggle__icon--moon {
	color: rgba(0, 0, 0, 0.3);
}
.uiux-theme-toggle__icon--sun {
	color: rgba(0, 0, 0, 0.7);
}

/* ── Primary nav ──────────────────────────────────────────────────────────── */

.uiux-site-header__nav {
	display: flex;
	align-items: center;
}

.uiux-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.uiux-nav__list li {
	list-style: none;
}

.uiux-nav__list a {
	display: inline-flex;
	align-items: center;
	padding: 0.375rem 0.75rem;
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--onest, inherit);
	font-size: 0.875rem;
	font-weight: 500;
	color: rgba(0, 0, 0, 0.55);
	text-decoration: none;
	transition: color 0.15s ease, background 0.15s ease;
}

.uiux-nav__list a:hover,
.uiux-nav__list .current-menu-item > a,
.uiux-nav__list .current_page_item > a {
	color: #111;
	background: rgba(0, 0, 0, 0.06);
}

/* ── Site footer ──────────────────────────────────────────────────────────── */

.uiux-site-footer {
	width: 100%;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	margin-top: auto;
}

.uiux-site-footer__inner {
	max-width: 1440px;
	margin: 0 auto;
	padding: 1.5rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 1rem;
	flex-wrap: wrap;
}

.uiux-footer-legal {
	display: flex;
	align-items: center;
}

.uiux-footer-legal__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 0.125rem;
	flex-wrap: wrap;
}

.uiux-footer-legal__list li {
	list-style: none;
}

.uiux-footer-legal__list a {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	font-size: 0.8125rem;
	color: rgba(0, 0, 0, 0.4);
	text-decoration: none;
	border-radius: 6px;
	transition: color 0.15s ease, background 0.15s ease;
}

.uiux-footer-legal__list a:hover {
	color: rgba(0, 0, 0, 0.7);
	background: rgba(0, 0, 0, 0.05);
}

/* ── Dark theme ───────────────────────────────────────────────────────────── */

body[data-theme="dark"] .uiux-site-header {
	background: var(--uiux-bg);
	border-bottom-color: rgba(255, 255, 255, 0.07);
	color: rgba(255, 255, 255, 0.85);
}

body[data-theme="dark"] .uiux-theme-toggle {
	background: #3a3a3a;
}

body[data-theme="dark"] .uiux-theme-toggle:hover {
	background: #444;
}

/* Dark: knob sits left (over moon), moon bright, sun dim */
body[data-theme="dark"] .uiux-theme-toggle__knob {
	transform: translateX(0);
}
body[data-theme="dark"] .uiux-theme-toggle__icon--moon {
	color: rgba(255, 255, 255, 0.85);
}
body[data-theme="dark"] .uiux-theme-toggle__icon--sun {
	color: rgba(255, 255, 255, 0.3);
}

body[data-theme="dark"] .uiux-nav__list a {
	color: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .uiux-nav__list a:hover,
body[data-theme="dark"] .uiux-nav__list .current-menu-item > a,
body[data-theme="dark"] .uiux-nav__list .current_page_item > a {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .uiux-site-footer {
	border-top-color: rgba(255, 255, 255, 0.07);
}

body[data-theme="dark"] .uiux-footer-legal__list a {
	color: rgba(255, 255, 255, 0.35);
}

body[data-theme="dark"] .uiux-footer-legal__list a:hover {
	color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.06);
}

/* ── Header auth controls ─────────────────────────────────────────────────── */

.uiux-header-login {
	padding: 0.3rem 0.9rem;
	border: 1.5px solid rgba(0, 0, 0, 0.18);
	border-radius: 999px;
	background: transparent;
	font-family: var(--wp--preset--font-family--onest, inherit);
	font-size: 0.825rem;
	font-weight: 600;
	color: #333;
	cursor: pointer;
	flex-shrink: 0;
	letter-spacing: 0.01em;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.uiux-header-login:hover {
	border-color: rgba(0, 0, 0, 0.38);
	background: rgba(0, 0, 0, 0.04);
	color: #111;
}

.uiux-header-account {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.08);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #555;
	flex-shrink: 0;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
	border: none;
}

.uiux-header-account:hover {
	background: rgba(0, 0, 0, 0.14);
	color: #111;
}

/* ── Account dropdown ─────────────────────────────────────────────────────── */

.uiux-header-account-wrap {
	position: relative;
	flex-shrink: 0;
}

.uiux-header-dropdown {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	min-width: 140px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.09);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
	padding: 0.3rem;
	display: flex;
	flex-direction: column;
	gap: 1px;
	/* hidden by default */
	opacity: 0;
	pointer-events: none;
	transform: translateY(-6px) scale(0.97);
	transform-origin: top right;
	transition: opacity 0.15s ease, transform 0.15s ease;
	z-index: 200;
}

.uiux-header-account-wrap.is-open .uiux-header-dropdown {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.uiux-header-account-wrap.is-open .uiux-header-account {
	background: rgba(0, 0, 0, 0.14);
	color: #111;
}

.uiux-header-dropdown__item {
	display: block;
	padding: 0.5rem 0.75rem;
	border-radius: 8px;
	font-size: 0.855rem;
	font-weight: 500;
	color: #222;
	text-decoration: none;
	transition: background 0.12s ease, color 0.12s ease;
	white-space: nowrap;
}

.uiux-header-dropdown__item:hover {
	background: rgba(0, 0, 0, 0.06);
	color: #000;
}

.uiux-header-dropdown__item--logout {
	color: #888;
}

.uiux-header-dropdown__item--logout:hover {
	background: #fff2f2;
	color: #c0392b;
}

body[data-theme="dark"] .uiux-header-login {
	border-color: rgba(255, 255, 255, 0.22);
	color: rgba(255, 255, 255, 0.8);
}

body[data-theme="dark"] .uiux-header-login:hover {
	border-color: rgba(255, 255, 255, 0.5);
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

body[data-theme="dark"] .uiux-header-account {
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.75);
}

body[data-theme="dark"] .uiux-header-account:hover,
body[data-theme="dark"] .uiux-header-account-wrap.is-open .uiux-header-account {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
}

body[data-theme="dark"] .uiux-header-dropdown {
	background: #2c2c2e;
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .uiux-header-dropdown__item {
	color: rgba(255, 255, 255, 0.85);
}

body[data-theme="dark"] .uiux-header-dropdown__item:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

body[data-theme="dark"] .uiux-header-dropdown__item--logout {
	color: rgba(255, 255, 255, 0.4);
}

body[data-theme="dark"] .uiux-header-dropdown__item--logout:hover {
	background: rgba(231, 76, 60, 0.15);
	color: #e74c3c;
}

/* ── Generic page (Privacy Policy, etc.) ─────────────────────────────────── */

.uiux-page {
	min-height: calc(100vh - 60px);
	box-sizing: border-box;
}

.uiux-page__inner {
	max-width: 720px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.uiux-page__header {
	padding-bottom: 1.5rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.uiux-page__title {
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	margin: 0;
	color: inherit;
}

/* Prose content — headings, paragraphs, links, lists */
.uiux-page__content {
	font-size: 0.95rem;
	line-height: 1.75;
	color: inherit;
}

.uiux-page__content h2,
.uiux-page__content h3,
.uiux-page__content h4 {
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 2em 0 0.5em;
}

.uiux-page__content h2 { font-size: 1.25rem; }
.uiux-page__content h3 { font-size: 1.05rem; }
.uiux-page__content h4 { font-size: 0.95rem; }

.uiux-page__content p {
	margin: 0 0 1em;
}

.uiux-page__content a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: rgba(0, 0, 0, 0.3);
	transition: text-decoration-color 0.15s ease;
}

.uiux-page__content a:hover {
	text-decoration-color: currentColor;
}

.uiux-page__content ul,
.uiux-page__content ol {
	padding-left: 1.5rem;
	margin: 0 0 1em;
}

.uiux-page__content li {
	margin-bottom: 0.4em;
}

/* Dark mode */
body[data-theme="dark"] .uiux-page__header {
	border-bottom-color: rgba(255, 255, 255, 0.07);
}

body[data-theme="dark"] .uiux-page__content a {
	text-decoration-color: rgba(255, 255, 255, 0.3);
}

/* ── Account page ─────────────────────────────────────────────────────────── */

.uiux-account {
	min-height: calc(100vh - 60px);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	box-sizing: border-box;
}

.uiux-account__inner {
	width: 100%;
	max-width: 560px;
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

.uiux-account__hero {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.uiux-account__avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.07);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #888;
	flex-shrink: 0;
}

.uiux-account__name {
	font-size: 1.4rem;
	font-weight: 700;
	margin: 0 0 0.2rem;
	letter-spacing: -0.02em;
	color: inherit;
}

.uiux-account__email {
	font-size: 0.875rem;
	color: #888;
	margin: 0;
}

.uiux-account__stats {
	display: flex;
	gap: 1.5rem;
}

.uiux-account__stat {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.uiux-account__stat-value {
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
}

.uiux-account__stat-label {
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #aaa;
}

.uiux-account__section {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.uiux-account__section-title {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #aaa;
	margin: 0;
}

.uiux-account__placeholder {
	border: 1.5px dashed rgba(0, 0, 0, 0.12);
	border-radius: 14px;
	padding: 2rem 1.5rem;
	text-align: center;
}

.uiux-account__placeholder p {
	font-size: 0.9rem;
	color: #bbb;
	margin: 0;
}

.uiux-account__logout {
	display: inline-block;
	font-size: 0.85rem;
	color: #bbb;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.15s ease;
}

.uiux-account__logout:hover {
	color: #c0392b;
}

/* Account page — dark mode */

body[data-theme="dark"] .uiux-account__avatar {
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.4);
}

body[data-theme="dark"] .uiux-account__email {
	color: rgba(255, 255, 255, 0.4);
}

body[data-theme="dark"] .uiux-account__stat-label {
	color: rgba(255, 255, 255, 0.3);
}

body[data-theme="dark"] .uiux-account__section-title {
	color: rgba(255, 255, 255, 0.3);
}

body[data-theme="dark"] .uiux-account__placeholder {
	border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .uiux-account__placeholder p {
	color: rgba(255, 255, 255, 0.25);
}

body[data-theme="dark"] .uiux-account__logout:hover {
	color: #e74c3c;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media ( max-width: 600px ) {
	.uiux-site-header__inner {
		padding: 0 0.875rem;
		height: 52px;
	}

	.uiux-site-footer__inner {
		padding: 1.25rem 0.875rem;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.375rem;
	}
}
