/* فرم خرید فقط در محدودهٔ افزونه است؛ رنگ اصلی از تم همان محصول خوانده می‌شود. */
.mpf-panel {
    box-sizing: border-box;
    flex-basis: 100%; width: 100%; min-width: 0;
    margin: 0 0 18px; padding: clamp(14px, 2.8vw, 22px);
    border: 1px solid var(--pw-line, #cde5ef);
    border-inline-start: 4px solid var(--pw, #008b98);
    border-radius: 18px; background: #fff;
    box-shadow: 0 5px 0 var(--pw-line, #d9edf1);
    color: var(--pw-ink, #0a2540); text-align: right;
}
.mpf-panel *, .mpf-panel *::before, .mpf-panel *::after { box-sizing: border-box; }
.mpf-panel [hidden], .mpf-panel[hidden] { display: none !important; }
.mpf-panel .mpf-heading {
    margin: 0 0 18px; padding: 0 0 13px;
    border: 0; border-bottom: 1px solid var(--pw-line, #d9edf1);
    font-size: 1rem; font-weight: 800; text-align: right;
}
/* دو ورودی حساب کنار هم قرار می‌گیرند؛ راهنما و آپلود همیشه یک ردیف کامل دارند. */
.mpf-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mpf-field { min-width: 0; grid-column: 1 / -1; }
.mpf-type-email, .mpf-type-password { grid-column: auto; }
.mpf-panel .mpf-label, .mpf-panel legend {
    display: block; margin: 0 0 8px; padding: 0;
    font-weight: 750; font-size: .9rem; line-height: 1.8; text-align: right;
}
.mpf-required { margin-inline-start: 5px; color: #a11a1a; }
.mpf-panel fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.mpf-panel input:not([type=radio]):not([type=checkbox]):not([type=file]):not([type=hidden]),
.mpf-panel select, .mpf-panel textarea {
    width: 100%; min-height: 48px; margin: 0; padding: 10px 13px;
    border: 1px solid var(--pw-line, #cde5ef); border-radius: 12px;
    background: var(--pw-bg, #f4fbfd); color: inherit; font: inherit;
    box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.mpf-panel input:focus-visible, .mpf-panel select:focus-visible, .mpf-panel textarea:focus-visible,
.mpf-panel button:focus-visible {
    outline: 2px solid var(--pw, #008b98); outline-offset: 3px;
}
/* کارت تأیید و انتخاب با کلیک روی تمام سطح فعال می‌شود؛ حالت انتخاب‌شده واضح است. */
.mpf-panel .mpf-choice {
    display: flex; align-items: center; gap: 10px; min-height: 49px;
    margin: 0 0 8px; padding: 12px 14px;
    border: 1px solid var(--pw-line, #cde5ef); border-radius: 12px;
    background: #fff; color: inherit; cursor: pointer; text-align: right; line-height: 1.8;
    transition: border-color .15s, background-color .15s;
}
.mpf-choice:last-child { margin-bottom: 0; }
.mpf-choice:hover, .mpf-choice:focus-within { border-color: var(--pw, #008b98); }
.mpf-choice:has(input:checked) {
    border-color: var(--pw, #008b98); background: var(--pw-bg, #edfafa);
    box-shadow: inset -3px 0 var(--pw, #008b98);
}
.mpf-choice input {
    flex: 0 0 auto; width: 18px; height: 18px; margin: 0;
    accent-color: var(--pw, #008b98); cursor: pointer;
}
.mpf-choice span { min-width: 0; }
.mpf-help { padding: 11px 13px; background: var(--pw-bg, #f4fbfd); border-radius: 10px; }
.mpf-help, .mpf-upload-status { margin: 9px 0 0; color: var(--pw-muted, #526477); font-size: .82rem; line-height: 1.9; overflow-wrap: anywhere; }
.mpf-help p { margin: 0 0 10px; }
.mpf-help p:last-child { margin-bottom: 0; }
/* دکمهٔ نمایش رمز کنار همان ورودی است؛ مقدار رمز با تغییر نوع ورودی عوض نمی‌شود. */
.mpf-password { position: relative; }
.mpf-panel .mpf-password input { padding-right: 91px !important; }
.mpf-panel .mpf-password-toggle {
    position: absolute; right: 6px; top: 6px; bottom: 6px;
    min-height: 36px; width: 78px; margin: 0; padding: 4px 7px;
    border: 1px solid var(--pw-line, #cde5ef); border-radius: 8px;
    background: #fff; color: var(--pw-ink, #0a2540);
    font: inherit; font-size: .75rem; font-weight: 700; line-height: 1.4; cursor: pointer;
    box-shadow: none; text-transform: none;
}
/* ناحیهٔ انتخاب فایل فارسی و تمام‌سطح است و با صفحه‌کلید نیز قابل استفاده می‌ماند. */
.mpf-panel .mpf-upload {
    position: relative; display: flex; align-items: center; gap: 12px;
    min-height: 98px; margin: 0; padding: 17px;
    border: 1.5px dashed var(--pw, #008b98); border-radius: 14px;
    background: var(--pw-bg, #f4fbfd); cursor: pointer; text-align: right;
}
.mpf-upload-icon {
    display: grid; place-items: center; flex: 0 0 42px; height: 42px;
    border: 1px solid var(--pw-line, #cde5ef); border-radius: 12px;
    background: #fff; color: var(--pw-ink, #0a2540); font-size: 26px;
}
.mpf-upload-copy { flex: 1 1 auto; min-width: 0; }
.mpf-upload-copy strong, .mpf-upload-copy > span { display: block; }
.mpf-upload-copy strong { font-size: .9rem; }
.mpf-upload-copy > span { margin-top: 4px; font-size: .75rem; color: var(--pw-muted, #526477); }
.mpf-upload-button {
    flex: 0 0 auto; padding: 9px 13px; border-radius: 9px;
    background: var(--pw, #008b98); color: #062536; font-size: .8rem; font-weight: 800;
    border: 1px solid var(--pw-ink, #0a2540);
}
.mpf-panel .mpf-upload input[type=file] {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
    opacity: 0; cursor: pointer;
}
.mpf-upload:focus-within { outline: 2px solid var(--pw, #008b98); outline-offset: 3px; }
.mpf-field[data-upload-state=done] .mpf-upload-status { color: #166534; }
.mpf-field[data-upload-state=error] .mpf-upload-status { color: #a11a1a; }
/* در موبایل کادرها یک‌ستونه‌اند و کنترل فایل از عرض صفحه بیرون نمی‌زند. */
@media (max-width: 600px) {
    .mpf-fields { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .mpf-type-email, .mpf-type-password { grid-column: 1 / -1; }
    .mpf-panel .mpf-upload { flex-wrap: wrap; padding: 13px; gap: 9px; }
    .mpf-upload-copy { flex-basis: calc(100% - 55px); }
    .mpf-upload-button { margin-inline-start: 51px; }
}
