/* Portal chrome. Colours come from --rwh-* set by the branding stylesheet. */
/* Drop shadows below are fixed. They are not theme tokens. */

.rwh-icon {
	display: block;
	flex: 0 0 auto;
	height: 18px;
	width: 18px;
}

body.rwh-portal {
	background: var(--rwh-surface-2);
	color: var(--rwh-text);
}

body.rwh-portal #wpadminbar,
body.rwh-portal #adminmenumain,
body.rwh-portal #adminmenuwrap,
body.rwh-portal #wpfooter,
body.rwh-portal .update-nag {
	display: none;
}

body.rwh-portal #wpcontent,
body.rwh-portal #wpfooter,
body.rwh-portal.folded #wpcontent {
	margin-left: 0;
	padding-left: 0;
}

body.rwh-portal #wpwrap,
body.rwh-portal #wpcontent,
body.rwh-portal #wpbody,
body.rwh-portal #wpbody-content,
body.rwh-portal .rwh-app,
body.rwh-portal .rwh-main,
body.rwh-portal .rwh-content,
body.rwh-portal .rwh-rail,
body.rwh-portal .rwh-nav,
body.rwh-portal .rwh-top,
body.rwh-portal .rw-hosting-admin,
body.rwh-portal .rw-hosting-panel,
body.rwh-portal form {
	backdrop-filter: none !important;
	contain: none !important;
	filter: none !important;
	perspective: none !important;
	transform: none !important;
	will-change: auto !important;
}

body.rwh-portal #wpbody-content {
	float: none;
	padding: 0;
}

body.rwh-portal #wpbody-content > .wrap {
	margin: 0;
}

.rwh-app {
	align-items: stretch;
	background: var(--rwh-surface-2);
	color: var(--rwh-text);
	contain: none;
	display: flex;
	filter: none;
	font-family: Inter, "Segoe UI", sans-serif;
	min-height: 100vh;
	overflow: visible;
	perspective: none;
	transform: none;
	will-change: auto;
}

.rwh-rail {
	background: var(--rwh-inverse-surface);
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 10px;
	width: 56px;
}

.rwh-rail-link {
	align-items: center;
	border-radius: 10px;
	color: var(--rwh-on-inverse-muted);
	display: flex;
	height: 36px;
	justify-content: center;
	text-decoration: none;
	width: 36px;
}

.rwh-rail-link:hover,
.rwh-rail-link:focus {
	background: var(--rwh-inverse-surface-2);
	color: var(--rwh-on-accent);
}

.rwh-nav {
	background: var(--rwh-inverse-surface);
	border-left: 1px solid var(--rwh-inverse-surface-2);
	color: var(--rwh-on-inverse-muted);
	display: flex;
	flex-direction: column;
	padding: 22px 14px 16px;
	width: 248px;
}

.rwh-wordmark {
	align-items: center;
	color: var(--rwh-on-accent);
	display: flex;
	font-weight: 700;
	gap: 8px;
	text-decoration: none;
}

.rwh-wordmark-mark {
	align-items: center;
	background: var(--rwh-inverse-surface-2);
	border-radius: 8px;
	display: flex;
	height: 32px;
	justify-content: center;
	width: 32px;
}

.rwh-product {
	align-items: center;
	display: flex;
	font-size: 12px;
	font-weight: 700;
	gap: 8px;
	letter-spacing: 0.08em;
	margin: 18px 0 8px;
	text-transform: uppercase;
}

