/* Vehicle Registration Lookup (AB#79434) — operator screen field pair and details modal. */
.prompt.vehicle-reg .relative {
    position: relative;
}

.vehicle-reg-action {
    position: absolute;
    right: 6px;
    top: 4px;
    background: none;
    border: 0;
    padding: 4px 6px;
    margin: 0;
    width: auto;
    height: auto;
    line-height: 1;
    color: #555;
    cursor: pointer;
}

.vehicle-reg-action:hover:not(:disabled) {
    color: #000;
}

.vehicle-reg-action:disabled {
    opacity: 0.5;
    cursor: default;
}

/* The registration input leaves room for the button so long values do not run under it. */
input.vehicle-reg-registration {
    padding-right: 32px;
}

.vehicle-reg-error {
    color: #c00;
    font-size: 12px;
    margin-top: 2px;
}

.vehicle-reg-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.vehicle-reg-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 560px;
    max-width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
}

.vehicle-reg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vehicle-reg-modal-header h3 {
    margin: 0;
}

.vehicle-reg-modal-close {
    background: none;
    border: 0;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    width: auto;
}

.vehicle-reg-modal-summary {
    font-size: 18px;
    font-weight: 700;
    margin: 16px 0;
}

.vehicle-reg-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

.vehicle-reg-modal-label {
    font-size: 12px;
    font-weight: 700;
    color: #444;
}

.vehicle-reg-modal-value {
    font-size: 16px;
}

.vehicle-reg-mot-toggle {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding-top: 16px;
    border: 0;
    border-top: 1px solid #ddd;
    background: none;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.vehicle-reg-mot-panel {
    margin-top: 12px;
}


/*
 * The locked companion prompt in the Advanced script builder (AB#79496 AC4).
 *
 * It has no delete or drag handle, which is the functional half of "locked". This
 * is the visual half: without it the missing icons just look like a rendering
 * fault rather than a deliberate constraint.
 */
li.prompt.vehicle-reg-companion {
    opacity: 0.75;
}

li.prompt.vehicle-reg-companion .pcaption {
    font-style: italic;
}

li.prompt.vehicle-reg-companion::before {
    content: "\21B3";
    padding-right: 6px;
    color: #666;
}

/*
 * Details modal heading: the manufacturer badge beside the summary line, laid out
 * as the WPF client does it.
 */
.vehicle-reg-modal-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.vehicle-reg-modal-heading .vehicle-reg-modal-summary {
    margin: 0;
}

.vehicle-reg-modal-logo {
    width: 65px;
    height: auto;
    flex-shrink: 0;
}

/*
 * The Registration cell is drawn as a UK rear number plate, so an agent reading a
 * reg back to a caller is looking at the same thing the caller is looking at.
 * The modal is the only place that gets this treatment - the Operator Screen and
 * Preview inputs are ordinary text fields.
 *
 * Yellow rather than white: UK fronts are white and rears are yellow, and yellow
 * is the one that reads unmistakably as a plate. The exact yellow, grey border,
 * 5px radius and 150x35 shape are taken from the WPF client (Wpf.Rita
 * VehicleInfo.xaml), so an agent who sees both reads one thing.
 *
 * The plate typeface is Charles Wright, which is not a webfont and is not
 * redistributable here. It is named first anyway, along with the free
 * UKNumberPlate clone, so a machine that happens to have either installed gets
 * the real letterforms for nothing. Everything after that is the approximation:
 * a bold condensed grotesque with wide tracking, which is what carries the
 * impression even when the shapes are not exact.
 */
.vehicle-reg-plate-static {
    display: inline-block;
    min-width: 150px;
    font-family: "UKNumberPlate", "Charles Wright", "Arial Narrow",
        "Nimbus Sans Narrow", "Liberation Sans Narrow", Impact, sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
    color: #000;
    background-color: #f2cf53;
    border: 1px solid #808080;
    border-radius: 5px;
    padding: 5px 12px;
}

/*
 * The Preview panel's magnifying glass. Test case 80153 expects it to be visible
 * there, while AC4 forbids a search from running in Preview - so it is drawn and
 * positioned exactly like the Operator Screen's button but is inert: not a
 * button, not focusable, and not offering a pointer that implies it can be used.
 */
.vehicle-reg-action-inert {
    cursor: default;
    pointer-events: none;
}
