/* پلاک ملی ایران (نمایش + ویرایشگر) - نگاه کنید A/plate.js. رنگ پس‌زمینه/نوشته با متغیرهای --irp-bg / --irp-fg از نوع پلاک می‌آید. */
.irp {
    --irp-bg: #ffffff;
    --irp-fg: #111111;
    display: inline-flex;
    direction: ltr;
    align-items: stretch;
    height: 34px;
    background: var(--irp-bg);
    color: var(--irp-fg);
    border: 2px solid #111;
    border-radius: 5px;
    overflow: hidden;
    font-family: Tahoma, "B Nazanin", sans-serif;
    box-shadow: 0 1px 3px rgba(0,0,0,.35);
    vertical-align: middle;
    line-height: 1;
}
.irp * { box-sizing: border-box; }
.irp-strip {
    flex: 0 0 18px;
    background: #1f4fa3;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 2px 0;
}
.irp-flag {
    display: block;
    width: 11px;
    height: 7px;
    background: linear-gradient(to bottom, #239f40 0 33%, #fff 33% 66%, #da0000 66% 100%);
    border: 1px solid rgba(255,255,255,.6);
}
.irp-strip b { font-size: 4.5px; line-height: 5px; text-align: center; font-weight: bold; letter-spacing: .2px; }
.irp-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 8px;
    font-size: 19px;
    font-weight: bold;
    white-space: nowrap;
    position: relative;
}
.irp-main .irp-lbl {
    position: absolute;
    top: 1px;
    left: 0; right: 0;
    text-align: center;
    font-size: 6.5px;
    letter-spacing: .6px;
    font-weight: bold;
}
.irp-prov {
    flex: 0 0 auto;
    min-width: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 2px solid var(--irp-fg);
    padding: 0 5px;
    font-weight: bold;
}
.irp-prov small { font-size: 7px; font-weight: bold; line-height: 8px; }
.irp-prov b, .irp-prov input { font-size: 17px; line-height: 17px; }
.irp-sm { height: 24px; border-width: 1.5px; border-radius: 4px; }
.irp-sm .irp-strip { flex-basis: 13px; }
.irp-sm .irp-flag { width: 8px; height: 5px; }
.irp-sm .irp-strip b { display: none; }
.irp-sm .irp-main { font-size: 13px; padding: 0 5px; gap: 3px; }
.irp-sm .irp-main .irp-lbl { font-size: 5px; top: 0; }
.irp-sm .irp-prov { min-width: 24px; padding: 0 3px; }
.irp-sm .irp-prov small { font-size: 5px; line-height: 6px; }
.irp-sm .irp-prov b { font-size: 12px; line-height: 12px; }

/* ابعاد استاندارد: پلاک پر و پلاک خالی (placeholder) هم‌اندازه باشند (قبلاً پهنا از روی محتوا تعیین می‌شد و پلاک پر از خالی کوچک‌تر دیده می‌شد). فقط حداقل پهنا؛
   محتوای بلندتر (مثل حرف «الف») همچنان جا می‌شود. ویرایشگر (.irp-ed-plate) و موتورسیکلت (.irp-moto) پهنای خودشان را دارند. */
.irp:not(.irp-ed-plate):not(.irp-moto) { box-sizing: border-box; min-width: 160px; }
.irp.irp-sm:not(.irp-ed-plate):not(.irp-moto) { min-width: 106px; }
.irp:not(.irp-ed-plate) .irp-main { justify-content: center; }

/* پلاک موتورسیکلت (دوخطی): نوار پرچم بالا-چپ، ۳ رقم بالا، ۵ رقم پایین (تمام‌عرض) */
.irp.irp-moto { display: inline-grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; height: auto; min-width: 104px; }
.irp-moto .irp-strip { grid-row: 1; grid-column: 1; flex: none; width: 24px; padding: 3px 0; }
.irp-moto .irp-m1 { grid-row: 1; grid-column: 2; align-self: center; text-align: center; font-size: 26px; font-weight: bold; line-height: 30px; padding: 0 8px; }
.irp-moto .irp-m2 { grid-row: 2; grid-column: 1 / span 2; text-align: center; font-size: 30px; font-weight: bold; line-height: 34px; padding: 0 8px 2px; letter-spacing: 1px; border-top: 1px solid rgba(17,17,17,.3); }
.irp.irp-moto.irp-sm { min-width: 78px; }
.irp-moto.irp-sm .irp-strip { width: 16px; }
.irp-moto.irp-sm .irp-m1 { font-size: 17px; line-height: 20px; padding: 0 5px; }
.irp-moto.irp-sm .irp-m2 { font-size: 20px; line-height: 22px; padding: 0 5px 1px; }

