/* Shahab Image Tools v3 — "Violet Glass" scoped styles.
   Everything lives under .sit / .sit-hub so the tools survive theme changes.
   Glass is painted (translucent white on a static lavender gradient), not
   blurred: no backdrop-filter, so nothing costs paint time on phones. */

.sit, .sit-hub {
	--sit-ink: #1e1240;
	--sit-muted: #6b5f8f;
	--sit-label: #6b5f8f;
	--sit-line: rgba(109, 76, 200, .16);
	--sit-glass: rgba(255, 255, 255, .62);
	--sit-glass-strong: rgba(255, 255, 255, .8);
	--sit-glass-border: rgba(255, 255, 255, .75);
	--sit-v50: #f3eeff;
	--sit-v500: #8b5cf6;
	--sit-v600: #7c3aed;
	--sit-v700: #6d28d9;
	--sit-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #d946ef 100%);
	--sit-ok: #0f7a4d;
	--sit-ok-bg: rgba(16, 185, 129, .13);
	--sit-warn: #9a5b00;
	--sit-warn-bg: rgba(245, 158, 11, .15);
	--sit-err: #b42318;
	--sit-err-bg: rgba(239, 68, 68, .1);
	--sit-shadow: 0 8px 32px rgba(76, 29, 149, .10), 0 1px 2px rgba(76, 29, 149, .06);
	--sit-shadow-lg: 0 18px 50px rgba(76, 29, 149, .16), 0 2px 6px rgba(76, 29, 149, .07);
	--sit-ease: cubic-bezier(.22, 1, .36, 1);
	--sit-radius: 18px;
	--sit-radius-sm: 12px;
	/* Legacy aliases (kept so any custom CSS still resolves). */
	--sit-accent: var(--sit-v600);
	--sit-text: var(--sit-ink);
	--sit-border: var(--sit-line);
	--sit-surface: #fff;
	--sit-soft: var(--sit-v50);
}

