/* Injected as a sibling of Dokan's React root (not enqueued into any WP/WooCommerce
   admin-styled context), so - same principle as the old project-upload.css -
   everything needed is self-contained here rather than relying on .button or other
   classes being styled by something else on the page. */

#cwpu-injected-root {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cwpu-panel {
	margin: 16px 0 24px;
	padding: 20px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cwpu-dropzone {
	border: 2px dashed #b5b5b5;
	border-radius: 6px;
	padding: 30px;
	text-align: center;
	color: #666;
	cursor: pointer;
	background: #fff;
}

.cwpu-dropzone.cwpu-dragover {
	border-color: #2b6cb0;
	background: #eef4ff;
	color: #2b6cb0;
}

.cwpu-file-list {
	list-style: none;
	margin: 12px 0;
	padding: 0;
}

.cwpu-file-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
	background: #fff;
	margin-bottom: 6px;
	font-size: 13px;
}

.cwpu-file-row.cwpu-uploading {
	color: #888;
}

.cwpu-file-row a {
	color: #2b6cb0;
	text-decoration: none;
}

.cwpu-file-row a:hover {
	text-decoration: underline;
}

.cwpu-inline-error {
	margin: 8px 0 0;
	padding: 8px 12px;
	background: #fdecea;
	border: 1px solid #e0554f;
	border-radius: 4px;
	color: #a83a35;
	font-size: 13px;
}

.cwpu-remove,
.cwpu-remove-step {
	background: none;
	border: none;
	color: #a83a35;
	cursor: pointer;
	font-size: 12px;
	text-decoration: underline;
	padding: 0;
}

.cwpu-edit-link {
	background: none;
	border: none;
	color: #2b6cb0;
	cursor: pointer;
	font-size: 12px;
	text-decoration: underline;
	padding: 0;
	margin-right: 14px;
}

.cwpu-warning {
	margin-top: 12px;
	padding: 10px 14px;
	border: 1px solid #e0b04f;
	background: #fff8ea;
	border-radius: 4px;
	color: #7a5c17;
	font-size: 13px;
}

.cwpu-warning p {
	margin: 0;
}

.cwpu-notice {
	margin-top: 12px;
	padding: 12px 14px;
	border: 1px solid #d9d9d9;
	background: #f7f7f7;
	border-radius: 4px;
	font-size: 13px;
}

.cwpu-notice p {
	margin: 0 0 8px;
}

.cwpu-button {
	display: inline-block;
	padding: 8px 16px;
	font-size: 13px;
	border-radius: 4px;
	border: 1px solid #ccc;
	background: #fff;
	color: #333;
	cursor: pointer;
}

.cwpu-button:hover {
	background: #f5f5f5;
}

.cwpu-button-primary {
	background: #2b6cb0;
	border-color: #2b6cb0;
	color: #fff;
}

.cwpu-button-primary:hover {
	background: #245a92;
}

.cwpu-button:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Instruction Writer Wizard modal */

.cwpu-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
}

.cwpu-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.cwpu-modal-dialog {
	position: relative;
	max-width: 600px;
	margin: 40px auto;
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	background: #fff;
	border-radius: 8px;
	padding: 28px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cwpu-modal-dialog h2 {
	margin: 0 0 8px;
	font-size: 20px;
}

.cwpu-modal-dialog h3 {
	margin: 20px 0 8px;
	font-size: 15px;
}

.cwpu-modal-dialog label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #555;
	margin: 14px 0 4px;
}

.cwpu-modal-dialog input[type="text"],
.cwpu-modal-dialog textarea {
	width: 100%;
	font-family: inherit;
	font-size: 13px;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
}

.cwpu-modal-dialog textarea {
	min-height: 70px;
}

.cwpu-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #888;
}

.cwpu-modal-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
}

#cwpu-wizard-status {
	margin-right: auto;
	font-size: 13px;
}

#cwpu-wizard-status.cwpu-error {
	color: #a83a35;
}

.cwpu-help {
	color: #666;
	font-size: 13px;
}

.cwpu-step-block {
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	background: #fafafa;
	padding: 14px;
	margin-bottom: 12px;
}

.cwpu-step-block h4 {
	margin: 0 0 8px;
}

.cwpu-step-thumb {
	display: block;
	max-width: 160px;
	margin-top: 8px;
	border-radius: 4px;
}

.cwpu-field-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.cwpu-field-row label,
.cwpu-field-row h4 {
	margin: 0;
}

.cwpu-ai-assist-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	font-size: 12px;
	border-radius: 4px;
	border: 1px solid #8a5fd1;
	background: #f5f0fd;
	color: #6b3fb8;
	cursor: pointer;
	white-space: nowrap;
}

.cwpu-ai-assist-btn::before {
	content: "\2728";
}

.cwpu-ai-assist-btn:hover {
	background: #ece2fa;
}

.cwpu-ai-assist-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

#cwpu-wizard-ai-notes {
	margin-bottom: 4px;
}

.cwpu-description-ai-btn {
	margin: 6px 0 16px;
}

.cwpu-materials-group {
	margin-bottom: 14px;
}

.cwpu-materials-readonly-list {
	list-style: disc;
	margin: 4px 0 0 18px;
	padding: 0;
	font-size: 13px;
	color: #333;
}

.cwpu-materials-empty {
	list-style: none;
	margin-left: -18px;
	color: #999;
	font-style: italic;
}

.cwpu-materials-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.cwpu-materials-row input[type="text"] {
	flex: 1;
}

.cwpu-materials-add {
	margin-top: 2px;
	font-size: 12px;
	padding: 6px 12px;
}

.cwpu-step-number {
	font-weight: 600;
	font-size: 13px;
	color: #333;
}

.cwpu-step-title-input {
	font-weight: 600;
	margin-bottom: 8px !important;
}

.cwpu-step-images {
	margin: 8px 0;
}

.cwpu-image-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	padding: 6px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
}

.cwpu-image-row .cwpu-step-thumb {
	max-width: 50px;
	margin: 0;
	flex-shrink: 0;
}

.cwpu-image-row input[type="text"] {
	flex: 1;
	margin: 0 !important;
}

.cwpu-add-image-btn {
	font-size: 12px;
	padding: 6px 12px;
	margin-top: 4px;
}
