@font-face {
    font-family: 'El Messiri';
    src: url('../fonts/ElMessiri-Medium.woff2') format('woff2'),
        url('../fonts/ElMessiri-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
* {
    font-family: 'El Messiri';
}
h3 {
    font-family: 'El Messiri';
}
@font-face {
  font-family: 'InriaSans';
  src: url('fonts/InriaSans-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'NotoNaskhArabic';
  src: url('fonts/NotoNaskhArabic-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'BebasNeue';
  src: url('fonts/BebasNeue-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Amiri';
  src: url('fonts/Amiri-Bold.ttf') format('truetype');
}

body {
    margin: 0;
    padding: 0;
    background: #eee;
    font-family: 'El Messiri';
    }
.plate1 {
    text-align: center;
    background: #FFF;
    width: 90%;
    margin: 10px auto;
    padding: 10px;
    border-radius: 10px;
}
  .shapes {
    display: flex;
    gap: 3px; /* مسافة بينهما */
    margin: auto;
    align-items: center;
  }
 .square {
    width: 55px;
    height: 25px;
    background: #c0c0c0;
    border-radius: 4px;
    margin: 0px 10px;
  }

  .circle {
    width: 30px;
    height: 30px;
    background: #444;
    border-radius: 50%;
  }
    .input-area {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

    /*input {
    font-size: 18px;
    padding: 5px;
    width: 30px;
    margin: 5px;
    text-align: center;
}*/

    button {
      font-family: 'El Messiri';
      padding: 10px 20px;
      font-size: 16px;
    }

    .plate {
      font-family: sans-serif;
      width: 90%;
      max-width: 800px;
      height: 190px;
      aspect-ratio: 4/1;
      background: #f7f7ec;
      border: 6px solid #000;
      margin: 20px auto;
      border-radius: 15px;
      display: grid;
      grid-template-columns: 2.5fr 1fr 2.5fr;
      grid-template-rows: 1fr 1fr;
      gap: 0px;
      direction: rtl;
      position: relative;
      overflow: hidden;
    }
/* العمود الصغير */
.side-column{
  display:none !important;
  grid-row: 1 / span 2;
  border-left: 3px solid #000;
  background: #f7f7ec;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.side-column img{
  width: 40px !important;
  height: 50px !important;
  object-fit: contain;
}
.sideText{
  font-family: Arial, sans-serif;
  font-weight: 600;
  font-size: 8px;
}
.sideText2{
  font-family: Arial, sans-serif;
  font-weight: 800;
  font-size: 12px;
  line-height: 2;
}

/* ✅ نمط الصورة فقط = 4 أعمدة */
.plate.image-mode{
  grid-template-columns: 48px 2.5fr 1fr 2.5fr !important;
}

/* الترتيب الصحيح من اليمين (RTL):
   [عمود صغير] → [الحروف] → [الشعار] → [الأرقام] */

/* العمود الصغير */
.plate.image-mode .side-column{
  display: flex !important;
  grid-column: 1;
}

/* الحروف */
.plate.image-mode .letter-arabic,
.plate.image-mode .letter-english{
  grid-column: 2;
}

/* الشعار */
.plate.image-mode .middle-box{
  grid-column: 3;
}

/* الأرقام */
.plate.image-mode .number-arabic,
.plate.image-mode .number-english{
  grid-column: 4;
}

/* ✅ إصلاح الجوال: منع كسر 4 أعمدة */
@media (max-width: 480px){
  .plate.image-mode{
    grid-template-columns: 40px 1.6fr 1fr 1.6fr !important;
  }
}

    .box {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
    .char-box1, .char-box2, .char-box3, .char-box4 {
        font-family: Amiri;
    }
    .char-box_s1, .char-box_s2, .char-box_s3 {
        font-family: Arial;
    }
    
	.char-box_s1 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }
    .char-box_s2 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }
	.char-box_s3 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }
    .char-box_s4, .char-box_s5, .char-box_s6 {
        font-family: InriaSans;
    }
	.char-box_s4 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }
	.char-box_s5 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }
	.char-box_s6 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }

      .char-box1 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }
    .char-box2 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }

	.char-box3 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }

	.char-box4 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }
    