.sit {
	color: var(--sit-ink);
	font: inherit;
	display: grid;
	gap: 1.1rem;
	margin-block: 1.5rem;
	padding: clamp(1rem, 3cqi, 1.75rem);
	border-radius: 22px;
	border: 1px solid var(--sit-glass-border);
	box-shadow: var(--sit-shadow-lg);
	background:
		radial-gradient(60% 55% at 0% 0%, #e7dcff 0%, transparent 70%),
		radial-gradient(55% 50% at 100% 0%, #fbe3ff 0%, transparent 65%),
		radial-gradient(60% 60% at 100% 100%, #dfe3ff 0%, transparent 70%),
		linear-gradient(160deg, #f4efff 0%, #efe9ff 50%, #f7f0ff 100%);
	container-type: inline-size;
}
.sit *, .sit *::before, .sit *::after { box-sizing: border-box; }
.sit [hidden] { display: none !important; }
/* Themes add margins to forms, paragraphs and lists; spacing here comes from gap. */
.sit.sit > *, .sit.sit p, .sit.sit ul, .sit.sit ol { margin-top: 0; margin-bottom: 0; }
@media (scripting: enabled) { .sit > noscript { display: none; } }

.sit-sr {
	position: absolute !important;
	width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Gradient page title (use class="sit-title" on the page H1). */
.sit-title {
	background: linear-gradient(120deg, #2a1466, #6d28d9 60%, #a21caf);
	-webkit-background-clip: text; background-clip: text;
	color: transparent;
	letter-spacing: -.015em;
	font-size: clamp(2rem, 1.4rem + 2.4vw, 2.85rem);
	line-height: 1.15;
	font-weight: 800;
	margin: 0 0 .5rem;
}
.sit-lead { font-size: 1.125rem; color: #5b5279; }

/* Page layout. This stylesheet only loads on pages that contain a tool, so
   these rules never reach the rest of the site: the tool gets a 1160 px
   column, the help text an 820 px reading column on the same left edge. */
.entry-content:has(> .sit, > .sit-hub),
.entry-content-wrap > .entry-content:has(> .sit, > .sit-hub) { max-width: 1160px; margin-left: auto; margin-right: auto; }
.entry-content:has(> .sit, > .sit-hub) > :not(.sit):not(.sit-hub) { max-width: 820px; margin-left: 0; margin-right: auto; }
.entry-content:has(> .sit, > .sit-hub) > .wp-block-table {
	overflow-x: auto; background: #fff;
	border: 1px solid rgba(109, 76, 200, .16); border-radius: 18px;
}
.entry-content:has(> .sit, > .sit-hub) > .wp-block-table table { width: 100%; margin: 0; border-collapse: collapse; border: 0; }
.entry-content:has(> .sit, > .sit-hub) > .wp-block-table :is(th, td) {
	text-align: left; padding: .7rem .9rem; border: 0; border-bottom: 1px solid rgba(109, 76, 200, .16);
}
.entry-content:has(> .sit, > .sit-hub) > .wp-block-table thead { border: 0; }
.entry-content:has(> .sit, > .sit-hub) > .wp-block-table :is(th, td) { vertical-align: top; }
.entry-content:has(> .sit, > .sit-hub) > .wp-block-table td:first-child { white-space: nowrap; font-weight: 600; color: #1e1240; }
.entry-content:has(> .sit, > .sit-hub) > .wp-block-table tbody tr:last-child > * { border-bottom: 0; }
.entry-content:has(> .sit, > .sit-hub) > .wp-block-table thead th {
	font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
	color: #6b5f8f; background: #f6f1ff;
}
.sit-eyebrow {
	margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .09em;
	text-transform: uppercase; color: var(--sit-label, #6b5f8f);
}

/* Tool switcher */
.sit-nav {
	display: flex; flex-wrap: wrap; gap: 6px; padding: 5px;
	width: max-content; max-width: 100%;
	background: var(--sit-glass); border: 1px solid var(--sit-glass-border);
	border-radius: 14px; box-shadow: var(--sit-shadow);
}
.sit-nav a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem;
	border-radius: 10px; color: var(--sit-ink); text-decoration: none; font-weight: 500;
	transition: background-color .25s var(--sit-ease), transform .25s var(--sit-ease);
}
.sit-nav a:hover { background: rgba(255, 255, 255, .8); }
.sit-nav a.is-active,
.sit-nav a[aria-current="page"] {
	color: #fff; font-weight: 600; background: var(--sit-grad);
	box-shadow: 0 6px 16px rgba(124, 58, 237, .3);
}
.sit-nav a:focus-visible { outline: 3px solid var(--sit-v600); outline-offset: 2px; }

/* Drop zone */
.sit-drop { position: relative; }
.sit-drop__label {
	display: grid; justify-items: center; gap: .4rem; text-align: center;
	min-height: 220px; padding: 2rem 1.25rem; align-content: center;
	border: 2px dashed rgba(139, 92, 246, .45);
	border-radius: 16px;
	background: rgba(243, 238, 255, .72);
	cursor: pointer;
	transition: background-color .25s var(--sit-ease), border-color .25s var(--sit-ease);
}
.sit-drop__label:hover,
.sit-drop.is-dragover .sit-drop__label { border-color: var(--sit-v600); background: rgba(255, 255, 255, .85); }
.sit-drop:focus-within .sit-drop__label { outline: 3px solid var(--sit-v600); outline-offset: 3px; }
.sit-drop__icon {
	width: 56px; height: 56px; padding: 14px; margin-bottom: .35rem;
	color: #fff; background: var(--sit-grad); border-radius: 15px;
	box-shadow: 0 8px 20px rgba(124, 58, 237, .3);
	transition: transform .35s var(--sit-ease);
}
.sit-drop__label:hover .sit-drop__icon,
.sit-drop.is-dragover .sit-drop__icon { transform: translateY(-3px) rotate(-6deg); }
.sit-drop__title { font-size: 1.15rem; font-weight: 600; }
.sit-drop__link { color: var(--sit-v700); text-decoration: underline; text-underline-offset: 3px; }
.sit-drop__hint { font-size: .875rem; color: var(--sit-muted); }
.sit-drop__privacy { font-size: .85rem; font-weight: 600; color: var(--sit-ok); }
.sit.is-busy .sit-drop__label { opacity: .75; }

/* Settings */
.sit-settings {
	display: grid; gap: 1rem 1.25rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	padding: 1.25rem;
	background: var(--sit-glass); border: 1px solid var(--sit-glass-border);
	border-radius: var(--sit-radius); box-shadow: var(--sit-shadow);
}
.sit-settings:empty { display: none; }
.sit-field { display: grid; gap: .4rem; align-content: start; min-width: 0; }
.sit-field--wide { grid-column: 1 / -1; }
.sit-field > label {
	font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
	color: var(--sit-label);
}
.sit-field select,
.sit-field input[type="number"] {
	width: 100%; min-height: 44px; padding: .5rem .75rem; font: inherit; color: var(--sit-ink);
	border: 1px solid var(--sit-line); border-radius: 11px; background-color: var(--sit-glass-strong);
	transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.sit-field select {
	-webkit-appearance: none; appearance: none; padding-right: 2.5rem; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d28d9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right .85rem center; background-size: 16px;
}
.sit-field select:focus,
.sit-field input[type="number"]:focus {
	outline: none; background-color: #fff; border-color: var(--sit-v500);
	box-shadow: 0 0 0 4px rgba(139, 92, 246, .18);
}
.sit-field input[type="color"] {
	-webkit-appearance: auto; appearance: auto;
	width: 88px; height: 44px; padding: 4px; cursor: pointer;
	border: 1px solid var(--sit-line); border-radius: 11px; background-color: var(--sit-glass-strong);
}
.sit-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.sit-field input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(30, 18, 64, .2); border-radius: 7px; }
.sit-field input[type="color"]::-moz-color-swatch { border: 1px solid rgba(30, 18, 64, .2); border-radius: 7px; }
.sit-field :disabled { opacity: .5; }
.sit-range { display: flex; align-items: center; gap: .75rem; }
.sit-range input[type="range"] {
	flex: 1; accent-color: var(--sit-v600); min-height: 44px;
	/* Undo theme input styling (Kadence styles every <input> as a text box). */
	-webkit-appearance: auto; appearance: auto;
	width: auto; height: auto; padding: 0; border: 0; border-radius: 0;
	background: transparent; box-shadow: none;
}
.sit-range output {
	min-width: 3.2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums;
	color: var(--sit-v700); background: var(--sit-v50); border-radius: 8px; padding: .1rem .4rem;
}
.sit-help { margin: 0; font-size: .85rem; color: var(--sit-muted); }
.sit-check { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--sit-muted); cursor: pointer; min-height: 44px; }
.sit-check input { width: 18px; height: 18px; accent-color: var(--sit-v600); }

/* Status line */
.sit-status { margin: 0; min-height: 1.5em; font-size: .925rem; color: var(--sit-muted); }
.sit-status.is-error { color: var(--sit-err); font-weight: 600; }

/* Results */
.sit-results { display: grid; gap: .75rem; }
.sit-summary {
	display: grid; gap: .7rem; padding: 1.1rem 1.35rem;
	border-radius: 16px; border: 1px solid var(--sit-glass-border);
	background: linear-gradient(135deg, rgba(255, 255, 255, .8), rgba(245, 238, 255, .62));
	box-shadow: var(--sit-shadow);
}
.sit-summary__text { margin: 0; font-weight: 600; font-size: 1.05rem; }
.sit-progress {
	-webkit-appearance: none; appearance: none;
	width: 100%; height: 8px; border: 0; border-radius: 99px; overflow: hidden;
	background: rgba(139, 92, 246, .13); color: var(--sit-v600);
}
.sit-progress::-webkit-progress-bar { background: rgba(139, 92, 246, .13); border-radius: 99px; }
.sit-progress::-webkit-progress-value { background: var(--sit-grad); border-radius: 99px; }
.sit-progress::-moz-progress-bar { background: var(--sit-grad); border-radius: 99px; }
.sit-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.sit-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
	min-height: 44px; padding: .55rem 1.15rem; font: inherit; font-weight: 600; line-height: 1.2;
	color: var(--sit-v700); background: var(--sit-glass-strong);
	border: 1px solid var(--sit-line); border-radius: 12px;
	cursor: pointer; text-decoration: none;
	transition: transform .25s var(--sit-ease), box-shadow .25s var(--sit-ease), background-position .6s var(--sit-ease), border-color .2s ease;
}
.sit-btn:hover { transform: translateY(-1px); border-color: var(--sit-v500); box-shadow: 0 6px 16px rgba(124, 58, 237, .16); }
.sit-btn:focus-visible { outline: 3px solid var(--sit-v600); outline-offset: 2px; }
.sit-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.sit-btn--primary {
	color: #fff; border-color: transparent;
	background: var(--sit-grad); background-size: 180% 180%; background-position: 0% 50%;
	box-shadow: 0 8px 20px rgba(124, 58, 237, .28);
}
.sit-btn--primary:hover { background-position: 100% 50%; box-shadow: 0 10px 26px rgba(124, 58, 237, .36); }
.sit-btn--ghost { background: transparent; border-color: transparent; color: var(--sit-muted); box-shadow: none; }
.sit-btn--ghost:hover { background: rgba(255, 255, 255, .7); border-color: transparent; box-shadow: none; }
.sit-btn--small { min-height: 40px; padding: .35rem .85rem; font-size: .875rem; }

.sit-list {
	list-style: none; margin: 0; padding: 0 .25rem 0 0; display: grid; gap: .5rem;
	max-height: min(70vh, 640px); overflow-y: auto; overscroll-behavior: contain;
	scrollbar-width: thin; scrollbar-color: rgba(139, 92, 246, .35) transparent;
}
.sit-row {
	display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .4rem 1rem;
	padding: .75rem 1rem; border: 1px solid var(--sit-line); border-radius: var(--sit-radius-sm);
	background: rgba(255, 255, 255, .74);
	animation: sit-rise .45s var(--sit-ease) backwards;
	transition: background-color .25s ease;
}
.sit-row:hover { background: rgba(255, 255, 255, .92); }
.sit-row__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sit-row__meta { grid-column: 1; font-size: .85rem; color: var(--sit-muted); font-variant-numeric: tabular-nums; }
.sit-row__badge {
	grid-row: 1 / span 2; grid-column: 2; font-weight: 700; font-variant-numeric: tabular-nums;
	padding: .2rem .6rem; border-radius: 999px; font-size: .85rem; white-space: nowrap;
}
.sit-row__badge.is-good { color: var(--sit-ok); background: var(--sit-ok-bg); }
.sit-row__badge.is-neutral { color: var(--sit-muted); background: var(--sit-v50); }
.sit-row__badge.is-bad { color: var(--sit-warn); background: var(--sit-warn-bg); }
.sit-row__action { grid-row: 1 / span 2; grid-column: 3; }
.sit-row.is-error { border-color: rgba(180, 35, 24, .35); background: var(--sit-err-bg); }
.sit-row.is-error .sit-row__meta { color: var(--sit-err); }

/* CTA */
.sit-cta {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem;
	padding: 1.1rem 1.35rem; border-radius: 16px;
	border: 1px solid rgba(139, 92, 246, .22);
	background: linear-gradient(135deg, rgba(99, 102, 241, .1), rgba(217, 70, 239, .1));
	animation: sit-rise .5s var(--sit-ease) backwards;
}
.sit-cta p { margin: 0; flex: 1 1 320px; }
.sit-cta__link {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem;
	border-radius: 12px; background: #1a1038; color: #fff !important;
	font-weight: 600; text-decoration: none;
	transition: transform .25s var(--sit-ease), box-shadow .25s var(--sit-ease);
}
.sit-cta__link:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(26, 16, 56, .3); }
.sit-cta__link:focus-visible { outline: 3px solid var(--sit-v600); outline-offset: 2px; }

@keyframes sit-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@container (max-width: 640px) {
	.sit-settings { grid-template-columns: 1fr 1fr; }
	.sit-row { grid-template-columns: minmax(0, 1fr) auto; }
	.sit-row__badge { grid-row: 1; grid-column: 2; }
	.sit-row__action { grid-row: 3; grid-column: 1 / -1; }
	.sit-row__action .sit-btn { width: 100%; }
	.sit-nav { width: 100%; }
	.sit-nav a { flex: 1 1 0; justify-content: center; padding: 0 .5rem; }
}
@container (max-width: 420px) {
	.sit-settings { grid-template-columns: 1fr; }
	.sit-drop__label { min-height: 190px; }
}

/* Tools hub */
.sit-hub { display: grid; gap: 2.75rem; container-type: inline-size; color: inherit; }
.sit-hub > .sit { margin-block: 0; }
.sit-hub__section > h2 { margin: 0 0 1rem; color: var(--sit-ink); }
.sit-cards { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sit-card {
	position: relative; display: grid; gap: .5rem; align-content: start; padding: 1.35rem;
	border: 1px solid var(--sit-line); border-radius: var(--sit-radius);
	background: linear-gradient(160deg, #ffffff, #f7f2ff);
	color: var(--sit-ink); text-decoration: none; overflow: hidden;
	box-shadow: var(--sit-shadow);
	transition: transform .35s var(--sit-ease), box-shadow .35s var(--sit-ease);
}
.sit-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--sit-grad); }
.sit-card:hover, .sit-card:focus-visible { transform: translateY(-3px); box-shadow: var(--sit-shadow-lg); }
.sit-card:focus-visible { outline: 3px solid var(--sit-v600); outline-offset: 2px; }
.sit-card__title { font-weight: 700; font-size: 1.1rem; }
.sit-card__desc { color: var(--sit-muted); font-size: .95rem; }
.sit-card__go { color: var(--sit-v700); font-weight: 600; font-size: .925rem; margin-top: .25rem; }
.sit-steps { list-style: none; counter-reset: sit-step; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sit-steps li {
	counter-increment: sit-step; padding: 1.25rem; border-radius: var(--sit-radius);
	background: linear-gradient(160deg, #ffffff, #f7f2ff); border: 1px solid var(--sit-line);
	color: var(--sit-muted);
}
.sit-steps li::before {
	content: counter(sit-step); display: grid; place-items: center; width: 34px; height: 34px;
	margin-bottom: .6rem; border-radius: 10px; background: var(--sit-grad); color: #fff; font-weight: 700;
}
.sit-steps strong, .sit-benefits strong { display: block; color: var(--sit-ink); }
.sit-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sit-benefits li {
	padding: 1.1rem 1.3rem; border-radius: var(--sit-radius); color: var(--sit-muted);
	background: linear-gradient(160deg, #ffffff, #f7f2ff); border: 1px solid var(--sit-line);
}
.sit-table-wrap { overflow-x: auto; border-radius: var(--sit-radius); border: 1px solid var(--sit-line); background: #fff; }
.sit-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.sit-table th, .sit-table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--sit-line); }
.sit-table tbody tr:last-child > * { border-bottom: 0; }
.sit-table thead th {
	font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
	color: var(--sit-label); background: #f6f1ff;
}
.sit-table tbody tr:hover { background: rgba(139, 92, 246, .06); }
@container (max-width: 760px) {
	.sit-cards, .sit-steps, .sit-benefits { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.sit *, .sit-hub * { animation: none !important; transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
	.sit-settings, .sit-summary, .sit-row, .sit-nav, .sit-drop__label { background: #fbf9ff; }
}
@media (forced-colors: active) {
	.sit-title { color: CanvasText; background: none; }
	.sit-btn--primary, .sit-nav a[aria-current="page"], .sit-drop__icon { forced-color-adjust: auto; }
}
