/* Licence plate: the shared plate component of vehicle lists, pages, pickers and other features' tabs.
   A Dutch plate is yellow with the blue EU band; other countries keep a white plate with their code.
   Plate colours are the registers' own and therefore stay the same in the dark theme. */
.licence-plate {
    box-sizing: border-box;
    display: inline-flex;
    align-items: stretch;
    height: 24px;
    overflow: hidden;
    border: 1.5px solid var(--register-plate-edge);
    border-radius: 4px;
    background: var(--register-plate-white);
    color: var(--register-plate-ink);
    font-family: "DIN Alternate", "Arial Narrow", Arial, sans-serif;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--shadow-ink) 18%, transparent);
}

.licence-plate[data-country="NL"] {
    background: var(--register-plate-yellow);
}

/* The blue EU band with the circle of stars and the country code. */
.licence-plate-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-width: 13px;
    padding: 0 1px 2px;
    background: var(--register-plate-band);
    color: var(--register-plate-white);
    font-size: 6px;
    font-weight: 800;
    letter-spacing: 0;
}

.licence-plate-band::before {
    width: 7px;
    height: 7px;
    margin-top: 3px;
    margin-bottom: auto;
    border: 1px dotted var(--register-plate-stars);
    border-radius: 50%;
    content: "";
}

.licence-plate-number {
    display: flex;
    align-items: center;
    padding: 0 7px 0 6px;
}

/* Selection dialogs make every span of a choice a block; a plate in a choice keeps its own layout. */
.selection-dialog__copy .licence-plate {
    display: inline-flex;
    margin-top: 3px;
}

.selection-dialog__copy .licence-plate-band,
.selection-dialog__copy .licence-plate-number {
    display: flex;
    overflow: visible;
    font-weight: 800;
    line-height: 1;
}

/* The record header shows the plate large. */
.licence-plate--large {
    height: 44px;
    border-width: 2px;
    border-radius: 6px;
    font-size: 25px;
}

.licence-plate--large .licence-plate-band {
    min-width: 24px;
    padding-bottom: 4px;
    font-size: 10px;
}

.licence-plate--large .licence-plate-band::before {
    width: 13px;
    height: 13px;
    margin-top: 5px;
    border-width: 2px;
}

.licence-plate--large .licence-plate-number {
    padding: 0 14px 0 12px;
}

/* The plate input of the create page wears the same plate around a text field. */
.licence-plate--input {
    height: 52px;
    border-width: 2px;
    border-radius: 6px;
    font-size: 26px;
}

.licence-plate--input .licence-plate-band {
    min-width: 28px;
    padding-bottom: 5px;
    font-size: 11px;
}

.licence-plate--input .licence-plate-band::before {
    width: 15px;
    height: 15px;
    margin-top: 6px;
    border-width: 2px;
}

.licence-plate--input input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-align: center;
    text-transform: uppercase;
}

.licence-plate--input input:focus {
    outline: none;
}

.licence-plate--input:focus-within {
    outline: 3px solid var(--focus-ring, var(--primary));
    outline-offset: 2px;
}

/* A vehicle without a plate, such as a machine, says so in the plate's place. */
.licence-plate-missing {
    color: var(--muted);
    font-size: 12px;
}

/* Vehicle identity: a compact term and value grid in Objecten's object panel. */
.vehicle-identity {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1rem;
    margin: 0;
}

.vehicle-identity dd {
    margin: 0;
}
