/**
 * WP Media Tools Suite -- Frontend styling.
 * Scoped entirely under .wpmts-tool so it never leaks into the host
 * theme's global styles.
 */

.wpmts-tool {
	max-width: 560px;
	margin: 1.5em 0;
	padding: 1.5em;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	background: #fafafa;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wpmts-tool__title {
	margin: 0 0 1em;
	font-size: 1.15em;
}

.wpmts-field {
	margin-bottom: 1em;
	display: flex;
	flex-direction: column;
	gap: 0.35em;
}

.wpmts-field label {
	font-size: 0.85em;
	font-weight: 600;
	color: #333;
}

.wpmts-field input[type="text"],
.wpmts-field input[type="number"],
.wpmts-field select {
	padding: 0.5em 0.65em;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 0.95em;
}

.wpmts-field input[type="file"] {
	padding: 0.4em 0;
}

.wpmts-field input[type="range"] {
	width: 100%;
}

.wpmts-submit {
	display: inline-block;
	padding: 0.65em 1.4em;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 0.95em;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.wpmts-submit:hover {
	background: #1a5a8a;
}

.wpmts-submit:disabled {
	background: #999;
	cursor: not-allowed;
}

.wpmts-progress {
	margin-top: 1em;
}

.wpmts-progress__bar {
	height: 8px;
	border-radius: 4px;
	background: #e2e2e2;
	overflow: hidden;
}

/* Indeterminate animated progress bar -- we don't have real byte-level
   upload progress across a fetch()-based multipart POST without extra
   XHR plumbing, so an animated indeterminate bar communicates "working"
   honestly rather than faking a fixed percentage. */
.wpmts-progress__bar span {
	display: block;
	width: 40%;
	height: 100%;
	background: #2271b1;
	border-radius: 4px;
	animation: wpmts-indeterminate 1.2s ease-in-out infinite;
}

@keyframes wpmts-indeterminate {
	0%   { margin-left: -40%; }
	100% { margin-left: 100%; }
}

.wpmts-progress__text {
	margin: 0.5em 0 0;
	font-size: 0.85em;
	color: #555;
}

.wpmts-result {
	margin-top: 1.25em;
	padding-top: 1.25em;
	border-top: 1px solid #e2e2e2;
}

.wpmts-result__preview {
	display: block;
	max-width: 100%;
	border-radius: 6px;
	margin-bottom: 0.75em;
}

.wpmts-download-btn {
	display: inline-block;
	padding: 0.55em 1.2em;
	background: #1a7e34;
	color: #fff !important;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.9em;
}

.wpmts-download-btn:hover {
	background: #146228;
}

.wpmts-notice {
	padding: 0.75em 1em;
	border-radius: 6px;
	font-size: 0.9em;
}

.wpmts-notice--error {
	background: #fdeaea;
	color: #9a2a2a;
	border: 1px solid #f3c1c1;
}

.wpmts-notice--disabled {
	background: #f3f3f3;
	color: #666;
	border: 1px dashed #ccc;
}
