/**
 * Content & Media module settings (modal) – WordPress admin palette and components.
 */

.wp-powersuite-module-settings .wpps-module-callout,
.wp-powersuite-module-settings .wpps-bpc-info-box,
.wp-powersuite-module-settings .wpps-umf-info-box,
.wp-powersuite-module-settings .wpps-ai-alt-info-box {
	margin: 16px 0;
	padding: 12px 14px;
	background: #f0f6fc;
	border: 1px solid #c3c4c7;
	border-left: 4px solid var(--wp-admin-theme-color, #2271b1);
}

.wp-powersuite-module-settings .wpps-module-callout p,
.wp-powersuite-module-settings .wpps-bpc-info-box p,
.wp-powersuite-module-settings .wpps-umf-info-box p {
	margin: 0;
}

.wp-powersuite-module-settings .wpps-module-notice--success,
.wp-powersuite-module-settings .wpps-asfi-apply-done.wpps-module-notice--success {
	background: #edfaef;
	border: 1px solid #c3c4c7;
	border-left: 4px solid #00a32a;
	color: #1d2327;
}

.wp-powersuite-module-settings .wpps-module-notice--warning,
.wp-powersuite-module-settings .wpps-asfi-apply-done.wpps-module-notice--warning {
	background: #fcf9e8;
	border: 1px solid #c3c4c7;
	border-left: 4px solid #dba617;
	color: #1d2327;
}

.wp-powersuite-module-settings .wpps-module-notice--error,
.wp-powersuite-module-settings .wpps-asfi-apply-done.wpps-module-notice--error,
.wp-powersuite-module-settings .wpps-umf-fail {
	background: #fcf0f1;
	border: 1px solid #c3c4c7;
	border-left: 4px solid #d63638;
	color: #1d2327;
}

.wp-powersuite-module-settings .wpps-umf-success {
	background: #edfaef;
	border: 1px solid #c3c4c7;
	border-left: 4px solid #00a32a;
	color: #1d2327;
}

.wp-powersuite-module-settings .wpps-module-notice--success,
.wp-powersuite-module-settings .wpps-module-notice--warning,
.wp-powersuite-module-settings .wpps-module-notice--error,
.wp-powersuite-module-settings .wpps-asfi-apply-done,
.wp-powersuite-module-settings .wpps-umf-message {
	margin: 12px 0;
	padding: 10px 12px;
	border-radius: 0;
}

.wp-powersuite-module-settings .wpps-umf-message:empty {
	display: none !important;
}

/* Bulk Page Creator */
.wpps-bpc-settings .wpps-bpc-card {
	margin: 16px 0;
	padding: 16px;
	background: #fff;
	border: 1px solid #c3c4c7;
}

.wpps-bpc-settings .wpps-bpc-card h3 {
	margin: 0 0 12px;
	font-size: 14px;
}

.wpps-bpc-settings .wpps-bpc-field {
	margin: 12px 0;
}

.wpps-bpc-settings .wpps-bpc-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.wpps-bpc-settings .wpps-bpc-input {
	width: 100%;
	max-width: 100%;
}

.wpps-bpc-settings .wpps-bpc-textarea {
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
}

.wpps-bpc-settings .wpps-bpc-row {
	display: flex;
	gap: 16px;
}

.wpps-bpc-settings .wpps-bpc-field-half {
	flex: 1;
}

.wpps-bpc-settings .nav-tab-wrapper.wpps-bpc-tabs {
	margin-bottom: 12px;
}

.wpps-bpc-settings .wpps-bpc-upload-area {
	border: 2px dashed #c3c4c7;
	padding: 24px;
	text-align: center;
	cursor: pointer;
	background: #fff;
}

.wpps-bpc-settings .wpps-bpc-upload-area:hover {
	border-color: var(--wp-admin-theme-color, #2271b1);
}

.wpps-bpc-settings .wpps-bpc-upload-text {
	margin: 0;
	color: #646970;
}

.wpps-bpc-settings .wpps-bpc-upload-filename {
	margin: 8px 0 0;
	font-weight: 500;
	color: var(--wp-admin-theme-color, #2271b1);
}

.wpps-bpc-settings .wpps-bpc-taxonomy-list {
	max-height: 120px;
	overflow-y: auto;
	padding: 8px;
	background: #fff;
	border: 1px solid #c3c4c7;
}

.wpps-bpc-settings .wpps-bpc-taxonomy-list label {
	display: block;
	margin: 4px 0;
	font-weight: 400;
}

.wpps-bpc-settings .wpps-bpc-actions {
	margin: 16px 0;
	display: flex;
	gap: 8px;
	align-items: center;
}

/* Shared progress + log */
.wp-powersuite-module-settings .wpps-module-progress-wrap,
.wpps-bpc-settings .wpps-bpc-progress-wrap,
.wpps-rt-settings .wpps-rt-progress-wrap,
.wpps-dml-settings .wpps-dml-progress-wrap {
	margin: 16px 0;
}

.wp-powersuite-module-settings .wpps-module-progress-bar,
.wpps-bpc-settings .wpps-bpc-progress-bar,
.wpps-rt-settings .wpps-rt-progress-bar,
.wpps-dml-settings .wpps-dml-progress-bar {
	height: 20px;
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	overflow: hidden;
}

.wp-powersuite-module-settings .wpps-module-progress-fill,
.wpps-bpc-settings .wpps-bpc-progress-fill,
.wpps-rt-settings .wpps-rt-progress-fill,
.wpps-dml-settings .wpps-dml-progress-fill {
	height: 100%;
	background: var(--wp-admin-theme-color, #2271b1);
	transition: width 0.2s ease;
}

.wp-powersuite-module-settings .wpps-module-log,
.wpps-bpc-settings .wpps-bpc-log,
.wpps-rt-settings .wpps-rt-log {
	max-height: 200px;
	overflow-y: auto;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
	padding: 10px;
	color: #1d2327;
}

.wp-powersuite-module-settings .wpps-module-log-entry.success,
.wpps-bpc-settings .wpps-bpc-log-entry.success,
.wpps-rt-settings .wpps-rt-log-entry.success {
	color: #00a32a;
}

.wp-powersuite-module-settings .wpps-module-log-entry.fail,
.wpps-bpc-settings .wpps-bpc-log-entry.fail,
.wpps-rt-settings .wpps-rt-log-entry.fail {
	color: #d63638;
}

.wp-powersuite-module-settings .wpps-module-log-entry.skipped,
.wpps-bpc-settings .wpps-bpc-log-entry.skipped {
	color: #996800;
}

/* Unused Media Finder */
.wpps-umf-settings .wpps-umf-actions {
	margin: 16px 0;
}

.wpps-umf-settings .wpps-umf-loading {
	margin: 12px 0;
	align-items: center;
	display: flex;
	gap: 8px;
}

.wpps-umf-settings .wpps-umf-results {
	margin-top: 16px;
}

.wpps-umf-settings .wpps-umf-summary {
	margin-bottom: 12px;
	font-weight: 600;
}

.wpps-umf-settings .wpps-umf-table-wrap {
	max-height: 400px;
	overflow-y: auto;
	border: 1px solid #c3c4c7;
}

.wpps-umf-settings .wpps-umf-table {
	margin: 0;
}

.wpps-umf-settings .wpps-umf-table .column-preview {
	width: 70px;
}

.wpps-umf-settings .wpps-umf-table .column-size {
	width: 90px;
}

.wpps-umf-settings .wpps-umf-table .column-actions {
	width: 100px;
}

.wpps-umf-settings .wpps-umf-table th.check-column,
.wpps-umf-settings .wpps-umf-table td.check-column {
	width: 2.2em;
	padding: 11px 0 0 8px;
	vertical-align: middle;
}

.wpps-umf-settings .wpps-umf-table .check-column input[type="checkbox"] {
	margin: 0;
	vertical-align: middle;
}

.wpps-umf-settings .wpps-umf-table thead th,
.wpps-umf-settings .wpps-umf-table tbody td,
.wpps-umf-settings .wpps-umf-table tbody th,
.wpps-umf-settings .wpps-umf-table tfoot th {
	vertical-align: middle;
}

.wpps-umf-settings .tablenav {
	margin: 12px 0;
	overflow: hidden;
}

.wpps-umf-settings .tablenav .bulkactions {
	float: left;
	margin-right: 16px;
}

.wpps-umf-settings .tablenav .bulkactions select {
	margin-right: 4px;
}

.wpps-umf-settings .tablenav .alignleft.actions {
	float: left;
	margin-right: 16px;
}

.wpps-umf-settings .tablenav .alignright {
	float: right;
}

.wpps-umf-settings .wpps-umf-table .row-actions .delete button {
	padding: 0;
}

.wpps-umf-settings .wpps-umf-preview {
	width: 50px;
	height: 50px;
	object-fit: cover;
}

.wpps-umf-settings .wpps-umf-preview-icon {
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f1;
}

.wpps-umf-settings .wpps-umf-preview-icon img {
	max-width: 32px;
	max-height: 32px;
}

.wpps-umf-settings .wpps-umf-after-delete {
	margin-top: 16px;
}

/* Download Media Library */
.wpps-dml-settings .wpps-dml-card {
	margin: 16px 0;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid #c3c4c7;
}

.wpps-dml-settings .wpps-dml-card h3 {
	margin: 0 0 12px;
	font-size: 14px;
}

.wpps-dml-settings .wpps-dml-sub-card {
	margin: 16px 0 0;
	padding: 12px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
}

.wpps-dml-settings .wpps-dml-sub-card h4 {
	margin: 0 0 8px;
	font-size: 13px;
}

.wpps-dml-settings .wpps-dml-stat-row {
	margin: 6px 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}

.wpps-dml-settings .wpps-dml-stat-label {
	font-weight: 500;
}

.wpps-dml-settings .wpps-dml-stat-sep {
	margin: 0 8px;
	color: #c3c4c7;
}

.wpps-dml-settings .wpps-dml-option-full {
	margin: 12px 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.wpps-dml-settings .wpps-dml-estimate {
	color: #646970;
	font-size: 12px;
}

.wpps-dml-settings .wpps-dml-list {
	margin: 8px 0 0;
	padding-left: 20px;
	max-height: 200px;
	overflow-y: auto;
	list-style: none;
}

.wpps-dml-settings .wpps-dml-list li {
	margin: 6px 0;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.wpps-dml-settings .wpps-dml-checkbox-list {
	padding-left: 0;
}

.wpps-dml-settings .wpps-dml-checkbox-list li {
	list-style: none;
}

.wpps-dml-settings .wpps-dml-months-actions {
	margin-top: 8px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wpps-dml-settings .wpps-dml-progress-wrap {
	margin: 16px 0;
	padding: 12px;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
}

.wpps-dml-settings .wpps-dml-progress-text {
	margin: 8px 0 0;
	font-size: 13px;
	color: #646970;
}

.wpps-dml-settings .wpps-dml-zips-list {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.wpps-dml-settings .wpps-dml-zips-list li {
	margin: 8px 0;
	padding: 8px;
	background: #fff;
	border: 1px solid #c3c4c7;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}

.wpps-dml-settings .wpps-dml-zip-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.wpps-dml-settings .wpps-dml-info-box {
	margin: 20px 0;
}

@keyframes wpps-dml-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

.wpps-dml-settings .wpps-dml-progress-fill {
	animation: wpps-dml-pulse 1.5s ease-in-out infinite;
}

/* Regenerate Thumbnails */
.wpps-rt-settings .wpps-rt-card {
	margin: 16px 0;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid #c3c4c7;
}

.wpps-rt-settings .wpps-rt-card h3 {
	margin: 0 0 12px;
	font-size: 14px;
}

.wpps-rt-settings .wpps-rt-stat-row {
	margin: 6px 0;
}

.wpps-rt-settings .wpps-rt-stat-label {
	font-weight: 500;
}

.wpps-rt-settings .wpps-rt-stat-value {
	margin-left: 8px;
}

.wpps-rt-settings .wpps-rt-sizes-list {
	margin: 8px 0 0;
	padding-left: 20px;
	max-height: 180px;
	overflow-y: auto;
}

.wpps-rt-settings .wpps-rt-sizes-list li {
	margin: 4px 0;
}

.wpps-rt-settings .wpps-rt-buttons {
	margin: 12px 0;
	display: flex;
	gap: 8px;
	align-items: center;
}

.wpps-rt-settings .wpps-rt-counter {
	font-weight: 500;
	margin-right: 12px;
}

.wpps-rt-settings .wpps-rt-log-wrap h4 {
	margin: 0 0 8px;
	font-size: 13px;
}

.wpps-rt-settings .wpps-rt-log-entry {
	margin: 2px 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wpps-rt-settings .wpps-rt-info-box {
	margin: 20px 0;
}

/* Custom Image Sizes */
.wpps-cis-settings {
	--wpps-cis-gap: 10px;
	--wpps-cis-radius: 0;
}

.wpps-cis-settings .wpps-cis-intro {
	margin-bottom: 16px;
}

.wpps-cis-settings .wpps-cis-card {
	margin: 0 0 16px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #dcdcde;
}

.wpps-cis-settings .wpps-cis-card-title {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wpps-cis-settings .wpps-cis-saved-feedback {
	display: none;
	font-size: 12px;
	color: #00a32a;
	font-weight: 500;
}

.wpps-cis-settings .wpps-cis-saved-feedback.is-visible {
	display: inline;
}

.wpps-cis-settings .wpps-cis-quick-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid #dcdcde;
}

.wpps-cis-settings .wpps-cis-action-group {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.wpps-cis-settings .wpps-cis-label {
	font-size: 12px;
	color: #646970;
	min-width: 48px;
}

.wpps-cis-settings .wpps-cis-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.wpps-cis-settings .wpps-cis-form-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) 80px 80px auto auto;
	gap: var(--wpps-cis-gap);
	align-items: end;
}

@media (max-width: 600px) {
	.wpps-cis-settings .wpps-cis-form-grid {
		grid-template-columns: 1fr 1fr;
		grid-template-areas: "name name" "width height" "crop actions";
	}
	.wpps-cis-settings .wpps-cis-field:first-child { grid-area: name; }
	.wpps-cis-settings .wpps-cis-field:nth-child(2) { grid-area: width; }
	.wpps-cis-settings .wpps-cis-field:nth-child(3) { grid-area: height; }
	.wpps-cis-settings .wpps-cis-field:nth-child(4) { grid-area: crop; }
	.wpps-cis-settings .wpps-cis-field-actions { grid-area: actions; }
}

.wpps-cis-settings .wpps-cis-field {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.wpps-cis-settings .wpps-cis-field label {
	font-size: 12px;
	font-weight: 500;
}

.wpps-cis-settings .wpps-cis-field input[type="text"],
.wpps-cis-settings .wpps-cis-field input[type="number"] {
	max-width: 140px;
	padding: 4px 8px;
}

.wpps-cis-settings .wpps-cis-hint {
	font-size: 11px;
	color: #646970;
}

.wpps-cis-settings .wpps-cis-checkbox-label {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-weight: 400;
}

.wpps-cis-settings .wpps-cis-field-actions {
	display: flex;
	gap: 6px;
}

.wpps-cis-settings .wpps-cis-sizes-list {
	margin: 0;
	padding-left: 20px;
	max-height: 160px;
	overflow-y: auto;
}

.wpps-cis-settings .wpps-cis-sizes-list li {
	margin: 6px 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.wpps-cis-settings .wpps-cis-sizes-list.wpps-cis-readonly li {
	justify-content: flex-start;
}

.wpps-cis-settings .wpps-cis-sizes-list .wpps-cis-empty {
	color: #646970;
	font-style: italic;
	list-style: none;
	margin-left: -20px;
}

.wpps-cis-settings .wpps-cis-item-actions {
	display: flex;
	gap: 4px;
}

.wpps-cis-settings .wpps-cis-details {
	border: 1px solid #dcdcde;
}

.wpps-cis-settings .wpps-cis-summary {
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	padding: 4px 0;
}

.wpps-cis-settings .wpps-cis-subsection {
	margin-top: 12px;
}

.wpps-cis-settings .wpps-cis-subsection h4 {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 500;
	color: #646970;
}

.wpps-cis-settings .wpps-cis-warning {
	background: #fcf0f1;
	border-left: 4px solid #d63638;
	padding: 10px 12px;
	margin: 12px 0;
}

.wpps-cis-settings .wpps-cis-regenerate {
	background: #f0f6fc;
	border: 1px solid #c3c4c7;
	border-left: 4px solid var(--wp-admin-theme-color, #2271b1);
	padding: 12px 16px;
	margin: 16px 0;
}

.wpps-cis-settings .wpps-cis-open-regenerate .dashicons {
	color: inherit;
	line-height: 1;
	margin-right: 4px;
}

/* Auto Set Featured Image */
.wpps-asfi-settings .wpps-asfi-loading,
.wpps-asfi-settings .wpps-asfi-apply-progress {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wpps-asfi-settings .wpps-asfi-loading[style*="display: none"],
.wpps-asfi-settings .wpps-asfi-apply-progress[style*="display: none"] {
	display: none !important;
}

/* AI Alt Text (module settings + attachment UI) */
.wpps-ai-alt-panel .wpps-ai-alt-result.success {
	background: #edfaef;
	color: #1d2327;
	border: 1px solid #c3c4c7;
}

.wpps-ai-alt-panel .wpps-ai-alt-result.error {
	background: #fcf0f1;
	color: #1d2327;
	border: 1px solid #c3c4c7;
}

.wpps-ai-alt-progress-bar {
	height: 8px;
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	overflow: hidden;
}

.wpps-ai-alt-progress-fill {
	height: 100%;
	background: var(--wp-admin-theme-color, #2271b1);
}

/* Disable Heartbeat settings */
.wp-powersuite-module-settings .wpps-heartbeat-mode-option {
	margin: 0 0 15px;
	padding: 0;
	border: 0;
}

.wp-powersuite-module-settings .wpps-heartbeat-mode-sub {
	margin: 10px 0 0 25px;
}

.wp-powersuite-module-settings .wpps-heartbeat-preset-select {
	margin-left: 8px;
}

.wp-powersuite-module-settings .wpps-heartbeat-custom-interval {
	margin-top: 10px;
}

.wp-powersuite-module-settings .wpps-heartbeat-interval-label {
	display: block;
}
