/**
 * Formulaire de commentaires personnalisés (fiches « commentaires »).
 * Skin thème, accent réseau (--smm-accent). Scopé sous .jdp-coms.
 */

.jdp-coms {
	--jdp-coms-accent: var(--smm-accent, #6d28d9);
	margin: 14px 0 4px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #e6eaf1;
	border-radius: 14px;
}

.jdp-coms-title {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
}

.jdp-coms-hint {
	margin: 3px 0 10px;
	font-size: 12.5px;
	line-height: 1.4;
	color: #64748b;
}

.jdp-coms-theme,
.jdp-coms-text {
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 14px;
	color: #0f172a;
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

.jdp-coms-theme {
	padding: 9px 12px;
	margin-bottom: 8px;
}

.jdp-coms-text {
	padding: 10px 12px;
	line-height: 1.5;
	resize: vertical;
	min-height: 96px;
}

.jdp-coms-theme:focus,
.jdp-coms-text:focus {
	outline: none;
	border-color: var(--jdp-coms-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--jdp-coms-accent) 15%, transparent);
}

.jdp-coms-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
}

.jdp-coms-generate {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 14px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--jdp-coms-accent);
	background: color-mix(in srgb, var(--jdp-coms-accent) 10%, #fff);
	border: 1.5px solid color-mix(in srgb, var(--jdp-coms-accent) 35%, #fff);
	border-radius: 10px;
	cursor: pointer;
	transition: background 140ms ease, transform 140ms ease;
}

.jdp-coms-generate:hover {
	background: color-mix(in srgb, var(--jdp-coms-accent) 16%, #fff);
}

.jdp-coms-generate:active {
	transform: scale(0.98);
}

.jdp-coms-generate:disabled {
	opacity: 0.6;
	cursor: default;
}

.jdp-coms-count {
	font-size: 12.5px;
	font-weight: 600;
	color: #64748b;
	font-variant-numeric: tabular-nums;
}

/* Dépassement du palier acheté : le surplus sera ignoré à la commande. */
.jdp-coms-count.is-over {
	color: #c0392b;
}

.jdp-coms-feedback {
	margin: 8px 0 0;
	min-height: 0;
	font-size: 12.5px;
	line-height: 1.35;
}

.jdp-coms-feedback.is-error {
	color: #dc2626;
	min-height: 16px;
}