.char-box5, .char-box6, .char-box7, .char-box8 {
    font-family: "InriaSans";
    font-weight: 500;
}
	.char-box5 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }

	.char-box6 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }
	.char-box7 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }
    .char-box8 {
      width: 50px;
      text-align: center;
      font-size: 50px;
      font-weight: bold;
    }


    .letter-arabic {
      border-bottom: 3px #000 solid;
      grid-column: 1;
      grid-row: 1;
    }

    .letter-english {
      grid-column: 1;
      grid-row: 2;
    }

    .middle-box {
      border-right: 3px #000 solid;
      border-left: 3px #000 solid;
      grid-column: 2;
      grid-row: 1 / span 2;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      font-size: 14px;
      text-align: center;
    }

    .middle-box .icon {
      font-size: 24px;
      line-height: 28px;
    }
    .middle-box .icon2 {
      font-size: 35px;
      line-height: 28px;
    }

    .number-arabic {
      border-bottom: 3px #000 solid;
      grid-column: 3;
      grid-row: 1;
    }

    .number-english {
      grid-column: 3;
      grid-row: 2;
      height: 85px;
    }

    /* كلاس لتوسيط الرقمين الثاني والثالث */
    .center-two-numbers {
      justify-content: center;
      gap: 30px;
    }
    h2 {color: #c60f50;}
    h2, label {
        font-family: 'El Messiri';
    }
    
    /* تعديل تصميم اللوحة ليكون متجاوب على الجوال */
@media (max-width: 480px) {
  .plate {
    width: 100% !important;
    max-width: 96% !important;
    aspect-ratio: unset !important;
    padding: 5px !important;
    grid-template-columns: 1.5fr 1fr 1.5fr !important;
    grid-template-rows: auto auto !important;
  }

  .char-box_s1, .char-box_s2, .char-box_s3,
  .char-box_s4, .char-box_s5, .char-box_s6,
  .char-box1, .char-box2, .char-box3, .char-box4,
  .char-box5, .char-box6, .char-box7, .char-box8 {
    font-size: 30px !important;
    width: 25px !important;
    min-width: 20px !important;
    height: auto !important;
  }

  /*.middle-box {
    font-size: 14px !important;
  }*/
  

  .middle-box .icon {
    font-size: 20px !important;
  }

  /* تكبير حقول الإدخال */
  .input-area input[type="text"] {
    width: 40px !important;
    font-size: 20px !important;
    margin: 4px 3px !important;
    padding: 6px !important;
  }

  button {
    font-size: 16px !important;
    padding: 10px 18px !important;
  }
}

/* إخفاء overflow الأفقي */
body, html {
  overflow-x: hidden;
}

.download {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    padding: 14px 36px;
    font-size: 18px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(34, 197, 94, .4);
}
/* ====== Select (Modern) ====== */
.select-wrap, .select-wrap2 {
  position:relative;
  display:inline-block;
  margin-bottom: 10px;
}

.select-wrap select, .select-wrap2 select{
  width:100%;
  padding: 12px 44px 12px 14px;   /* يمين للسهم */
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.9);
  color:#111;
  font: 600 15px/1.2 "El Messiri", system-ui, sans-serif;
  outline:none;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
  transition: .18s ease;
  direction: rtl;
  margin-bottom: 10px;
}

/* Hover */
.select-wrap select:hover, .select-wrap2 select:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}

/* Focus */
.select-wrap select:focus, .select-wrap2 select:focus{
  border-color: rgba(99,102,241,.55);
  box-shadow: 0 0 0 4px rgba(99,102,241,.18), 0 14px 30px rgba(0,0,0,.10);
}

/* Disabled */
.select-wrap select:disabled, .select-wrap2 select:disabled{
  opacity:.6;
  cursor:not-allowed;
  transform:none;
}

/* ====== Custom Arrow ====== */
.select-wrap::after{
  content:"";
  position:absolute;
  top:65%;
  inset-inline-end: 14px;        /* يدعم RTL/LTR */
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(0,0,0,.55);
  border-bottom: 2px solid rgba(0,0,0,.55);
  transform: translateY(-60%) rotate(45deg);
  pointer-events:none;
  transition: .18s ease;
}
.select-wrap2::after{
  content:"";
  position:absolute;
  top:30%;
  inset-inline-end: 14px;        /* يدعم RTL/LTR */
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(0,0,0,.55);
  border-bottom: 2px solid rgba(0,0,0,.55);
  transform: translateY(-60%) rotate(45deg);
  pointer-events:none;
  transition: .18s ease;
}
/*.select-wrap:focus-within::after{
  border-color: rgba(99,102,241,.9);
  transform: translateY(-65%) rotate(225deg);
}*/

/* ====== Options (محدود الدعم حسب المتصفح) ====== */
.select-wrap select option{
  font: 500 15px/1.2 "El Messiri", system-ui, sans-serif;
}

/* ====== Modern Input ====== */
.input-wrap{
    width: 200px;
    margin: 0 auto;
    display: flex;
}

.input-wrap input{
  width: 100%;
  padding: 0px 8px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.92);
  font: 900 30px "El Messiri", system-ui, sans-serif;
  color: #111;
  direction: rtl;
  outline: none;
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  transition: .22s ease;
  text-align: center;
}

/* Hover */
.input-wrap input:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,.08);
}

/* Focus */
.input-wrap input:focus{
  border-color: rgba(99,102,241,.6);
  box-shadow:
    0 0 0 4px rgba(99,102,241,.18),
    0 16px 36px rgba(0,0,0,.10);
}

/* Placeholder */
.input-wrap input::placeholder{
  color: #9aa3af;
  font-weight: 500;
}

/* Disabled */
.input-wrap input:disabled{
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}