/* رنگ متن پلاک نمایشی همیشه از رنگ نوع پلاک (--irp-fg) می‌آید؛ قانون‌های رنگ سراسری جدول/تم تیره (مثل td/span) نباید آن را هم‌رنگ زمینه کنند.
   نوار پرچم (.irp-strip) عمداً مستثنی است (متن سفید روی آبی). */
.irp .irp-main, .irp .irp-main span, .irp .irp-main small, .irp .irp-prov b, .irp .irp-prov small, .irp .irp-m1, .irp .irp-m2 {
    color: var(--irp-fg) !important; -webkit-text-fill-color: var(--irp-fg) !important;
}
.irp .irp-strip, .irp .irp-strip b { color: #fff !important; -webkit-text-fill-color: #fff !important; }

/* ویرایشگر پلاک موتورسیکلت: دو ورودی زیر هم داخل شکل پلاک */
.irp-ed .irp.irp-motoed { height: 84px; }
.irp-ed .irp-motoed .irp-main { flex-direction: column; gap: 2px; justify-content: center; padding: 0 12px; }
.irp-ed .irp-motoed .irp-a, .ylodiv .irp-ed .irp.irp-motoed .irp-a { width: 128px !important; font-size: 26px; border-bottom: 1px solid rgba(17,17,17,.3) !important; }
.irp-ed .irp-motoed .irp-b, .ylodiv .irp-ed .irp.irp-motoed .irp-b { width: 128px !important; font-size: 28px; }

/* پلاک خام (ثبت‌نشده) */
.irp-empty .irp-main, .irp-empty .irp-prov b { opacity: .28; }

/* ویرایشگر */
.irp-ed { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 4px 0 10px; direction: rtl; }
/* ارتفاع/پدینگ صریح: قانون سراسری select{height:40px;padding:10px} متن انتخاب‌شده را از پایین می‌برید */
.irp-ed select.irp-type { width: 128px !important; min-width: 128px; height: 38px !important; padding: 4px 6px !important; line-height: 28px; font-size: 12.5px; flex: 0 0 auto; }
.irp-ed .irp { height: 42px; flex: 0 0 auto; }
/* انتخابگر دقیق (.ylodiv .irp-ed ... ) تا قانون پنل تیره‌ی «.ylodiv input[type=text]» (کادر تیره/عرض ۱۰۰٪) ورودی‌های داخل پلاک را کوچک/ناقص نکند */
.irp-ed input,
.ylodiv .irp-ed .irp input,
.ylodiv .irp-ed .irp-main input,
.ylodiv .irp-ed .irp-prov input {
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    color: inherit !important;
    text-align: center;
    font: inherit;
    font-weight: bold;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    height: auto !important;
    max-width: none;
}
.irp-ed .irp-a, .ylodiv .irp-ed .irp .irp-a { width: 30px !important; min-width: 30px; font-size: 19px; }
.irp-ed .irp-l-fix { min-width: 26px; text-align: center; font-size: 19px; font-weight: bold; }
.irp-ed select.irp-l-sel {
    width: 46px; min-width: 46px; border: 0 !important; outline: 0; background: transparent !important; color: inherit !important;
    font: inherit; font-size: 17px; font-weight: bold; padding: 0 !important; margin: 0 !important; height: auto !important;
    cursor: pointer; text-align-last: center; -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.irp-ed select.irp-l-sel option { color: #111; background: #fff; font-weight: normal; }
.irp-ed .irp-b, .ylodiv .irp-ed .irp .irp-b { width: 44px !important; min-width: 44px; font-size: 19px; }
.irp-ed .irp-p, .ylodiv .irp-ed .irp .irp-p { width: 30px !important; min-width: 30px; }
.irp-ed .irp-note { display: none; } /* توضیح حرف ثابت به‌صورت tooltip (title) روی خود حرف است تا ردیف دو خطی نشود */
.irp-ed .irp-raw { flex: 1 1 100%; font-size: 11px; color: #e67e22; }

/* ردیف پلاک بالای کارت خودرو (فقط وقتی پلاک ثبت شده است؛ بدون پلاک خالی/مخفی می‌ماند) */
.info-plate-field { justify-content: center; }
/* .info-value دارای contain:inline-size است؛ با flex:0 0 auto عرضش صفر می‌شد و پلاک دیده نمی‌شد، پس کل ردیف را پر می‌کند و پلاک داخلش وسط می‌نشیند */
.info-plate-field .info-value { display: flex; justify-content: center; flex: 1 1 100%; text-align: center; }
.info-plate-field .irp { box-shadow: none; }

/* ویرایشگر حالت «form» (فرم‌های Bootstrap پنل مدیریت): ورودی‌های معمولی در یک ردیف + پیش‌نمایش زنده‌ی پلاک */
.irp-fm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 8px; direction: rtl; }
.irp-fm .irp-type { width: 150px !important; flex: 0 0 auto; }
.irp-fm .irp-a, .irp-fm .irp-p { width: 62px !important; flex: 0 0 auto; text-align: center; padding-left: 4px; padding-right: 4px; }
.irp-fm .irp-b { width: 78px !important; flex: 0 0 auto; text-align: center; padding-left: 4px; padding-right: 4px; }
.irp-fm select.irp-l-sel { width: 76px !important; flex: 0 0 auto; padding-left: 4px; padding-right: 4px; }
.irp-fm .irp-l-fix { min-width: 40px; text-align: center; font-weight: bold; font-size: 18px; padding: 0 6px; }
.irp-fm .irp-preview { flex: 0 0 auto; }
.irp-fm .irp-preview:empty { display: none; }
.irp-raw { display: block; font-size: 11px; color: #e67e22; }

/* حروف پلاک در دراپ‌داون: وسط‌چین (متن انتخاب‌شده و گزینه‌ها) */
select.irp-l-sel, .irp-fm select.irp-l-sel, .irp-ed select.irp-l-sel { text-align: center !important; text-align-last: center !important; }
select.irp-l-sel option { text-align: center; }

/* ردیف پلاک در فرم تنظیمات دستگاه (صفحه‌ی اصلی): وسط‌چین */
#plateEditorBox .irp-ed { justify-content: center; }

/* ابعاد دقیقاً یکسان برای همه‌ی انواع پلاک (شخصی/عمومی/تاکسی/دولتی/...): عرض ثابت، نه min-width که با حروف پهن (الف/ص/ش) بزرگ‌تر می‌شد */
.irp:not(.irp-ed-plate):not(.irp-moto) { width: 176px; min-width: 0; }
.irp.irp-sm:not(.irp-ed-plate):not(.irp-moto) { width: 118px; min-width: 0; }
.irp:not(.irp-ed-plate) .irp-main { min-width: 0; padding-left: 4px; padding-right: 4px; }
/* لیست کشویی حرف در ویرایشگر: select متن را به کادر خودش برش می‌دهد؛ ارتفاع کم باعث بریده شدن دنباله‌ی حروف کشیده (ج، ص، ...) می‌شد */
.irp-ed .irp-main select.irp-l-sel, .ylodiv .irp-ed .irp-main select.irp-l-sel { height: 38px !important; line-height: 38px !important; font-size: 19px; padding: 0 !important; overflow: visible; }
.irp-fm select.irp-l-sel { line-height: normal; }

/* پلاک داخل سلول جدول (ستون «پلاک خودرو» لیست‌ها/گزارش‌ها): پهنای ثابت ۱۰۶ پیکسلی پلاک کوچک از ستون‌های باریک بیرون می‌زد؛
   در سلول جدول پلاک تا ۱۰۶ پیکسل بزرگ می‌شود ولی می‌تواند با پهنای ستون کوچک شود (فونت/فاصله‌ها فشرده‌تر) */
.irp-cell { display: block; max-width: 100%; text-align: center; overflow: hidden; }
.irp-cell .irp.irp-sm:not(.irp-ed-plate):not(.irp-moto) { display: flex; width: 100%; max-width: 106px; min-width: 0; margin: 0 auto; }
.irp-cell .irp-sm .irp-main { font-size: 11px; padding: 0 2px; gap: 2px; min-width: 0; overflow: hidden; }
.irp-cell .irp-sm .irp-prov { min-width: 20px; padding: 0 2px; }
.irp-cell .irp-sm .irp-prov b { font-size: 11px; line-height: 11px; }
.irp-cell .irp-sm .irp-strip { flex-basis: 11px; }
