/**
 * Image Downloader Tool — interface styles.
 * Modern, minimal, big touch targets, fully responsive.
 * Uses the CSS variables declared in the theme's style.css.
 */

/* The [hidden] attribute must win over our display:flex/grid rules, otherwise
   hidden status messages and filtered image cards stay visible. */
.idl-tool [hidden],
.idl-tool[hidden] {
	display: none !important;
}

/* ===== Hero ===== */
.idl-hero {
	background:
		radial-gradient( 1200px 420px at 50% -10%, var(--idl-color-primary-soft), transparent 70% ),
		var(--idl-color-bg);
	padding: clamp( 40px, 8vw, 80px ) 0 clamp( 32px, 5vw, 48px );
	text-align: center;
	border-bottom: 1px solid var(--idl-color-border);
}

.idl-hero-title {
	font-size: clamp( 2rem, 6vw, 3.4rem );
	line-height: 1.08;
	letter-spacing: -0.03em;
	margin: 0 0 16px;
	font-weight: 800;
}

.idl-hero-subtitle {
	font-size: clamp( 1.05rem, 2.4vw, 1.25rem );
	color: var(--idl-color-muted);
	max-width: 640px;
	margin: 0 auto 36px;
}

.idl-hero-tool {
	max-width: 780px;
	margin: 0 auto;
}

.idl-hero-badges {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 24px;
	padding: 0;
	margin: 30px auto 0;
	color: var(--idl-color-muted);
	font-size: 15px;
	font-weight: 500;
}

.idl-hero-badges li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.idl-hero-badges li::before {
	content: "";
	width: 18px;
	height: 18px;
	background: var(--idl-color-success);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
	flex: 0 0 auto;
}

/* ===== Tool container ===== */
.idl-tool {
	background: var(--idl-color-bg);
	text-align: left;
	max-width: 100%;
	overflow-x: hidden;
}

.idl-results,
.idl-grid {
	min-width: 0;
	max-width: 100%;
}

.idl-tool-heading {
	text-align: center;
	margin-bottom: 24px;
}

.idl-tool-heading h2 {
	margin: 0 0 8px;
	font-size: clamp( 1.5rem, 3vw, 1.9rem );
}

.idl-tool-heading p {
	margin: 0;
	color: var(--idl-color-muted);
}

/* ===== Input bar ===== */
.idl-form {
	margin: 0;
}

.idl-input-row {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--idl-color-bg);
	border: 2px solid var(--idl-color-border);
	border-radius: 18px;
	padding: 10px 10px 10px 18px;
	box-shadow: var(--idl-shadow-lg);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.idl-input-row:focus-within {
	border-color: var(--idl-color-primary);
	box-shadow: 0 0 0 5px var(--idl-color-primary-soft), var(--idl-shadow-lg);
}

.idl-input-icon {
	color: var(--idl-color-muted);
	display: inline-flex;
	flex: 0 0 auto;
}

.idl-url-input {
	flex: 1 1 auto;
	border: 0;
	outline: 0;
	background: transparent;
	font-size: 17px;
	color: var(--idl-color-text);
	padding: 16px 4px;
	min-width: 0;
	font-family: inherit;
}

.idl-url-input::placeholder {
	color: var(--idl-color-muted);
	opacity: 0.85;
}

/* ===== Buttons (big + touch friendly) ===== */
.idl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	padding: 16px 26px;
	min-height: 54px;
	border-radius: 14px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
	text-decoration: none;
	white-space: nowrap;
}

.idl-btn:active {
	transform: translateY( 1px );
}

.idl-btn-primary {
	background: var(--idl-color-primary);
	color: #fff;
	box-shadow: 0 6px 16px rgba( 37, 99, 235, 0.28 );
}

.idl-btn-primary:hover {
	background: var(--idl-color-primary-hover);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 8px 22px rgba( 37, 99, 235, 0.34 );
}

.idl-btn-outline {
	background: var(--idl-color-bg);
	color: var(--idl-color-text);
	border-color: var(--idl-color-border);
}

.idl-btn-outline:hover {
	border-color: var(--idl-color-primary);
	color: var(--idl-color-primary);
	text-decoration: none;
}

.idl-btn-lg {
	font-size: 17px;
	min-height: 58px;
	padding: 18px 32px;
	border-radius: 16px;
}

.idl-submit {
	flex: 0 0 auto;
}

.idl-btn:disabled,
.idl-btn.is-loading {
	opacity: 0.75;
	cursor: progress;
}

/* ===== Slim indeterminate progress bar (no circles) ===== */
.idl-progress {
	height: 4px;
	border-radius: 999px;
	background: var(--idl-color-border);
	overflow: hidden;
	margin: 14px 6px 0;
	position: relative;
}

