/* Saudi plate letters. Builds on style.css and pdf.css (field, copy button, privacy note).
   The plate itself is drawn white with dark ink in both themes, like a real plate. */

.plates-form .field { margin-top: 0; }
.plates-tool .status { color: var(--error); margin: 8px 0 0; }
.plates-tool .status:empty { display: none; }
.plates-tool [aria-invalid="true"] { border-color: var(--error); }
.plates-tool input[name="plate"] { font-size: 20px; letter-spacing: 0.04em; }

.plate {
  --plate-ink: #111;
  display: flex;
  width: min(100%, 360px);
  aspect-ratio: 335 / 155;
  margin: 20px auto 0;
  background: #fff;
  color: var(--plate-ink);
  border: 3px solid var(--plate-ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.15);
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}
.plate-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-width: 0;
}
.plate-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 4px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  font-size: clamp(22px, 9vw, 38px);
  font-variant-numeric: tabular-nums;
}
.plate-cell:nth-child(odd) { border-inline-end: 2px solid var(--plate-ink); }
.plate-cell:nth-child(-n + 2) { border-bottom: 2px solid var(--plate-ink); }
.plate-let { letter-spacing: 0.06em; }
.plate-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 15%;
  border-inline-start: 2px solid var(--plate-ink);
  font-size: clamp(11px, 3.6vw, 16px);
  font-weight: 800;
}
.plate.is-sample .plate-cell { color: #9a9a9a; }

.plates-read { display: grid; gap: 8px; margin: 16px 0 0; }
.plates-read div { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; border-radius: 12px; background: var(--bg); }
.plates-read dt { color: var(--muted); font-size: 14px; min-width: 6em; }
.plates-read dd { margin: 0; font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.plates-read dd:empty::after { content: "—"; color: var(--muted); font-weight: 400; }

.plates-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.plates-table { white-space: normal; }
.plates-table .plates-ar, .plates-table .plates-en { font-size: 20px; font-weight: 700; }
.plates-pairs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.plates-pairs li { display: flex; justify-content: center; gap: 8px; padding: 8px; border-radius: 10px; background: var(--bg); font-size: 18px; }
.plates-pairs b { font-variant-numeric: tabular-nums; }
