/**
 * PixelCraft with WebP — Settings & bulk UI (WordPress admin).
 */

.pclwebp-admin {
	--wvf-accent: #2271b1;
	--wvf-accent-dark: #135e96;
	--wvf-ok: #00a32a;
	--wvf-warn: #dba617;
	--wvf-bad: #d63638;
	--wvf-card-border: #c3c4c7;
	--wvf-card-radius: 10px;
	--wvf-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 24px rgba(0, 0, 0, 0.06);
	max-width: 880px;
}

/* Header */
.pclwebp-header {
	margin: 0 0 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #dcdcde;
}

.pclwebp-header__title {
	margin: 0 0 6px;
	font-size: 23px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.25;
}

.pclwebp-header__lead {
	margin: 0;
	font-size: 14px;
	color: #646970;
}

/* Status strip */
.pclwebp-status-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
}

.pclwebp-status {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	flex: 1 1 240px;
	min-width: 0;
	padding: 14px 16px;
	border-radius: var(--wvf-card-radius);
	border: 1px solid var(--wvf-card-border);
	background: #fff;
	box-shadow: var(--wvf-shadow);
}

.pclwebp-status__icon {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	font-size: 22px;
	line-height: 1;
	margin-top: 2px;
}

.pclwebp-status--ok .pclwebp-status__icon {
	color: var(--wvf-ok);
}

.pclwebp-status--bad .pclwebp-status__icon {
	color: var(--wvf-bad);
}

.pclwebp-status--info .pclwebp-status__icon {
	color: var(--wvf-accent);
}

.pclwebp-status__title {
	display: block;
	margin: 0 0 4px;
	font-size: 14px;
}

.pclwebp-status__text,
.pclwebp-status__meta {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: #50575e;
}

.pclwebp-status__meta {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #f0f0f1;
	font-size: 12px;
}

/* Settings form: section cards */
.pclwebp-settings-form > h2 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 24px 0 0;
	padding: 14px 18px;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #1d2327;
	background: linear-gradient(180deg, #fafafa 0%, #f6f7f7 100%);
	border: 1px solid var(--wvf-card-border);
	border-bottom: none;
	border-radius: var(--wvf-card-radius) var(--wvf-card-radius) 0 0;
}

.pclwebp-settings-form > h2:first-of-type {
	margin-top: 0;
}

.pclwebp-settings-form .form-table {
	margin-top: 0;
	margin-bottom: 0;
	background: #fff;
	border: 1px solid var(--wvf-card-border);
	border-radius: 0 0 var(--wvf-card-radius) var(--wvf-card-radius);
	box-shadow: var(--wvf-shadow);
}

.pclwebp-settings-form .form-table th {
	width: 220px;
	padding: 18px 18px 18px 18px;
	font-weight: 600;
	vertical-align: top;
}

.pclwebp-settings-form .form-table td {
	padding: 18px 18px 18px 0;
	vertical-align: top;
}

.pclwebp-settings-form .form-table tr:first-child th,
.pclwebp-settings-form .form-table tr:first-child td {
	padding-top: 20px;
}

.pclwebp-settings-form .form-table tr:last-child th,
.pclwebp-settings-form .form-table tr:last-child td {
	padding-bottom: 20px;
}

@media screen and (max-width: 782px) {
	.pclwebp-settings-form .form-table th {
		width: auto;
		padding-bottom: 4px;
	}

	.pclwebp-settings-form .form-table td {
		padding-left: 18px;
		padding-top: 0;
	}
}

/* Toggle row */
.pclwebp-toggle {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	max-width: 52rem;
}

.pclwebp-toggle__input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.pclwebp-toggle__input:focus + .pclwebp-toggle__track {
	outline: 2px solid var(--wvf-accent);
	outline-offset: 2px;
}

.pclwebp-toggle__track {
	position: relative;
	flex-shrink: 0;
	width: 44px;
	height: 26px;
	margin-top: 1px;
	background: #c3c4c7;
	border-radius: 999px;
	transition: background 0.2s ease;
}

.pclwebp-toggle__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease;
}