.idl-progress span {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 35%;
	border-radius: 999px;
	background: linear-gradient( 90deg, var(--idl-color-primary), var(--idl-color-primary-hover) );
	animation: idl-indeterminate 1.15s ease-in-out infinite;
}

@keyframes idl-indeterminate {
	0%   { left: -35%; width: 35%; }
	50%  { left: 40%;  width: 45%; }
	100% { left: 100%; width: 35%; }
}

/* ===== Options row ===== */
.idl-options {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 16px;
	padding: 0 6px;
	font-size: 14.5px;
	color: var(--idl-color-muted);
}

.idl-min-size {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.idl-min-dimension {
	font-family: inherit;
	font-size: 14.5px;
	padding: 9px 12px;
	border-radius: 10px;
	border: 1.5px solid var(--idl-color-border);
	background: var(--idl-color-bg);
	color: var(--idl-color-text);
	cursor: pointer;
}

.idl-hint {
	margin: 0;
}

/* ===== Status / error messages (static icon, no spin) ===== */
.idl-status {
	margin: 20px auto 0;
	padding: 16px 18px;
	border-radius: 14px;
	font-size: 15.5px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 12px;
	line-height: 1.4;
}

.idl-status::before {
	content: "";
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
}

.idl-status-info {
	background: var(--idl-color-primary-soft);
	color: var(--idl-color-primary-hover);
}

.idl-status-info::before {
	border-radius: 50%;
	background: currentColor;
	animation: idl-pulse 1.2s ease-in-out infinite;
}

@keyframes idl-pulse {
	0%, 100% { opacity: 0.35; transform: scale( 0.8 ); }
	50%      { opacity: 1;    transform: scale( 1 ); }
}

.idl-status-error {
	background: rgba( 220, 38, 38, 0.1 );
	color: var(--idl-color-danger);
}

.idl-status-error::before {
	background: var(--idl-color-danger);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='12'/><line x1='12' y1='16' x2='12.01' y2='16'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='12'/><line x1='12' y1='16' x2='12.01' y2='16'/></svg>") center / contain no-repeat;
}

.idl-status-success {
	background: rgba( 22, 163, 74, 0.1 );
	color: var(--idl-color-success);
}

.idl-status-success::before {
	background: var(--idl-color-success);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
}

/* ===== Skeleton loading (replaces the spinning circle) ===== */
.idl-skeleton {
	margin-top: 26px;
}

.idl-skeleton-caption {
	margin: 0 0 16px;
	font-weight: 600;
	color: var(--idl-color-muted);
	text-align: center;
	font-size: 15.5px;
}

.idl-skeleton-grid {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 18px;
}

.idl-skeleton-card {
	border: 1px solid var(--idl-color-border);
	border-radius: var(--idl-radius);
	padding: 0 0 14px;
	overflow: hidden;
	background: var(--idl-color-bg);
}

.idl-skeleton-thumb {
	aspect-ratio: 4 / 3;
	width: 100%;
}

.idl-skeleton-line {
	height: 11px;
	border-radius: 6px;
	margin: 12px 14px 0;
}

.idl-skeleton-line-sm {
	width: 40%;
}

.idl-skeleton-btn {
	height: 38px;
	border-radius: 10px;
	margin: 14px 14px 0;
}

.idl-skeleton-thumb,
.idl-skeleton-line,
.idl-skeleton-btn {
	background: linear-gradient(
		100deg,
		var(--idl-color-border) 20%,
		var(--idl-color-surface) 40%,
		var(--idl-color-border) 60%
	);
	background-size: 220% 100%;
	animation: idl-shimmer 1.3s linear infinite;
}

@keyframes idl-shimmer {
	from { background-position: 180% 0; }
	to   { background-position: -60% 0; }
}

/* ===== Single image preview ===== */
.idl-single {
	margin-top: 28px;
}

.idl-single-card {
	display: flex;
	gap: 24px;
	background: var(--idl-color-surface);
	border: 1px solid var(--idl-color-border);
	border-radius: var(--idl-radius);
	padding: 22px;
	box-shadow: var(--idl-shadow-sm);
}

.idl-single-preview {
	flex: 0 0 auto;
	width: 260px;
	height: 220px;
	border-radius: var(--idl-radius-sm);
	overflow: hidden;
	background:
		repeating-conic-gradient( var(--idl-color-border) 0% 25%, transparent 0% 50% ) 50% / 22px 22px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.idl-single-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.idl-single-meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.idl-single-name {
	margin: 0;
	font-size: 1.2rem;
	word-break: break-word;
}

.idl-meta-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 9px;
}

.idl-meta-list li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	font-size: 14.5px;
	border-bottom: 1px dashed var(--idl-color-border);
	padding-bottom: 9px;
}

