/* Image Tools page (tools/image.html): the tool tabs, and the Resize tab (assets/js/resize-page.js).
   The Spectrum Toolkit's look: white cards, coral #f56565, the dark navy card for the result, icon tabs.
   The Resize tab also carries the class "sig-app", so it shares the Signature tab's controls
   (rows with (i) and a reset dot, segmented choices, switches, sliders, the colour pop-up). */

/* ---------- The tool tabs: an icon above each name, as the toolkit's tabs ---------- */
.img-tool-tabs {
	border-bottom: 1px solid #eef0f1;
	display: flex;
	gap: 0.3em;
	margin: 0 0 1.4em;
	padding: 0 0 0.45em;
}
.img-tool-tabs button {
	align-items: center;
	background: none;
	border: 0;
	border-radius: 8px;
	box-shadow: none;
	color: #7f888f !important;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	font-family: "Open Sans", sans-serif;
	gap: 0.2em;
	height: auto;
	letter-spacing: 0;
	line-height: 1.4;
	min-width: 6.5em;
	padding: 0.55em 0.9em;
	text-transform: none;
	transition: background-color 0.2s, color 0.2s;
}
.img-tool-tabs button .icon { font-size: 1.15em; }
.img-tool-tabs button small { font-size: 0.72em; font-weight: 700; }
.img-tool-tabs button:hover { color: #3d4449 !important; }
.img-tool-tabs button[aria-selected="true"] { background: rgba(245, 101, 101, 0.1); color: #f56565 !important; }
.img-tool-tabs button:focus-visible { box-shadow: 0 0 0 2px rgba(245, 101, 101, 0.4); outline: none; }
.img-panel[hidden] { display: none !important; }
/* "Resize this" beside the signature's Download */
#sig-resize .icon { margin-right: 0.2em; }

/* ---------- Resize: the image on top, the result left, the settings right ---------- */
.rz-app {
	align-items: start;
	display: grid;
	gap: 1.4em;
	grid-template-areas: "message message" "data data" "figure settings";
	grid-template-columns: minmax(0, 1fr) 330px;
}
.rz-app > .sig-message { grid-area: message; margin: 0; }
.rz-area-data { grid-area: data; }
.rz-area-figure { display: flex; flex-direction: column; gap: 1.4em; grid-area: figure; min-width: 0; }
.rz-area-settings { grid-area: settings; }
.rz-app select, .rz-app input[type="text"] { font-size: 0.85em; height: 2.4em; }

/* 1. The image: a drop area, then the loaded image's name and facts */
.rz-data {
	align-items: stretch;
	background: #fff;
	border: 1px solid rgba(210, 215, 217, 0.75);
	border-radius: 12px;
	box-shadow: 0 4px 18px rgba(61, 68, 73, 0.06);
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	padding: 1.1em 1.2em;
}
.rz-drop {
	align-items: center;
	border: 1.5px dashed rgba(245, 101, 101, 0.55);
	border-radius: 10px;
	color: #3d4449;
	cursor: pointer;
	display: flex;
	flex: 1 1 22em;
	flex-wrap: wrap;
	gap: 0.2em 0.9em;
	margin: 0;
	padding: 0.9em 1.1em;
	transition: background-color 0.2s, border-color 0.2s;
}
.rz-drop:hover, .rz-drop:focus-within, .rz-drop.is-over { background: rgba(245, 101, 101, 0.05); border-color: #f56565; }
.rz-drop.is-over { border-style: solid; }
.rz-drop-icon { color: #f56565; font-size: 1.6em; }
.rz-drop-text { font-size: 0.95em; }
.rz-drop-text u { border-bottom: 1px solid rgba(245, 101, 101, 0.5); color: #f56565; text-decoration: none; }
.rz-drop-formats { color: #7f888f; flex-basis: 100%; font-size: 0.75em; padding-left: 2.6em; }
.rz-data-side { align-items: flex-start; display: flex; flex: 0 1 15em; flex-direction: column; gap: 0.5em; justify-content: center; }
.rz-privacy { color: #7f888f; font-size: 0.72em; line-height: 1.4; margin: 0; }
.rz-privacy .icon { color: #f56565; margin-right: 0.25em; }
.rz-loaded { display: none; flex: 1 1 100%; }
.rz-data.is-loaded .rz-drop, .rz-data.is-loaded .rz-data-side { display: none; }
.rz-data.is-loaded .rz-loaded { display: block; }
.rz-data.is-loaded.is-over { background: rgba(245, 101, 101, 0.05); }
.rz-data.is-reading { opacity: 0.6; }
.rz-loaded-main { align-items: center; display: flex; gap: 0.7em; }
.rz-loaded-icon { color: #2fb5a9; font-size: 1.3em; }
.rz-loaded-main strong { display: block; font-family: "Roboto Slab", serif; overflow-wrap: anywhere; }
.rz-loaded-meta { color: #7f888f; font-size: 0.8em; }
.rz-loaded-actions { display: flex; flex-wrap: wrap; gap: 0.3em 1.2em; margin: 0.35em 0 0 2.05em; }
.rz-loaded-actions .sig-link { font-size: 0.78em !important; font-weight: 600; }

/* 2. The result: a dark card with the picture on squares (the usual sign for "transparent") */
.rz-figure-card {
	background: linear-gradient(140deg, #26334d 0%, #3b4378 55%, #5b67c9 100%);
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(59, 67, 120, 0.3);
	color: #fff;
	padding: 1.2em 1.3em 1em;
}
.rz-figure-head { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 0.6em 1em; justify-content: space-between; }
.rz-figure-head > div:first-child { min-width: 0; }
.rz-figure-head h2 { color: #fff; font-size: 1.2em; margin: 0; overflow-wrap: anywhere; }
.rz-subtitle { color: rgba(255, 255, 255, 0.75); font-size: 0.8em; margin-top: 0.15em; overflow-wrap: anywhere; }
.rz-kinds { background: rgba(0, 0, 0, 0.18); border-radius: 999px; display: inline-flex; padding: 3px; }
.rz-kinds button {
	background: none !important;
	border: 0;
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.7) !important;
	cursor: pointer;
	font-size: 0.75em !important;
	font-weight: 600;
	padding: 0.3em 0.95em !important;
	transition: background-color 0.2s, color 0.2s;
}
.rz-kinds button[aria-pressed="true"] { background: #fff !important; color: #26334d !important; }
.rz-kinds button:hover:not([aria-pressed="true"]) { color: #fff !important; }
.rz-paper {
	align-items: center;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 10px;
	display: flex;
	justify-content: center;
	margin-top: 0.9em;
	min-height: 260px;
	overflow: hidden;
	padding: 1em;
	position: relative;
}
/* grey-and-white squares behind every picture: transparent parts show as squares */
.rz-paper img, .rz-paper canvas {
	background-color: #fff;
	background-image:
		linear-gradient(45deg, #e6e8ea 25%, transparent 25%, transparent 75%, #e6e8ea 75%),
		linear-gradient(45deg, #e6e8ea 25%, transparent 25%, transparent 75%, #e6e8ea 75%);
	background-position: 0 0, 8px 8px;
	background-size: 16px 16px;
	display: block;
}
.rz-paper > img { border-radius: 3px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28); height: auto; max-height: 62vh; max-width: 100%; transition: opacity 0.4s ease; }
.rz-paper.is-updating > img { opacity: 0.82; }
.rz-paper-message { color: rgba(255, 255, 255, 0.85); font-size: 0.9em; text-align: center; }
/* only the chosen view shows */
.rz-view-result, .rz-view-compare, .rz-view-crop { display: none !important; }
.rz-app.has-image .rz-paper[data-view="result"] .rz-view-result:not([hidden]) { display: block !important; }
.rz-app.has-image .rz-paper[data-view="compare"] .rz-view-compare { display: block !important; }
.rz-app.has-image .rz-paper[data-view="crop"] .rz-view-crop { display: block !important; }

/* Compare: before under, after on top cut at the slider; drag anywhere on the picture */
.rz-compare { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28); max-height: 62vh; position: relative; --rz-split: 50%; }
.rz-compare canvas, .rz-compare img { height: 100%; left: 0; position: absolute; top: 0; width: 100%; }
.rz-split { background: #fff; bottom: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); left: var(--rz-split); pointer-events: none; position: absolute; top: 0; transform: translateX(-1px); width: 2px; }
.rz-split::after {
	background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); content: "‹ ›"; color: #26334d; font-size: 0.8em; font-weight: 700;
	height: 2em; left: 50%; line-height: 2em; position: absolute; text-align: center; top: 50%; transform: translate(-50%, -50%); width: 2em;
}
.rz-tag { background: rgba(38, 51, 77, 0.75); border-radius: 999px; color: #fff; font-size: 0.68em; font-weight: 700; padding: 0.15em 0.7em; pointer-events: none; position: absolute; top: 0.6em; }
.rz-tag-before { left: 0.6em; }
.rz-tag-after { right: 0.6em; }
.rz-compare input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; cursor: ew-resize; height: 100%; left: 0; margin: 0; opacity: 0; position: absolute; top: 0; width: 100%; }

/* Crop: the picture with the box; outside the box is dimmed */
.rz-stage { cursor: crosshair; max-height: 62vh; position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }
.rz-stage canvas { height: 100%; width: 100%; }
.rz-crop-box { border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(20, 26, 40, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.3); box-sizing: border-box; cursor: move; pointer-events: none; position: absolute; }
.rz-stage { overflow: hidden; }
.rz-crop-box i { background: #fff; border: 1px solid rgba(0, 0, 0, 0.35); border-radius: 2px; height: 12px; position: absolute; width: 12px; }
.rz-crop-box i:nth-child(1) { left: -7px; top: -7px; }
.rz-crop-box i:nth-child(2) { right: -7px; top: -7px; }
.rz-crop-box i:nth-child(3) { bottom: -7px; left: -7px; }
.rz-crop-box i:nth-child(4) { bottom: -7px; right: -7px; }

/* Under the picture: the status line, the format and Download */
.rz-figure-foot { align-items: center; display: flex; flex-wrap: wrap; gap: 0.6em; justify-content: space-between; margin-top: 0.8em; }
.rz-status { align-items: center; color: rgba(255, 255, 255, 0.75); display: inline-flex; flex: 1 1 0; font-size: 0.75em; gap: 0.5em; min-width: 0; }
.rz-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rz-status i { background: #2fb5a9; border-radius: 50%; flex: 0 0 0.55em; height: 0.55em; }
.rz-status.is-busy i { animation: rz-pulse 0.9s ease-in-out infinite; background: #ffd27a; }
.rz-status.is-error { color: #ffd6d6; }
.rz-status.is-error i { background: #f56565; }
@keyframes rz-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .rz-status.is-busy i { animation: none; } }
.rz-export { display: flex; flex-wrap: wrap; gap: 0.4em; }
.rz-export select {
	background-color: rgba(255, 255, 255, 0.12);
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M9.4,12.3l10.4,10.4l10.4-10.4c0.5-0.5,1.3-0.5,1.8,0l3.3,3.3c0.5,0.5,0.5,1.3,0,1.8L20.7,31.9c-0.5,0.5-1.3,0.5-1.8,0L4.3,17.3c-0.5-0.5-0.5-1.3,0-1.8l3.3-3.3C8.1,11.8,8.9,11.8,9.4,12.3z' fill='rgba(255, 255, 255, 0.8)' /%3E%3C/svg%3E");
	background-position: right 0.65em center;
	background-size: 0.85em;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 6px;
	color: #fff;
	font-size: 0.75em !important;
	height: 2.3em !important;
	min-width: 6.2em;
	padding: 0 2.2em 0 0.75em;
	width: auto;
}
.rz-export select:hover, .rz-export select:focus { background-color: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.45); }
.rz-export select option { color: #3d4449; }
.rz-download {
	align-items: center;
	background: #f56565;
	border: 0;
	border-bottom: 0 !important;
	border-radius: 6px;
	color: #fff !important;
	cursor: pointer;
	display: inline-flex;
	font-size: 0.78em;
	font-weight: 700;
	gap: 0.4em;
	padding: 0.45em 1.1em;
	text-decoration: none;
	transition: background-color 0.2s;
}
.rz-download:hover, .rz-download:focus-visible { background: #e04f4f; color: #fff !important; outline: none; }
.rz-download[aria-disabled="true"] { cursor: default; opacity: 0.45; pointer-events: none; }
.rz-note { background: rgba(255, 210, 122, 0.14); border-radius: 8px; color: #ffe9bf; font-size: 0.75em; line-height: 1.45; margin: 0.7em 0 0; padding: 0.45em 0.75em; }

/* 2b. About the image */
.rz-extra {
	background: #fff;
	border: 1px solid rgba(210, 215, 217, 0.75);
	border-radius: 12px;
	box-shadow: 0 4px 18px rgba(61, 68, 73, 0.06);
	padding: 1em 1.2em 0.9em;
}
.rz-extra-head { align-items: baseline; border-bottom: 1px solid #eef0f1; display: flex; flex-wrap: wrap; gap: 0.3em 0.9em; margin-bottom: 0.75em; padding-bottom: 0.55em; }
.rz-extra-head h3 { font-size: 0.95em; margin: 0 auto 0 0; }
.rz-extra-hint { color: #9aa1a6; font-size: 0.72em; line-height: 1.45; margin: 0.4em 0 0; }
.rz-warn { color: #b7791f; font-size: 0.75em; }
.rz-extra-body { overflow-x: auto; }
.rz-about { border: 0; font-size: 0.78em; margin: 0; width: 100%; }
.rz-about tbody tr { background: none !important; border: 0; border-bottom: 1px solid #f1f2f3; }
.rz-about th, .rz-about td { border: 0; padding: 0.4em 0.8em 0.4em 0; text-align: left; vertical-align: top; }
.rz-about thead th { color: #9aa1a6; font-size: 0.85em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.rz-about tbody th { color: #7f888f; font-weight: 600; white-space: nowrap; width: 8.5em; }
.rz-about td { color: #3d4449; overflow-wrap: anywhere; width: 45%; }
.rz-about tbody tr:last-child td:first-of-type { color: #3d4449; }

/* 3. Settings: icon tabs, then compact rows in named groups */
.rz-settings {
	background: #fff;
	border: 1px solid rgba(210, 215, 217, 0.75);
	border-radius: 12px;
	box-shadow: 0 4px 18px rgba(61, 68, 73, 0.06);
	display: flex;
	flex-direction: column;
	padding: 1em 1.1em 1.1em;
}
.rz-icon-tabs {
	border-bottom: 1px solid #eef0f1;
	display: grid;
	gap: 0.2em;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;                                          /* one row: 5 tabs, or 6 with Page for a PDF */
	margin: 0 0 0.85em;
	padding: 0 0 0.45em;
}
.rz-icon-tabs button {
	align-items: center; background: none !important; border: 0; border-radius: 8px; color: #7f888f !important; cursor: pointer; display: flex;
	flex-direction: column; gap: 0.15em; padding: 0.5em 0.1em !important; position: relative;
}
.rz-icon-tabs button .icon { font-size: 0.95em; }
.rz-icon-tabs button small { font-size: 0.6em; font-weight: 600; }
.rz-icon-tabs button:hover { color: #3d4449 !important; }
.rz-icon-tabs button[aria-selected="true"] { background: rgba(245, 101, 101, 0.1) !important; color: #f56565 !important; }
.rz-cat-body {
	height: clamp(340px, 56vh, 600px);
	overflow-y: auto;
	padding-right: 0.45em;
	scrollbar-color: rgba(127, 136, 143, 0.35) transparent;
	scrollbar-width: thin;
}
.rz-group { padding: 0.1em 0 0.2em; }
.rz-group + .rz-group, .rz-readout + .rz-group, .rz-hint + .rz-group { border-top: 1px solid #eef0f1; margin-top: 0.5em; padding-top: 0.65em; }
.rz-group-title { color: #9aa1a6; font-family: "Open Sans", sans-serif; font-size: 0.66em; font-weight: 700; letter-spacing: 0.09em; margin: 0 0 0.55em; text-transform: uppercase; }
/* one row: name on the left, the control on the right (wide rows: the control under the name) */
.rz-row { align-items: center; column-gap: 0.7em; display: grid; grid-template-columns: 7.6em minmax(0, 1fr); margin: 0 0 0.6em; }
.rz-row.is-wide { grid-template-columns: minmax(0, 1fr); row-gap: 0.3em; }
.rz-row-head { align-items: center; display: flex; gap: 0.35em; min-width: 0; }
.rz-row-head label { color: #3d4449; font-size: 0.78em; font-weight: 600; line-height: 1.25; margin: 0; }
.rz-row.is-changed .sig-reset { background: #f56565; visibility: visible; }
.rz-row-body { min-width: 0; }
.rz-row .sig-seg button { font-size: 0.72em !important; padding: 0.28em 0.3em !important; }
.rz-row .sig-seg button[disabled] { cursor: not-allowed; opacity: 0.4; }
.rz-row .sig-switch span { color: #7f888f; font-size: 0.75em; font-weight: 400; }
.rz-row input[type="range"][disabled], .rz-row .sig-num[disabled] { cursor: not-allowed; opacity: 0.5; }
.rz-numbox { font-size: 0.8em !important; height: 2.2em !important; min-width: 0; text-align: right; width: 100%; }
.rz-numbox::-webkit-inner-spin-button, .rz-numbox::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.rz-text { background: #fff; border: solid 1px rgba(210, 215, 217, 0.75); border-radius: 0.375em; font-size: 0.8em !important; height: 2.2em !important; padding: 0 0.6em; width: 100%; }
.rz-text:focus { border-color: #f56565; box-shadow: 0 0 0 1px #f56565; outline: none; }
.rz-text.is-bad { border-color: #f56565; }
/* width × height */
.rz-dims { align-items: center; display: grid; gap: 0.4em; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.rz-dim { align-items: center; display: flex; gap: 0.35em; margin: 0; min-width: 0; }
.rz-dim > span { color: #9aa1a6; font-size: 0.7em; font-weight: 700; }
.rz-dim small { color: #7f888f; font-size: 0.72em; }
.rz-times { color: #9aa1a6; font-size: 0.85em; }
.rz-inline { align-items: center; display: flex; flex-wrap: wrap; gap: 0.4em 0.9em; justify-content: space-between; }
.rz-inline .sig-link { font-size: 0.75em !important; font-weight: 600; }
.rz-stack { display: flex; flex-direction: column; gap: 0.4em; }
.rz-stack .rz-numbox { width: 6em; }
.rz-unit { color: #7f888f; font-size: 0.75em; font-variant-numeric: tabular-nums; }
.rz-readout { background: #f7f8f9; border-radius: 8px; color: #3d4449; font-size: 0.74em; font-variant-numeric: tabular-nums; line-height: 1.45; margin: 0.3em 0 0.4em; padding: 0.45em 0.7em; }
.rz-readout:empty { display: none; }
.rz-hint { color: #9aa1a6; font-size: 0.7em; line-height: 1.45; margin: 0.1em 0 0.6em; }
/* chips: a few quick values */
.rz-chips { display: flex; flex-wrap: wrap; gap: 0.3em; }
.rz-chip {
	background: #f5f6f7 !important; border: 1px solid rgba(210, 215, 217, 0.75) !important; border-radius: 999px; color: #3d4449 !important; cursor: pointer;
	font-size: 0.72em !important; font-weight: 600; padding: 0.25em 0.75em !important;
}
.rz-chip:hover { border-color: #f56565 !important; color: #f56565 !important; }
.rz-chip[aria-pressed="true"] { background: #f56565 !important; border-color: #f56565 !important; color: #fff !important; }
/* rotate and flip buttons */
.rz-buttons { display: flex; gap: 0.35em; }
.rz-icon-button {
	background: #f5f6f7 !important; border: 1px solid rgba(210, 215, 217, 0.75) !important; border-radius: 8px; color: #3d4449 !important; cursor: pointer;
	font-size: 0.8em !important; padding: 0.4em 0.75em !important;
}
.rz-icon-button:hover { border-color: #f56565 !important; color: #f56565 !important; }
.rz-icon-button[aria-pressed="true"] { background: rgba(245, 101, 101, 0.1) !important; border-color: #f56565 !important; color: #f56565 !important; }
/* the background swatch's two quick choices */
.rz-auto-clear {
	background-color: #fff;
	background-image: linear-gradient(45deg, #d2d7d9 25%, transparent 25%, transparent 75%, #d2d7d9 75%), linear-gradient(45deg, #d2d7d9 25%, transparent 25%, transparent 75%, #d2d7d9 75%);
	background-position: 0 0, 3px 3px;
	background-size: 6px 6px;
	border: 1px solid rgba(0, 0, 0, 0.12);
}
.rz-auto-white { background: #fff; border: 1px solid rgba(0, 0, 0, 0.15); }
/* presets */
.rz-presets { display: flex; flex-direction: column; gap: 0.35em; }
.rz-preset {
	background: #fff !important; border: 1px solid #eef0f1 !important; border-radius: 8px; color: #3d4449 !important; cursor: pointer; display: flex;
	flex: 1; flex-direction: column; gap: 0.1em; padding: 0.45em 0.7em !important; text-align: left; transition: border-color 0.2s, background-color 0.2s; width: 100%;
}
.rz-preset strong { font-size: 0.78em; }
.rz-preset small { color: #7f888f; font-size: 0.68em; }
.rz-preset:hover { border-color: #f56565 !important; }
.rz-preset.is-on { background: rgba(245, 101, 101, 0.05) !important; border-color: #f56565 !important; }
.rz-preset-wrap { align-items: stretch; display: flex; gap: 0.3em; }
.rz-preset-delete { background: none !important; border: 1px solid #eef0f1 !important; border-radius: 8px; color: #9aa1a6 !important; cursor: pointer; font-size: 0.75em !important; padding: 0 0.7em !important; }
.rz-preset-delete:hover { border-color: #f56565 !important; color: #f56565 !important; }
.rz-applied { background: rgba(47, 181, 169, 0.1); border-radius: 8px; color: #23756d; font-size: 0.75em; margin: 0 0 0.7em; padding: 0.45em 0.7em; }
.rz-save { flex-wrap: nowrap; }
.rz-save .rz-chip { flex: 0 0 auto; }
.rz-changed { color: #7f888f; font-size: 0.72em; margin-top: 0.8em; }
.rz-changed .sig-link { font-size: 1em !important; font-weight: 600; }

/* PDF: the page arrows, the page previews (in the Page tab) and a locked PDF's password box */
.rz-pager { align-items: center; display: flex; gap: 0.4em; }
.rz-pager .rz-numbox { width: 4.5em; }
.rz-pager-of { color: #7f888f; font-size: 0.8em; white-space: nowrap; }
.rz-pager-arrow { line-height: 1; padding: 0.45em 0.65em !important; }
.rz-pager-arrow[disabled] { opacity: 0.4; pointer-events: none; }
.rz-thumbs {
	border: 1px solid #eef0f1; border-radius: 10px; display: grid; gap: 0.6em; grid-template-columns: repeat(auto-fill, minmax(5.2em, 1fr));
	margin: 0.2em 0 0.7em; max-height: 24em; overflow-y: auto; padding: 0.6em;
}
.rz-thumb {
	align-items: center; background: none !important; border: 0 !important; box-shadow: none !important; cursor: pointer; display: flex !important;
	flex-direction: column; gap: 0.25em; height: auto !important; line-height: 1 !important; padding: 0 !important;
}
.rz-thumb-pic {
	align-items: center; aspect-ratio: 0.72; background: #f5f6f7; border: 1px solid rgba(210, 215, 217, 0.9); border-radius: 4px; display: flex;
	justify-content: center; overflow: hidden; transition: box-shadow 0.12s; width: 100%;
}
.rz-thumb-pic img { display: block; max-height: 100%; max-width: 100%; }
.rz-thumb-pic.is-bad { background: repeating-linear-gradient(45deg, #f5f6f7 0 6px, #eef0f1 6px 12px); }
.rz-thumb small { color: #7f888f; font-size: 0.68em; font-weight: 600; }
.rz-thumb:hover .rz-thumb-pic, .rz-thumb:focus-visible .rz-thumb-pic { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #f56565; }
.rz-thumb[aria-pressed="true"] .rz-thumb-pic { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f56565; }
.rz-thumb[aria-pressed="true"] small { color: #f56565; }
.rz-password {
	align-items: center; background: rgba(245, 101, 101, 0.07); border: 1px solid rgba(245, 101, 101, 0.35); border-radius: 10px; display: flex;
	flex-wrap: wrap; gap: 0.5em 0.8em; margin: 0 0 1em; padding: 0.7em 0.9em;
}
.rz-password[hidden] { display: none; }
.rz-password .icon { color: #f56565; }
.rz-password label { font-size: 0.85em; font-weight: 600; margin: 0; }
.rz-password input { flex: 1 1 12em; height: 2.4em !important; max-width: 20em; }
.rz-password .button { margin: 0; }

/* ---------- Narrower screens: settings under the result; phones: one column ---------- */
@media screen and (max-width: 1100px) {
	.rz-app { grid-template-areas: "message" "data" "figure" "settings"; grid-template-columns: minmax(0, 1fr); }
	.rz-cat-body { height: auto; max-height: none; }
}
@media screen and (max-width: 736px) {
	.rz-app { gap: 1em; }
	.rz-data, .rz-settings { padding: 0.9em; }
	.rz-figure-card { padding: 1em 0.9em 0.9em; }
	.rz-paper { min-height: 180px; padding: 0.5em; }
	.rz-drop-formats { padding-left: 0; }
	.rz-figure-foot { align-items: stretch; flex-direction: column; }
	.rz-export { justify-content: space-between; }
	.rz-download { flex: 1; justify-content: center; }
	.img-tool-tabs button { flex: 1; min-width: 0; }
	.rz-about tbody th { width: auto; }
}
