/**
 * Nederlandse kentekenplaat-input (overgenomen van kentekencheckdirect.nl).
 * Lettertype: Kenteken © 2004 LeFly – CC BY-SA 3.0
 * (assets/fonts/kenteken/License.txt)
 */

@font-face {
  font-family: "Kenteken";
  src: url("../fonts/kenteken/Kenteken.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.kenteken-plate {
  --plate-yellow-top: #F8B505;
  --plate-yellow-bottom: #EBA603;
  --plate-border: #1a1a1a;
  display: flex;
  width: 100%;
  max-width: 440px;
  height: 88px;
  min-height: 88px;
  margin: 0;
  border: 3px solid var(--plate-border);
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--plate-yellow-top), var(--plate-yellow-bottom));
  box-sizing: border-box;
}

.kenteken-input-holder {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
}

.kenteken-input-holder::before {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 11%;
  background-color: #2756c7;
  border-radius: 3px 0 0 3px;
  background-image: url("../img/kentekencheck.png");
  background-size: 65% auto;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  pointer-events: none;
}

.plate-input-area {
  flex: 1;
  background: linear-gradient(to bottom, #F8B505, #EBA603);
  display: flex;
  align-items: center;
  padding: 0 1.25rem 0 15%;
  min-width: 0;
  box-sizing: border-box;
}

.plate-input {
  width: 100%;
  height: 100%;
  min-height: 82px;
  border: none;
  background: transparent;
  font-family: "Kenteken", "Oswald", sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: #2f2c2c;
  text-transform: uppercase;
  text-align: center;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.plate-input::placeholder {
  color: transparent;
  opacity: 0;
}

.plate-input:focus,
.plate-input:focus-visible {
  outline: none;
  box-shadow: none;
}

.kenteken-input-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.kenteken-display {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-transform: uppercase;
  white-space: pre;
  overflow: hidden;
  min-width: 0;
}

.plate-input-area .kenteken-display {
  font-family: "Kenteken", "Oswald", sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: #2f2c2c;
}

.plate-input-area .kenteken-display--placeholder {
  color: rgba(47, 44, 44, 0.32);
}

.kenteken-caret {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: -1px;
  vertical-align: middle;
  background: currentColor;
  animation: kenteken-caret-blink 1s step-end infinite;
}

.kenteken-input-wrap:not(:focus-within) .kenteken-caret {
  visibility: hidden;
}

@keyframes kenteken-caret-blink {
  50% { opacity: 0; }
}

.kenteken-input-wrap .plate-input {
  position: relative;
  z-index: 1;
  color: transparent !important;
  caret-color: transparent;
  -webkit-text-fill-color: transparent;
}

.kenteken-input-wrap .plate-input::placeholder {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  opacity: 0 !important;
}

/* In calc-card: echte plaat-proporties (niet volle card-breedte) */
.tool-page .calc-card .kenteken-plate {
  max-width: min(440px, 100%);
  width: 100%;
}

.tool-page .calc-card .kenteken-plate .plate-input,
.tool-page .calc-card .kenteken-plate .plate-input:focus {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #2f2c2c;
}

@media (max-width: 480px) {
  .kenteken-plate {
    max-width: 100%;
    height: 76px;
    min-height: 76px;
  }

  .plate-input {
    font-size: 2.25rem;
    letter-spacing: 0.15em;
    min-height: 70px;
  }

  .plate-input-area .kenteken-display {
    font-size: 1.875rem;
    letter-spacing: 0.1em;
  }
}
