/* Prompt Improver: Mobile-First، RTL، بدون فریمورک */
.pimp-wrap {
	--pimp-main: #4f46e5;
	--pimp-bg: #f8fafc;
	--pimp-border: #e2e8f0;
	--pimp-text: #1e293b;
	direction: rtl;
	text-align: right;
	box-sizing: border-box;
	max-width: 960px;
	margin: 0 auto;
	padding: 12px;
	font-family: 'Vazirmatn', Tahoma, sans-serif;
	font-size: 14px; /* موبایل کوچک (<380) */
	line-height: 1.9;
	color: var(--pimp-text);
}
.pimp-wrap *, .pimp-wrap *::before, .pimp-wrap *::after { box-sizing: inherit; }

.pimp-form { display: flex; flex-direction: column; gap: 8px; }
.pimp-label { font-weight: 700; }
.pimp-input {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--pimp-border);
	border-radius: 10px;
	font: inherit;
	resize: vertical;
	min-height: 140px;
}
.pimp-input:focus { outline: 2px solid var(--pimp-main); outline-offset: 1px; }
.pimp-meta { font-size: 12px; color: #64748b; text-align: left; direction: ltr; }

/* دکمه‌ها: تمام‌عرض و لمسی در موبایل */
.pimp-btn {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 20px;
	border: 0;
	border-radius: 10px;
	background: var(--pimp-main);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.pimp-btn:hover { filter: brightness(1.08); }
.pimp-btn:disabled { opacity: .6; cursor: wait; }
.pimp-btn-alt { margin-top: 12px; background: #0f172a; }

.pimp-status { min-height: 1.5em; margin: 8px 0; }
.pimp-error { color: #b91c1c; font-weight: 600; }
.pimp-notice { padding: 10px 12px; border-radius: 10px; background: #fef9c3; color: #713f12; }

.pimp-result { display: flex; flex-direction: column; gap: 12px; }
.pimp-result[hidden] { display: none; }
.pimp-card { padding: 14px; border: 1px solid var(--pimp-border); border-radius: 12px; background: var(--pimp-bg); }
.pimp-h { margin: 0 0 8px; font-size: 1.05em; }

.pimp-score-num { font-size: 2.2em; font-weight: 700; line-height: 1.3; }
.pimp-bar { height: 8px; border-radius: 99px; background: var(--pimp-border); overflow: hidden; }
.pimp-bar-fill { height: 100%; border-radius: 99px; transition: width .6s ease; }
.pimp-bar-fill.pimp-high { background: #16a34a; }
.pimp-bar-fill.pimp-mid { background: #f59e0b; }
.pimp-bar-fill.pimp-low { background: #dc2626; }
.pimp-score-num.pimp-high { color: #16a34a; }
.pimp-score-num.pimp-mid { color: #d97706; }
.pimp-score-num.pimp-low { color: #dc2626; }

.pimp-criteria { display: grid; grid-template-columns: 1fr; gap: 10px; }
.pimp-crit-row { display: flex; justify-content: space-between; margin-bottom: 4px; }

.pimp-feedback { display: grid; grid-template-columns: 1fr; gap: 12px; }
.pimp-list { margin: 0; padding-inline-start: 20px; }

.pimp-output {
	margin: 0;
	padding: 12px;
	border-radius: 10px;
	background: #fff;
	border: 1px dashed var(--pimp-main);
	white-space: pre-wrap;
	word-break: break-word;
	font: inherit;
}

/* موبایل: ۳۸۰ تا ۶۳۹ */
@media (min-width: 380px) {
	.pimp-wrap { font-size: 15px; padding: 14px; }
}

/* تبلت: ۶۴۰ تا ۷۸۰ */
@media (min-width: 640px) {
	.pimp-wrap { font-size: 16px; padding: 20px; }
	.pimp-btn { width: auto; min-width: 200px; align-self: flex-start; }
	.pimp-criteria { grid-template-columns: repeat(2, 1fr); }
}

/* دسکتاپ: بیش از ۷۸۰ */
@media (min-width: 781px) {
	.pimp-criteria { grid-template-columns: repeat(3, 1fr); }
	.pimp-feedback { grid-template-columns: 1fr 1fr; }
}
