/* ==========================================================================
   Full-screen tool window + landing (shared across tools)
   Designed against the JankariKit theme design tokens so the tools feel
   native to the site. Theme vars are used with graceful fallbacks.
   ========================================================================== */

.uth-tool,
.uth-tool-shortcode {
	--uth-accent: #2563eb;
	--uth-accent-dark: #1d4ed8;
	--uth-accent-soft: #eff6ff;
	--uth-heading: var(--color-heading, #111318);
	--uth-text: var(--color-text, #202329);
	--uth-muted: var(--color-muted, #66707d);
	--uth-subtle: var(--color-subtle, #8a929d);
	--uth-border: var(--color-border, #e2e6ea);
	--uth-border-strong: var(--color-border-strong, #c9d0d8);
	--uth-surface: var(--color-surface, #f6f7f8);
	--uth-surface-soft: var(--color-surface-soft, #fbfbfc);
	--uth-background: var(--color-background, #ffffff);
	--uth-primary: #2563eb;
	--uth-primary-hover: #1d4ed8;
	--uth-section-background: #eff6ff;
	--uth-success: #15803d;
	--uth-danger: #b91c1c;
	--uth-font-body: var(--font-body, "Hind", system-ui, sans-serif);
	--uth-font-heading: var(--font-heading, Georgia, "Times New Roman", serif);
	--uth-radius: var(--radius-md, 0.5rem);
	--uth-radius-lg: var(--radius-lg, 0.75rem);
	--uth-shadow-card: var(--shadow-card, 0 10px 28px rgba(23, 21, 18, 0.06));
	--uth-shadow-soft: var(--shadow-soft, 0 14px 40px rgba(23, 21, 18, 0.08));
	--uth-fullscreen-bar-h: 58px;
	color: var(--uth-text);
	font-family: var(--uth-font-body);
}

/* Primary buttons match the Responsive Checker gradient */
.uth-tool .uth-button-primary,
.uth-tool-shortcode .uth-button-primary,
.uth-screen .uth-button-primary {
	background: linear-gradient(135deg, var(--uth-primary), #0f766e);
	border-color: var(--uth-primary);
	box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.uth-tool .uth-button-primary:hover,
.uth-tool .uth-button-primary:focus-visible,
.uth-tool-shortcode .uth-button-primary:hover,
.uth-tool-shortcode .uth-button-primary:focus-visible,
.uth-screen .uth-button-primary:hover,
.uth-screen .uth-button-primary:focus-visible {
	background: linear-gradient(135deg, var(--uth-primary-hover), #0f766e);
	border-color: var(--uth-primary-hover);
}

/* White icon inside primary buttons */
.uth-tool .uth-button-primary svg,
.uth-tool-shortcode .uth-button-primary svg,
.uth-screen .uth-button-primary svg {
	fill: #ffffff;
}

/* ---- Landing (compact, shown on the tool page) ---- */

.uth-tool-landing {
	max-width: 760px;
	margin: 0 auto;
	display: grid;
	gap: 18px;
	text-align: center;
}

.uth-tool-landing__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	justify-self: center;
	padding: 6px 14px;
	border: 1px solid color-mix(in srgb, var(--uth-accent) 28%, var(--uth-border));
	border-radius: 999px;
	color: var(--uth-accent);
	background: var(--uth-accent-soft);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.uth-tool-landing__title {
	margin: 0;
	font-family: var(--uth-font-heading);
	font-size: clamp(1.55rem, 3vw, 2.1rem);
	line-height: 1.24;
	color: var(--uth-heading);
	letter-spacing: -0.01em;
}

.uth-tool-landing__subtitle {
	margin: 0;
	color: var(--uth-muted);
	font-size: 1.02rem;
	line-height: 1.7;
	max-width: 42rem;
	justify-self: center;
}

.uth-tool-landing__form {
	display: grid;
	gap: 14px;
	margin-top: 8px;
	padding: 24px;
	text-align: left;
	background: var(--uth-surface-soft);
	border: 1px solid var(--uth-border);
	border-radius: var(--uth-radius-lg);
	box-shadow: var(--uth-shadow-card);
}

.uth-tool-landing__row {
	display: grid;
	gap: 6px;
}

.uth-tool-landing__row--split {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.uth-tool-landing__label {
	color: var(--uth-heading);
	font-size: 0.86rem;
	font-weight: 700;
}

.uth-tool-landing__input,
.uth-tool-landing__select,
.uth-tool-landing__textarea {
	width: 100%;
	max-width: 100%;
	padding: 13px 15px;
	color: var(--uth-heading);
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-radius: var(--uth-radius);
	font: inherit;
	font-size: 0.95rem;
	line-height: 1.5;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.uth-tool-landing__input:focus,
.uth-tool-landing__select:focus,
.uth-tool-landing__textarea:focus {
	border-color: var(--uth-accent);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--uth-accent) 18%, transparent);
}

.uth-tool-landing__textarea {
	min-height: 110px;
	resize: vertical;
}

.uth-tool-landing__submit {
	justify-self: center;
	min-width: 240px;
	margin-top: 8px;
}

.uth-tool-landing__submit svg {
	flex: none;
}

.uth-tool-landing__hint {
	margin: 0;
	color: var(--uth-muted);
	font-size: 0.84rem;
	line-height: 1.6;
}

/* ---- Full-screen page body ---- */

.uth-screen-body {
	margin: 0;
	height: 100vh;
	overflow: hidden;
	background: linear-gradient(180deg, var(--uth-surface) 0%, var(--uth-background) 100%);
}

.uth-screen-body #wpadminbar {
	display: none;
}

/* ---- Full-screen window ---- */

.uth-screen {
	display: flex;
	flex-direction: column;
	height: 100vh;
	background: linear-gradient(180deg, var(--uth-surface) 0%, var(--uth-background) 100%);
	color: var(--uth-text);
	font-family: var(--uth-font-body);
}

/* ---- Top bar ---- */

.uth-screen-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: nowrap;
	padding: 12px 20px;
	background: var(--uth-background);
	border-bottom: 1px solid var(--uth-border);
	box-shadow: 0 1px 0 rgba(17, 19, 24, 0.02);
	flex: none;
	position: relative;
	z-index: 2;
}

.uth-screen-bar__back {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex: none;
	white-space: nowrap;
	padding: 8px 14px;
	color: var(--uth-text);
	background: var(--uth-surface-soft);
	border: 1px solid var(--uth-border);
	border-radius: 999px;
	text-decoration: none;
	font-size: 0.84rem;
	font-weight: 600;
	line-height: 1;
	transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.uth-screen-bar__back svg {
	flex: none;
	width: 15px;
	height: 15px;
}

.uth-screen-bar__back:hover {
	border-color: var(--uth-accent);
	color: var(--uth-accent);
	transform: translateX(-2px);
}

.uth-screen-bar__title {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	max-width: 55%;
	overflow: hidden;
	text-align: center;
	color: var(--uth-heading);
	font-family: var(--uth-font-heading);
	font-size: 1.02rem;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.uth-screen-bar__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	flex: none;
}

.uth-screen-bar__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	padding: 7px 13px;
	color: var(--uth-text);
	background: var(--uth-surface-soft);
	border: 1px solid var(--uth-border);
	border-radius: 999px;
	font: inherit;
	font-size: 0.84rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.uth-screen-bar__btn:hover {
	border-color: var(--uth-accent);
	color: var(--uth-accent);
	background: var(--uth-accent-soft);
}

.uth-screen-bar__btn svg {
	flex: none;
	width: 15px;
	height: 15px;
}

/* ---- Scrollable body ---- */

.uth-screen-body__inner {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	padding: 26px;
}

.uth-screen-body__inner > .uth-tool,
.uth-screen-body__inner > .uth-tool-shortcode {
	max-width: 1200px;
	margin: 0 auto;
}

.uth-screen-body__inner .uth-tool-panel {
	background: var(--uth-background);
	border: 1px solid var(--uth-border);
	border-radius: var(--uth-radius-lg);
	box-shadow: var(--uth-shadow-card);
	padding: clamp(18px, 3vw, 30px);
}

.uth-screen-body__inner .uth-tool-header {
	max-width: none;
}

.uth-screen-body__inner .uth-tool-title {
	font-family: var(--uth-font-heading);
}

/* ---- Theme scrollbar (WebKit) ---- */

.uth-screen-body__inner::-webkit-scrollbar {
	width: 10px;
}

.uth-screen-body__inner::-webkit-scrollbar-track {
	background: transparent;
}

.uth-screen-body__inner::-webkit-scrollbar-thumb {
	background: var(--uth-border-strong);
	border-radius: 999px;
	border: 2px solid var(--uth-background);
}

.uth-screen-body__inner::-webkit-scrollbar-thumb:hover {
	background: var(--uth-subtle);
}

@media (max-width: 640px) {
	.uth-screen-bar {
		padding: 10px 12px;
	}

	.uth-screen-body__inner {
		padding: 14px;
	}

	.uth-tool-landing__row--split {
		grid-template-columns: 1fr;
	}

	.uth-tool-landing__form {
		padding: 18px;
	}

	.uth-screen-bar__title {
		display: none;
	}
}

/* ---- Theme-aligned landing hero (overrides blue default in common.css) ---- */

.uth-page::before,
.uth-tool-hero::before {
	background:
		linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
		linear-gradient(180deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
		linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.25));
	background-size: 42px 42px, 42px 42px, 100% 100%;
}

.uth-tool-landing {
	position: relative;
}

.uth-tool-landing__eyebrow {
	border-color: var(--uth-accent);
}

.uth-tool-landing__form {
	background: var(--uth-surface-soft);
}
