.license-plate-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.license-plate-modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.license-plate-modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.3s ease;
}
.license-plate-modal-close:focus,
.license-plate-modal-close:hover {
  color: #000;
}
.license-plate-modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.license-plate-modal-plate-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
  border-radius: 10px;
}
.license-plate-modal-plate {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 280px;
  height: 140px;
  background: linear-gradient(145deg, #fff, #f0f0f0);
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 10px;
  position: relative;
}
.license-plate-modal-plate-inner {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.license-plate-modal-text {
  font-family: KCTTabienrod, Kanit, sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: #000;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.license-plate-modal-text .thai-consonant {
  font-size: 1.1em;
  letter-spacing: -0.05em;
  vertical-align: middle;
  display: inline-block;
  font-weight: 900;
}
.license-plate-modal-text .number {
  font-size: 1.1em;
  letter-spacing: -0.05em;
  vertical-align: middle;
  display: inline-block;
  font-weight: 900;
}
.license-plate-modal-text .thai-tone,
.license-plate-modal-text .thai-vowel-upper {
  font-size: 0.8em;
  margin-left: -0.35em;
  margin-right: -0.15em;
  position: relative;
  top: -0.85em;
  display: inline-block;
  width: auto;
  pointer-events: none;
  vertical-align: middle;
  line-height: 1;
}
.license-plate-modal-text .thai-tone {
  top: -1.15em;
  margin-left: -0.35em;
  margin-right: -0.15em;
}
.license-plate-modal-text .thai-vowel-lower {
  font-size: 0.8em;
  margin-left: -0.35em;
  margin-right: -0.15em;
  position: relative;
  top: 0.25em;
  display: inline-block;
  width: auto;
  pointer-events: none;
  vertical-align: middle;
  line-height: 1;
}
.license-plate-modal-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}
.license-plate-modal-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e8e8e8;
}
.license-plate-modal-detail-row:last-child {
  border-bottom: none;
}
.license-plate-modal-label {
  font-weight: 600;
  color: #333;
  min-width: 120px;
  font-size: 0.95rem;
}
.license-plate-modal-value {
  color: #666;
  font-size: 0.95rem;
  text-align: right;
  flex: 1;
  padding-left: 15px;
  word-break: break-word;
}
.license-plate-modal-plate.background-ขาวดำ {
  background-image: url("../shared_assets/white_black.webp") !important;
  background-size: cover !important;
  background-position: center !important;
  color: #000 !important;
}
.license-plate-modal-plate.background-ทอง {
  background-image: url("../shared_assets/gold.webp") !important;
  background-size: cover !important;
  background-position: center !important;
  color: #000 !important;
  border-color: #000 !important;
}
.license-plate-modal-plate.background-ฟ้า {
  background-image: url("../shared_assets/blue.webp") !important;
  background-size: cover !important;
  background-position: center !important;
  border-color: #2196f3 !important;
}
.license-plate-modal-plate.background-ฟ้า .license-plate-modal-text,
.license-plate-modal-plate.background-ฟ้า .license-plate-modal-text * {
  color: #2196f3 !important;
}
.license-plate-modal-plate.background-เขียว {
  background-image: url("../shared_assets/green.webp") !important;
  background-size: cover !important;
  background-position: center !important;
  border-color: green !important;
}
.license-plate-modal-plate.background-เขียว .license-plate-modal-text,
.license-plate-modal-plate.background-เขียว .license-plate-modal-text * {
  color: #008000 !important;
}
.license-plate-modal-plate.background-ม่วง {
  background-image: url("../shared_assets/purple.webp") !important;
  background-size: cover !important;
  background-position: center !important;
  color: #000 !important;
  border-color: #000 !important;
}
.license-plate-modal-plate.background-ขาวฟ้า {
  background-image: url("../shared_assets/ขาวฟ้า.webp") !important;
  background-size: cover !important;
  background-position: center !important;
  border-color: #2196f3 !important;
}
.license-plate-modal-plate.background-ขาวฟ้า .license-plate-modal-text,
.license-plate-modal-plate.background-ขาวฟ้า .license-plate-modal-text * {
  color: #2196f3 !important;
}
.license-plate-modal-plate.background-ขาวเขียว {
  background-image: url("../shared_assets/ขาวเขียว.webp") !important;
  background-size: cover !important;
  background-position: center !important;
  border-color: #008000 !important;
}
.license-plate-modal-plate.background-ขาวเขียว .license-plate-modal-text,
.license-plate-modal-plate.background-ขาวเขียว .license-plate-modal-text * {
  color: #008000 !important;
}
@media (max-width: 768px) {
  .license-plate-modal-content {
    width: 95%;
    padding: 20px;
    margin: 20% auto;
  }
  .license-plate-modal-plate {
    width: 240px;
    height: 120px;
  }
  .license-plate-modal-text {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (min-width: 744px) and (max-width: 827px) {
  .license-plate-modal-content {
    width: 80%;
    max-width: 500px;
  }
  .license-plate-modal-plate {
    width: 320px;
    height: 160px;
  }
  .license-plate-modal-text {
    font-size: 4rem !important;
  }
}
.license-plate-modal-detail-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.license-plate-modal-label {
  min-width: auto;
}
.license-plate-modal-value {
  text-align: left;
  padding-left: 0;
}
.license-plate-modal-plate {
  width: 200px;
  height: 100px;
}
.license-plate-modal-text {
  font-size: clamp(1.5rem, 10vw, 2rem);
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.license-plate-modal-details {
  padding: 15px;
  gap: 10px;
}
.license-plate-modal-label {
  font-size: 0.85rem;
}
.license-plate-modal-value {
  font-size: 0.85rem;
}

/* Match homepage category colors for white/black van and pickup plates */
.license-plate-modal-plate.background-ขาวดำ.category-van {
  border-color: #2196f3 !important;
}

.license-plate-modal-plate.background-ขาวดำ.category-van
  .license-plate-modal-text,
.license-plate-modal-plate.background-ขาวดำ.category-van
  .license-plate-modal-text * {
  color: #2196f3 !important;
  text-shadow: 0.5px 0.5px 0 rgba(33, 150, 243, 0.3);
}

.license-plate-modal-plate.background-ขาวดำ.category-pickup {
  border-color: #008000 !important;
}

.license-plate-modal-plate.background-ขาวดำ.category-pickup
  .license-plate-modal-text,
.license-plate-modal-plate.background-ขาวดำ.category-pickup
  .license-plate-modal-text * {
  color: #008000 !important;
  text-shadow: 0.5px 0.5px 0 rgba(0, 128, 0, 0.3);
}