.idl-meta-key {
	color: var(--idl-color-muted);
}

.idl-meta-val {
	font-weight: 600;
	text-align: right;
	word-break: break-word;
}

.idl-single-download {
	align-self: flex-start;
	margin-top: auto;
}

/* ===== Results bar ===== */
.idl-results {
	margin-top: 30px;
}

.idl-results-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px;
	background: var(--idl-color-surface);
	border: 1px solid var(--idl-color-border);
	border-radius: var(--idl-radius);
	position: sticky;
	top: 76px;
	z-index: 20;
}

.idl-results-info {
	font-size: 15.5px;
}

.idl-results-count {
	font-size: 19px;
}

.idl-results-selected {
	color: var(--idl-color-muted);
	margin-left: 6px;
	font-size: 14px;
}

.idl-results-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.idl-results-actions .idl-btn {
	min-height: 46px;
	padding: 12px 20px;
	font-size: 15px;
}

.idl-select-all-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14.5px;
	color: var(--idl-color-muted);
	cursor: pointer;
	user-select: none;
}

.idl-select-all {
	width: 20px;
	height: 20px;
	accent-color: var(--idl-color-primary);
	cursor: pointer;
}

/* ===== Results grid ===== */
.idl-grid {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 18px;
	margin-top: 20px;
}

