/* Iranian license plate input — shared (web / iOS shell / body inspection) */

.ir-plate-wrap {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border: 2px solid #1E293B;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    max-width: 300px;
    direction: ltr;
    unicode-bidi: isolate;
    box-shadow: 0 2px 10px rgba(7, 27, 176, 0.08);
}

.ir-plate-main {
    display: grid;
    grid-template-columns: minmax(52px, 1.25fr) minmax(36px, 0.85fr) minmax(44px, 1fr);
    align-items: center;
    gap: 0.15rem;
    padding: 0.4rem 0.55rem;
    flex: 1;
    min-width: 0;
    direction: ltr;
}

.ir-plate-main .ir-plate-p1 { grid-column: 1; }
.ir-plate-main .ir-plate-letter { grid-column: 2; }
.ir-plate-main .ir-plate-p2 { grid-column: 3; }

.ir-plate-main input {
    border: none;
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.35rem 0.2rem;
    background: transparent;
    outline: none;
    width: 100%;
    min-width: 0;
    color: #1E293B;
}

.ir-plate-main input:focus {
    background: rgba(7, 27, 176, 0.06);
    border-radius: 6px;
}

.ir-plate-main .ir-plate-p2 { max-width: none; }
.ir-plate-main .ir-plate-letter { max-width: none; font-family: inherit; }
.ir-plate-main .ir-plate-p1 { max-width: none; }

.ir-plate-iran {
    background: linear-gradient(180deg, #071BB0, #051080);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.35rem 0.4rem;
    min-width: 44px;
    flex-shrink: 0;
}

.ir-plate-iran-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
}

.ir-plate-iran input {
    border: none;
    background: transparent;
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.1;
    width: 100%;
    max-width: 36px;
    min-width: 0;
    outline: none;
    margin: 0;
    padding: 0;
    letter-spacing: 0;
}

.ir-plate-iran input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

/* iOS app shell — full width on small screens */
body.sp-ios-app-shell .ir-plate-wrap,
body.bi-panel .ir-plate-wrap {
    max-width: 100%;
}

body.sp-ios-app-shell .ir-plate-main input,
body.bi-panel .ir-plate-main input {
    font-size: 1.15rem;
    padding: 0.45rem 0.25rem;
}

body.sp-ios-app-shell .ir-plate-iran,
body.bi-panel .ir-plate-iran {
    min-width: 46px;
    padding: 0.4rem 0.42rem;
}

body.sp-ios-app-shell .ir-plate-iran input,
body.bi-panel .ir-plate-iran input {
    font-size: 0.82rem;
    max-width: 38px;
}

/* Android wizard pages */
.sp-android-wizard .ir-plate-wrap {
    max-width: 100%;
}

/* Read-only plate display */
.ir-plate-display {
    pointer-events: none;
    user-select: text;
}

.ir-plate-display .ir-plate-seg {
    display: block;
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    color: #1E293B;
    padding: 0.35rem 0.2rem;
    line-height: 1.2;
    min-height: 1.5rem;
}

.ir-plate-display .ir-plate-letter {
    font-family: inherit;
}

.ir-plate-display .ir-plate-province-display {
    display: block;
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.1;
    color: #fff;
    text-align: center;
}

.ir-plate-empty {
    opacity: 0.75;
}

body.sp-ios-app-shell .ir-plate-display .ir-plate-seg,
body.bi-panel .ir-plate-display .ir-plate-seg {
    font-size: 1.1rem;
    padding: 0.4rem 0.25rem;
}

body.sp-ios-app-shell .ir-plate-display .ir-plate-province-display,
body.bi-panel .ir-plate-display .ir-plate-province-display {
    font-size: 0.82rem;
}