.pclwebp-toggle__input:checked + .pclwebp-toggle__track {
	background: var(--wvf-accent);
}

.pclwebp-toggle__input:checked + .pclwebp-toggle__track::after {
	transform: translateX(18px);
}

.pclwebp-toggle__text {
	flex: 1;
	font-size: 14px;
	line-height: 1.55;
	color: #2c3338;
}

/* Select */
.pclwebp-field-inline {
	display: inline-block;
}

.pclwebp-select {
	min-width: 120px;
	padding: 6px 28px 6px 10px;
	font-size: 14px;
	line-height: 1.5;
	border-radius: 6px;
	border-color: #8c8f94;
	background-color: #fff;
}

/* Dimensions */
.pclwebp-dimensions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	max-width: 520px;
}

@media screen and (max-width: 600px) {
	.pclwebp-dimensions {
		grid-template-columns: 1fr;
	}
}

.pclwebp-dimensions__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pclwebp-dimensions__field label {
	font-weight: 600;
	font-size: 13px;
	color: #1d2327;
}

.pclwebp-dimensions__field .small-text {
	width: 100%;
	max-width: 200px;
	padding: 6px 10px;
	border-radius: 6px;
}

.pclwebp-dimensions__field .description {
	font-size: 12px;
	color: #646970;
}

.pclwebp-dimensions__hint {
	margin-top: 12px !important;
}

/* Save row */
.pclwebp-submit {
	margin-top: 0 !important;
	padding-top: 18px !important;
	border-top: none;
}

.pclwebp-submit .button-primary {
	font-size: 14px !important;
	min-height: 40px !important;
	padding: 0 22px !important;
	border-radius: 6px !important;
}

/* Layout column */
.pclwebp-layout {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.pclwebp-upload-hint {
	margin: 0 0 16px;
	padding: 12px 14px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	font-size: 13px;
	line-height: 1.55;
	color: #50575e;
}

/* Bulk card */
.pclwebp-card--bulk {
	margin: 0;
	padding: 22px 22px 24px;
	background: #fff;
	border: 1px solid var(--wvf-card-border);
	border-radius: var(--wvf-card-radius);
	box-shadow: var(--wvf-shadow);
}

.pclwebp-card__title {
	margin: 0 0 10px;
	padding: 0;
	font-size: 16px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	border: none;
	background: none;
}

.pclwebp-card__intro {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.55;
	color: #50575e;
}

.pclwebp-inline-notice {
	padding: 10px 14px;
	margin-bottom: 16px;
	border-radius: 6px;
	font-size: 13px;
	line-height: 1.5;
	border-left: 4px solid var(--wvf-warn);
	background: #fcf9e8;
	color: #50575e;
}

.pclwebp-bulk-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.pclwebp-bulk-actions .button-hero {
	height: auto !important;
	padding: 10px 18px !important;
	line-height: 1.4 !important;
	border-radius: 6px !important;
}

.pclwebp-bulk-hint {
	margin: 0 0 14px !important;
	font-size: 13px;
	color: #646970;
}

.pclwebp-bulk-redo {
	margin: 0 0 12px !important;
	font-size: 13px;
}

.pclwebp-bulk-redo label {
	font-weight: 500;
}

.pclwebp-progress-wrap progress {
	width: 100%;
	max-width: 100%;
	height: 10px;
	margin-top: 4px;
	border-radius: 999px;
	overflow: hidden;
	accent-color: var(--wvf-accent);
}

.pclwebp-status__title {
	font-weight: 600;
}

.pclwebp-bulk-status {
	margin-top: 0.75rem;
	font-weight: 600;
	font-size: 14px;
}

.pclwebp-bulk-log {
	max-height: 220px;
	overflow: auto;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 10px 14px;
	margin-top: 8px;
	font-size: 13px;
}

.pclwebp-bulk-log li {
	margin: 6px 0;
}

/* Media library pills */
.pclwebp-pill {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.pclwebp-pill--ok {
	background: #d5f5dd;
	color: #1e4620;
}

.pclwebp-pill--pending {
	background: #f0f0f1;
	color: #50575e;
}