.idl-card {
	position: relative;
	min-width: 0; /* Allow grid items to shrink; prevents nowrap URLs from overflowing the screen. */
	border: 1px solid var(--idl-color-border);
	border-radius: var(--idl-radius);
	background: var(--idl-color-bg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: var(--idl-shadow-sm);
	transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.idl-card:hover {
	transform: translateY( -3px );
	box-shadow: var(--idl-shadow-md);
	border-color: var(--idl-color-primary);
}

.idl-card-select {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 3;
	cursor: pointer;
}

.idl-card-check {
	position: absolute;
	opacity: 0;
	width: 26px;
	height: 26px;
	margin: 0;
	cursor: pointer;
}

.idl-card-checkbox {
	display: block;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: rgba( 255, 255, 255, 0.92 );
	border: 2px solid var(--idl-color-border);
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.2 );
	transition: background 0.12s ease, border-color 0.12s ease;
}

.idl-card-check:checked + .idl-card-checkbox {
	background: var(--idl-color-primary);
	border-color: var(--idl-color-primary);
}

.idl-card-check:checked + .idl-card-checkbox::after {
	content: "";
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / 16px no-repeat;
}

.idl-card-check:focus-visible + .idl-card-checkbox {
	outline: 3px solid var(--idl-color-primary);
	outline-offset: 2px;
}

.idl-card-thumb {
	position: relative;
	aspect-ratio: 4 / 3;
	background:
		repeating-conic-gradient( var(--idl-color-border) 0% 25%, transparent 0% 50% ) 50% / 18px 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: var(--idl-radius) var(--idl-radius) 0 0;
}

.idl-card-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.idl-nopreview .idl-card-img {
	visibility: hidden;
}

.idl-nopreview .idl-card-thumb::after {
	content: "No preview";
	position: absolute;
	color: var(--idl-color-muted);
	font-size: 13px;
}

.idl-card-badge {
	position: absolute;
	right: 10px;
	top: 10px;
	background: rgba( 15, 20, 27, 0.8 );
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 4px 8px;
	border-radius: 6px;
}

.idl-card-body {
	padding: 12px 14px 4px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.idl-card-dims {
	font-size: 12.5px;
	color: var(--idl-color-muted);
	font-weight: 600;
	min-height: 16px;
}

.idl-card-url {
	font-size: 12.5px;
	color: var(--idl-color-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.idl-card-download {
	margin: 12px 14px 14px;
	min-height: 44px;
	padding: 11px 14px;
	font-size: 14px;
}

/* ===== Sections (how / faq) ===== */
.idl-section {
	padding: clamp( 40px, 7vw, 56px ) 0;
}

.idl-section-title {
	text-align: center;
	font-size: clamp( 1.5rem, 3.4vw, 2.1rem );
	margin: 0 0 36px;
	letter-spacing: -0.02em;
}

.idl-steps {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 22px;
}

.idl-step {
	background: var(--idl-color-surface);
	border: 1px solid var(--idl-color-border);
	border-radius: var(--idl-radius);
	padding: 26px;
}

.idl-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--idl-color-primary);
	color: #fff;
	font-weight: 700;
	margin-bottom: 16px;
}

.idl-step h3 {
	margin: 0 0 6px;
	font-size: 1.15rem;
}

.idl-step p {
	margin: 0;
	color: var(--idl-color-muted);
	font-size: 15px;
}

.idl-how {
	background: var(--idl-color-bg);
}

.idl-faq {
	background: var(--idl-color-surface);
}

.idl-faq-list {
	max-width: 780px;
	margin: 0 auto;
	display: grid;
	gap: 12px;
}

.idl-faq-item {
	background: var(--idl-color-bg);
	border: 1px solid var(--idl-color-border);
	border-radius: var(--idl-radius-sm);
	padding: 4px 20px;
}

.idl-faq-item summary {
	cursor: pointer;
	font-weight: 600;
	padding: 16px 0;
	list-style: none;
	position: relative;
	padding-right: 30px;
	font-size: 16px;
}

.idl-faq-item summary::-webkit-details-marker {
	display: none;
}

.idl-faq-item summary::after {
	content: "+";
	position: absolute;
	right: 2px;
	top: 50%;
	transform: translateY( -50% );
	font-size: 22px;
	color: var(--idl-color-muted);
}

.idl-faq-item[open] summary::after {
	content: "\2212";
}

.idl-faq-answer {
	padding: 0 0 18px;
	color: var(--idl-color-muted);
	line-height: 1.65;
}

/* ===== Responsive ===== */
@media ( max-width: 1024px ) {
	.idl-grid,
	.idl-skeleton-grid {
		grid-template-columns: repeat( 3, 1fr );
	}
}

@media ( max-width: 820px ) {
	.idl-grid,
	.idl-skeleton-grid {
		grid-template-columns: repeat( 2, 1fr );
	}
	.idl-steps {
		grid-template-columns: 1fr;
	}
	.idl-single-card {
		flex-direction: column;
	}
	.idl-single-preview {
		width: 100%;
		height: 240px;
	}
	.idl-results-bar {
		position: static;
	}
}

/* Stack the input + button vertically on phones — big, full-width targets */
@media ( max-width: 620px ) {
	.idl-input-row {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 14px;
		border-radius: 16px;
	}
	.idl-input-icon {
		display: none;
	}
	.idl-url-input {
		padding: 14px 6px;
		font-size: 16px;
		text-align: center;
	}
	.idl-submit {
		width: 100%;
		min-height: 56px;
		font-size: 17px;
	}
	.idl-options {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.idl-results-bar {
		flex-direction: column;
		align-items: stretch;
	}
	.idl-results-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.idl-results-actions .idl-btn {
		width: 100%;
		min-height: 52px;
	}
	.idl-select-all-wrap {
		justify-content: center;
		padding: 6px 0;
	}
	.idl-single-download {
		width: 100%;
	}
}

@media ( max-width: 430px ) {
	.idl-grid,
	.idl-skeleton-grid {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
	.idl-card-download {
		font-size: 13px;
		padding: 10px;
	}
}

/* ===== Compression: cross-link ===== */
.idl-cross-link {
	margin: 14px 6px 0;
	font-size: 14.5px;
	color: var(--idl-color-muted);
}

.idl-cross-link a {
	font-weight: 600;
}

/* ===== Compression controls (in results) ===== */
.idl-compress-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
	margin-top: 14px;
	padding: 14px 18px;
	background: var(--idl-color-primary-soft);
	border: 1px solid var(--idl-color-border);
	border-radius: var(--idl-radius);
	font-size: 14.5px;
}

.idl-cc-title {
	font-weight: 700;
}

.idl-cc-field {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--idl-color-muted);
}

.idl-cc-field input[type="range"] {
	accent-color: var(--idl-color-primary);
	width: 130px;
	cursor: pointer;
}

.idl-cc-field select {
	font-family: inherit;
	font-size: 14px;
	padding: 8px 10px;
	border-radius: 9px;
	border: 1.5px solid var(--idl-color-border);
	background: var(--idl-color-bg);
	color: var(--idl-color-text);
	cursor: pointer;
}

.idl-quality-val {
	font-weight: 700;
	color: var(--idl-color-text);
	min-width: 42px;
}

/* Resize controls (shared: downloader, compressor, converter, resizer) */
.idl-dim-field {
	max-width: 120px;
}

.idl-dim-field input[type="number"] {
	font-family: inherit;
	font-size: 14.5px;
	padding: 8px 10px;
	border-radius: 9px;
	border: 1.5px solid var(--idl-color-border);
	background: var(--idl-color-bg);
	color: var(--idl-color-text);
	width: 100%;
}

.idl-dim-field input[type="number"]:disabled {
	opacity: 0.5;
}

.idl-dim-x {
	font-weight: 700;
	color: var(--idl-color-muted);
	align-self: center;
}

.idl-cc-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--idl-color-muted);
	cursor: pointer;
}