.rwh-nav-group {
	color: var(--rwh-on-inverse-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin: 18px 10px 6px;
	text-transform: uppercase;
}

.rwh-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rwh-nav-item a {
	align-items: center;
	border-radius: 10px;
	color: var(--rwh-on-inverse-muted);
	display: flex;
	gap: 10px;
	min-height: 40px;
	padding: 0 10px;
	text-decoration: none;
}

.rwh-nav-item a span {
	flex: 1;
}

.rwh-nav-item.is-active a,
.rwh-nav-item a:hover,
.rwh-nav-item a:focus {
	background: var(--rwh-inverse-surface-2);
	color: var(--rwh-on-accent);
}

.rwh-nav-count {
	background: var(--rwh-inverse-surface-2);
	border-radius: 999px;
	color: var(--rwh-on-accent);
	flex: 0 0 auto;
	font-size: 12px;
	padding: 2px 8px;
}

.rwh-credit {
	color: var(--rwh-muted);
	font-size: 12px;
	margin-top: auto;
	padding: 16px 10px 0;
}

.rwh-nav .rwh-credit {
	color: var(--rwh-on-inverse-muted);
}

.rwh-main {
	contain: none;
	display: flex;
	filter: none;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	overflow: visible;
	perspective: none;
	transform: none;
	will-change: auto;
}

.rwh-top {
	align-items: center;
	background: var(--rwh-surface);
	border-bottom: 1px solid var(--rwh-border);
	display: flex;
	gap: 16px;
	min-height: 64px;
	padding: 0 24px;
}

.rwh-host {
	color: var(--rwh-ink);
	font-weight: 700;
	margin: 0;
}

.rwh-search {
	align-items: center;
	background: var(--rwh-surface-2);
	border: 1px solid var(--rwh-border);
	border-radius: 999px;
	color: var(--rwh-muted);
	display: flex;
	flex: 1;
	gap: 8px;
	margin-left: auto;
	max-width: 360px;
	padding: 0 14px;
}

.rwh-search input {
	background: transparent;
	border: 0;
	color: var(--rwh-ink);
	flex: 1;
	min-height: 38px;
	padding: 0;
}

.rwh-search input:focus {
	outline: none;
}

.rwh-help {
	align-items: center;
	color: var(--rwh-link);
	display: flex;
	font-weight: 700;
	gap: 6px;
	text-decoration: none;
}

.rwh-help:hover {
	color: var(--rwh-link-hover);
}

.rwh-avatar {
	align-items: center;
	background: var(--rwh-accent-soft);
	border-radius: 999px;
	color: var(--rwh-accent);
	display: flex;
	font-size: 12px;
	font-weight: 700;
	height: 32px;
	justify-content: center;
	width: 32px;
}

.rwh-content {
	contain: none;
	overflow: visible;
	padding: 32px 40px 48px;
	transform: none;
}

.rwh-notices {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 0 20px;
}

.rwh-notices:not(:has(.notice)):not(:has(.updated)):not(:has(.error)) {
	display: none;
	margin: 0;
}

.rwh-notices .wp-header-end {
	border: 0;
	height: 0;
	margin: 0;
	visibility: hidden;
}

.rwh-notices .notice,
.rwh-notices .updated,
.rwh-notices .error {
	display: block;
	margin: 0;
}

.rwh-lead,
.rwh-meta {
	color: var(--rwh-muted);
}

.rwh-stats {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	margin: 0 0 20px;
}

.rwh-stat,
.rwh-card,
.rw-hosting-panel {
	background: var(--rwh-surface);
	border: 1px solid var(--rwh-border);
	border-radius: 18px;
	padding: 20px;
}

.rwh-stat p {
	color: var(--rwh-muted);
	margin: 0 0 8px;
}

.rwh-stat strong {
	color: var(--rwh-ink);
	font-size: 32px;
	letter-spacing: -0.03em;
}

.rwh-split {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.rwh-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rwh-list li {
	align-items: center;
	border-bottom: 1px solid var(--rwh-border);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 0;
}

.rwh-pill {
	background: var(--rwh-info-soft);
	border-radius: 999px;
	color: var(--rwh-link);
	display: inline-flex;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 4px 8px;
	text-transform: uppercase;
}

.rwh-pill-success {
	background: var(--rwh-success-soft);
	color: var(--rwh-success);
}

.rwh-pill-warning {
	background: var(--rwh-warning-soft);
	color: var(--rwh-warning);
}

.rwh-pill-danger {
	background: var(--rwh-danger-soft);
	color: var(--rwh-danger);
}

.rwh-pill-info {
	background: var(--rwh-info-soft);
	color: var(--rwh-link);
}

.rwh-btn,
.rwh-account .button,
.rwh-preview-btn {
	background: var(--rwh-accent);
	border: 0;
	border-radius: 999px;
	color: var(--rwh-on-accent);
	cursor: pointer;
	display: inline-flex;
	font-weight: 700;
	min-height: 44px;
	padding: 0 16px;
	text-decoration: none;
}

.rwh-brand-body {
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(0, 1.6fr) minmax(280px, 380px);
}

.rwh-token-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	margin-top: 16px;
}

.rwh-token {
	align-items: center;
	border: 1px solid var(--rwh-border);
	border-radius: 14px;
	display: flex;
	gap: 12px;
	min-height: 74px;
	padding: 10px 12px;
	position: relative;
}

.rwh-swatch-wrap {
	display: inline-block;
	flex: 0 0 auto;
	height: 36px;
	position: relative;
	width: 36px;
}

button.rwh-swatch {
	border: 1px solid var(--rwh-border-strong);
	border-radius: 10px;
	cursor: pointer;
	display: block;
	height: 36px;
	margin: 0;
	padding: 0;
	pointer-events: auto;
	position: relative;
	width: 36px;
	z-index: 1;
}

.rwh-fallback {
	border: 0;
	clip: rect(0, 0, 0, 0);
	height: 1px;
	margin: -1px;
	opacity: 0;
	overflow: hidden;
	padding: 0;
	pointer-events: none;
	position: absolute;
	width: 1px;
}

body.rwh-no-js .rwh-fallback {
	-webkit-appearance: none;
	appearance: none;
	clip: auto;
	cursor: pointer;
	height: 36px;
	inset: 0;
	margin: 0;
	opacity: 1;
	overflow: visible;
	pointer-events: auto;
	width: 36px;
	z-index: 2;
}

body.rwh-no-js .rwh-fallback::-webkit-color-swatch-wrapper {
	padding: 0;
}

body.rwh-no-js .rwh-fallback::-webkit-color-swatch,
body.rwh-no-js .rwh-fallback::-moz-color-swatch {
	border: 0;
	border-radius: 8px;
}

body.rwh-no-js button.rwh-swatch {
	pointer-events: none;
}

.rwh-picker {
	background: var(--rwh-surface);
	border: 1px solid var(--rwh-border-strong);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(17, 22, 44, 0.12);
	display: grid;
	gap: 8px;
	padding: 12px;
	position: fixed;
	width: min(240px, 80vw);
	z-index: 100000;
}

.rwh-picker.is-open {
	display: grid !important;
	position: fixed !important;
	z-index: 100000 !important;
}

.rwh-picker[hidden] {
	display: none !important;
}

.rwh-picker input[type="color"] {
	background: transparent;
	border: 1px solid var(--rwh-border);
	border-radius: 8px;
	height: 36px;
	padding: 0;
	width: 100%;
}

.rwh-picker input[type="text"] {
	font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
	width: 100%;
}

.rwh-formats {
	display: flex;
	gap: 6px;
}

.rwh-formats button {
	background: var(--rwh-surface-2);
	border: 1px solid var(--rwh-border);
	border-radius: 999px;
	flex: 1;
	min-height: 32px;
}

.rwh-formats button[aria-pressed="true"] {
	background: var(--rwh-accent);
	border-color: var(--rwh-accent);
	color: var(--rwh-on-accent);
}

.rwh-token .rwh-token-copy {
	display: grid;
	flex: 1;
	grid-template-rows: 18px 16px 16px;
	min-width: 0;
}

.rwh-token .rwh-token-copy strong {
	line-height: 18px;
}

.rwh-token .rwh-token-copy small {
	line-height: 16px;
}

.rwh-token small,
.rwh-token code {
	color: var(--rwh-muted);
	font-size: 12px;
}

.rwh-contrast {
	color: var(--rwh-danger);
}

.rwh-gradient-row {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.rwh-gradient-bar {
	background: linear-gradient(90deg, var(--rwh-gradient-start), var(--rwh-gradient-end));
	border-radius: 999px;
	display: inline-block;
	height: 28px;
	width: 160px;
}

.rwh-drop {
	border: 1px dashed var(--rwh-border-strong);
	border-radius: 16px;
	padding: 24px;
	text-align: center;
}

.rwh-logo-preview {
	display: block;
	height: auto;
	margin: 12px auto 0;
	max-width: 240px;
}

.rwh-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.rwh-presets .is-selected,
.rwh-presets .button.is-selected {
	background: var(--rwh-accent);
	border-color: var(--rwh-accent);
	color: var(--rwh-on-accent);
}

.rwh-preview-card {
	background: var(--rwh-surface-2);
	border: 1px solid var(--rwh-border);
	border-radius: 16px;
	padding: 16px;
}

.rwh-preview-bar,
.rwh-preview-tiles {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.rwh-preview-tiles span {
	align-items: center;
	background: var(--rwh-accent-soft);
	border-radius: 10px;
	color: var(--rwh-accent);
	display: flex;
	height: 36px;
	justify-content: center;
	width: 36px;
}

.rwh-preview-service {
	background: var(--rwh-surface);
	border: 1px solid var(--rwh-border);
	border-radius: 14px;
	margin: 12px 0;
	padding: 14px;
}

.rwh-preview-link {
	color: var(--rwh-link);
	font-weight: 700;
}

.rwh-brand-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.rwh-account {
	background: var(--rwh-surface-2);
	color: var(--rwh-text);
}

.rwh-account .woocommerce-MyAccount-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.rwh-account .woocommerce-MyAccount-navigation a {
	border-radius: 999px;
	color: var(--rwh-text);
	display: inline-flex;
	min-height: 40px;
	padding: 8px 14px;
	text-decoration: none;
}

.rwh-account .woocommerce-MyAccount-navigation .is-active a,
.rwh-account .woocommerce-MyAccount-navigation a:hover {
	background: var(--rwh-accent);
	color: var(--rwh-on-accent);
}

.rwh-account-menu summary {
	display: none;
}

.rwh-account h2,
.rwh-account h3,
.rwh-card h3 {
	color: var(--rwh-ink);
}

.rwh-account a {
	color: var(--rwh-link);
}

.rwh-account a:hover {
	color: var(--rwh-link-hover);
}

.rwh-account table {
	background: var(--rwh-surface);
	border: 1px solid var(--rwh-border);
	border-collapse: collapse;
	width: 100%;
}

.rwh-account th,
.rwh-account td {
	border-bottom: 1px solid var(--rwh-border);
	padding: 12px;
	text-align: left;
}

@media (max-width: 960px) {
	.rwh-app {
		flex-direction: column;
	}

	.rwh-rail {
		flex-direction: row;
		width: auto;
	}

	.rwh-nav {
		width: auto;
	}

	.rwh-brand-body,
	.rwh-content {
		padding: 20px 16px 32px;
	}

	.rwh-brand-body {
		grid-template-columns: 1fr;
		padding: 0;
	}

	.rwh-top {
		flex-wrap: wrap;
		padding: 12px 16px;
	}
}

@media (max-width: 782px) {
	.rwh-account-menu summary {
		align-items: center;
		background: var(--rwh-surface);
		border: 1px solid var(--rwh-border);
		border-radius: 12px;
		cursor: pointer;
		display: flex;
		font-weight: 700;
		margin-bottom: 8px;
		min-height: 44px;
		padding: 0 14px;
	}

	.rwh-account-menu:not([open]) ul {
		display: none;
	}

	.rwh-account .woocommerce-MyAccount-navigation ul {
		flex-direction: column;
	}

	.rwh-sticky {
		background: var(--rwh-surface);
		border-top: 1px solid var(--rwh-border);
		bottom: 0;
		padding: 12px 16px;
		position: sticky;
	}

	.rwh-sticky .rwh-btn {
		width: 100%;
	}
}

.rwh-account .rwh-form {
	display: grid;
	gap: 12px;
	margin-top: 16px;
}

.rwh-account .rwh-form label {
	color: var(--rwh-muted);
	display: block;
	font-size: 0.85rem;
}

.rwh-account .rwh-form input,
.rwh-account .rwh-form select {
	background: var(--rwh-surface);
	border: 1px solid var(--rwh-border-strong);
	border-radius: 8px;
	color: var(--rwh-ink);
	max-width: 28rem;
	padding: 8px 10px;
	width: 100%;
}

.rwh-account .rwh-form input:focus,
.rwh-account .rwh-form select:focus {
	border-color: var(--rwh-accent);
	box-shadow: 0 0 0 1px var(--rwh-accent);
	outline: none;
}

.rwh-account .rwh-list form {
	display: inline-block;
	margin-left: 8px;
}