.idl-cc-check input {
	width: 18px;
	height: 18px;
	accent-color: var(--idl-color-primary);
	cursor: pointer;
}

.idl-resize-preset {
	font-family: inherit;
	font-size: 14px;
	padding: 9px 12px;
	border-radius: 10px;
	border: 1.5px solid var(--idl-color-border);
	background: var(--idl-color-bg);
	color: var(--idl-color-text);
	cursor: pointer;
	max-width: 220px;
}

/* ===== Card actions + compression stats ===== */
.idl-card-actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	margin: 10px 14px 14px;
}

.idl-card-actions .idl-btn {
	width: 100%;
	min-height: 42px;
	padding: 10px 12px;
	font-size: 13.5px;
	margin: 0;
	text-align: center;
}

.idl-single-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: auto;
}

.idl-compress-stats {
	margin: 0 14px;
	padding: 8px 10px;
	border-radius: 9px;
	font-size: 12.5px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	align-items: center;
}

.idl-single-compress-stats {
	margin: 4px 0 0;
	font-size: 14px;
}

.idl-compress-working {
	background: var(--idl-color-primary-soft);
	color: var(--idl-color-primary-hover);
	font-weight: 600;
}

.idl-compress-done {
	background: rgba( 22, 163, 74, 0.1 );
}

.idl-compress-error {
	background: rgba( 220, 38, 38, 0.1 );
	color: var(--idl-color-danger);
	font-weight: 600;
}

.idl-stat em {
	font-style: normal;
	color: var(--idl-color-muted);
	margin-right: 4px;
}

.idl-stat-saved {
	font-weight: 800;
	color: var(--idl-color-success);
}

/* ===== Converter: per-card popover ===== */
.idl-convert-wrap {
	position: relative;
}

.idl-card-actions .idl-convert-wrap .idl-card-convert {
	width: 100%;
}

.idl-convert-pop {
	position: absolute;
	left: 0;
	right: 0;
	bottom: calc( 100% + 6px );
	z-index: 30;
	background: var(--idl-color-bg);
	border: 1px solid var(--idl-color-border);
	border-radius: 12px;
	box-shadow: var(--idl-shadow-lg);
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.idl-convert-pop-title {
	font-size: 12px;
	font-weight: 700;
	color: var(--idl-color-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.idl-convert-pop-formats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.idl-convert-fmt {
	flex: 1 1 auto;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 12px;
	border-radius: 9px;
	border: 1.5px solid var(--idl-color-border);
	background: var(--idl-color-bg);
	color: var(--idl-color-text);
	cursor: pointer;
	transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.idl-convert-fmt:hover {
	background: var(--idl-color-primary);
	border-color: var(--idl-color-primary);
	color: #fff;
}

.idl-convert-none {
	color: var(--idl-color-muted);
}

/* ===== Converter: bulk control ===== */
.idl-convert-bulk {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.idl-convert-format {
	font-family: inherit;
	font-size: 14px;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1.5px solid var(--idl-color-border);
	background: var(--idl-color-bg);
	color: var(--idl-color-text);
	cursor: pointer;
	min-height: 46px;
}

.idl-cross-sep {
	margin: 0 6px;
	opacity: 0.5;
}

@media ( max-width: 620px ) {
	.idl-convert-bulk {
		width: 100%;
	}
	.idl-convert-bulk .idl-btn {
		flex: 1 1 auto;
	}
}

/* ===== Responsive: control rows ===== */
@media ( max-width: 680px ) {
	.idl-compress-controls {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}
	.idl-compress-controls .idl-cc-field {
		justify-content: space-between;
	}
	.idl-compress-controls .idl-cc-field input[type="range"] {
		width: 100%;
		max-width: 180px;
	}
	.idl-dim-field {
		max-width: none;
	}
	.idl-dim-x {
		display: none;
	}
	.idl-resize-preset {
		max-width: none;
		width: 100%;
	}
	.idl-convert-bulk {
		width: 100%;
	}
	.idl-convert-bulk .idl-convert-format {
		flex: 1 1 auto;
	}
}

/* ===== Reduced motion ===== */
@media ( prefers-reduced-motion: reduce ) {
	.idl-progress span,
	.idl-status-info::before,
	.idl-skeleton-thumb,
	.idl-skeleton-line,
	.idl-skeleton-btn {
		animation-duration: 2.4s;
	}
	.idl-card {
		transition: none;
	}
}
