/* Global font size adjustment */
body {
    font-size: clamp(14px, 1.5vw, 18px); /* ปรัขนาดฟอนต์ขงเนื้อหาทั่วไป */
    line-height: 1.6;
}
section[name="Plate"] {
    width: -webkit-fill-available;
    /* max-width: 375px; */
    font-size: 1.2em;
    padding: 1rem;
    margin: 80px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* นื้อหาใน Plate Section (ยกเว้น .plate-body) */
/* section[name="Plate"] > *:not(.plate-body) {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.5;
}
section[name="Plate"] .plate-body {
    width: -webkit-fill-available;
    max-width: 512px;
    height: auto;
    aspect-ratio: 21/9;
    color: #060606;
    border: 5px solid black;
    border-radius: 10px;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: flex-start;
} */

.plate {
    min-width: 195px;
    max-width: 100%;
    background: #fff;
    box-shadow: 0 0.2rem 0.5rem rgb(0 0 0 / 60%);
    border-radius: 0.8rem;
    overflow: hidden;
    position: relative;
    transform: none;
    transform-origin: center;
  }

.plate * {
    font-family: 'Tabien'!important;
    white-space: nowrap;
    color: #040405;
}

.plate>a {
    text-decoration: none;
}

.plate[vehicle="pickup"] .plate-body span,
.plate[vehicle="pickup"] .plate-body .Province {
    color: #155831;
}
.plate[vehicle="van"] .plate-body span,
.plate[vehicle="van"] .plate-body .Province {
    color: #044396;
}

.plate[vehicle="car"][type="normal"] .plate-body {
    background-image: url("../assets/plate_bg_white.webp");
}
.plate[vehicle="van"][type="van"] .plate-body {
    background-image: url("../assets/plate_bg_van.webp");
}
.plate[vehicle="van"][type="van_graphic"] .plate-body {
    background-image: url("../assets/plate_bg_van_graphic.webp");
}
.plate[vehicle="pickup"] .plate-body {
    background-image: url("../assets/plate_bg_pickup.webp");
}
.plate[vehicle="pickup_graphic"][type="pickup_graphic"] .plate-body {
    background-image: url("../assets/plate_bg_pickup_graphic.webp");
}
.plate[vehicle="motorcycle"] .plate-body {
    background-image: url("../assets/plate_bg_motocycle_white.webp");
}

/* #region Graphic Plates of provinces */
.plate[vehicle="car"][province="BKK"][type="graphic"] .plate-body {
    background-image: url("../assets/plate_bg_graphic_BKK.webp");
}
/* #endregion Graphic Plates of provinces */


/* #region Gold Plates of provinces */
.plate[vehicle="car"][province="BKK"][type="gold"] .plate-body {
    background-image: url("../assets/plate_bg_gold_BKK.webp");
}
/* #endregion Gold Plates of provinces */



.plate .plate-card {
    position: relative;
    width: -webkit-fill-available;
    color: #000;
    font-weight: bold;
    padding: 3px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.plate .plate-card .plate-body {
    width: 80vw;
    min-width: 300px;
    max-width: 512px;
    height: auto;
    aspect-ratio: 512/213;
    padding: 0 0 0 0;
    border: 0.3vw solid black;
    border-radius: 0.8vw;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    position: relative;
}
.plate .plate-card > .plate-body::before {
    content: "";
    display: block;
    width: -webkit-fill-available;
    height: -webkit-fill-available;
    background: linear-gradient(150deg, rgb(255 255 255 / 38%), rgb(255 255 255 / 3%), rgb(255 255 255 / 0%));
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}
.plate .plate-card .plate-body > .LetterNumber {
    width: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin: 0 0 10px 0;
}
.plate .plate-card .plate-body > .LetterNumber * {

}

.plate .plate-card .plate-body>.LetterNumber>div {
    display: flex;
    flex-direction: row;
}
.plate .plate-card .plate-body .LetterNumber>div>span {
    line-height: 0.3;
    font-size: clamp(120px, 33vw, 220px);
    text-align: center;
    padding: 0;
    border: none;
    outline: none;
}
.plate[vehicle="motorcycle"] .plate-card .plate-body .LetterNumber>div>span {
    line-height: 0.5;
    font-size: 150px;
}
.plate-card .plate-body>.LetterNumber>.col1>.firstnumber {
    text-shadow: var(--Text_Bevel);
}

.plate-card .plate-body>.LetterNumber>.col1>.letters {
    text-shadow: var(--Text_Bevel);
}

.plate .plate-card .plate-body > .LetterNumber>.col2 {
    display: flex;
    flex-direction: row;
}

.plate .plate-card .plate-body>.LetterNumber>.col2>.numbers {
    text-shadow: var(--Text_Bevel);
}
.plate .plate-card .plate-body > .Province {
    width: fit-content;
    line-height: 0.5;
    font-size: clamp(45px, 12vw, 75px);
    color: #040405;
    text-shadow: var(--Text_Bevel);
    transform: scaleX(1.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.plate[vehicle="motorcycle"] .plate-card .plate-body > .Province {
    font-size: clamp(16px, 10vw, 80px);
}
.plate[vehicle="motorcycle"] .plate-body {
    width: -webkit-fill-available;
    max-width: 512px;
    height: auto;
    aspect-ratio: 512/405;
    border: 6px solid #353535;
    border-radius: 10px;
    background-size: contain;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}
.plate[vehicle="motorcycle"] .LetterNumber {
    flex-direction: column;
}
.plate[vehicle="motorcycle"] .LetterNumber .letters {
    line-height: 0.5;
    /* background: blue; */
    font-size: clamp(90px, 15vw, 90px);
}
.plate[vehicle="motorcycle"] .Province {
    line-height: 0.8;
    font-size: 72px;
    justify-content: center;
}
.plate[vehicle="motorcycle"] .LetterNumber .numbers {
    line-height: 0.3;
    /* background: blue; */
    font-size: clamp(90px, 15vw, 90px);
}
.plate .plate-card[type="Van"] .plate-body > .LetterNumber * {
    color: #03499b;
}

.plate .plate-card[type="Van_Graphic"] .plate-body > .LetterNumber * {
    color: #03499b;
}

.plate .plate-card[type="Pickup"] .plate-body > .LetterNumber * {
    color: #3e9137;
}
.plate .plate-card .plate-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #000;
    line-height: 2rem;
}

.plate .plate-card .plate-province {
    font-size: 0.9rem;
    color: #555;
}


section[name="Plate"] > .plate_sum_level > span.value {
    font-size: 1.5em;
    color: #000000 !important;
    /* background: linear-gradient(to left, #E5A604, #FDED80 25%, #FDED80 75%, #E5A604 100%); */
    font-weight: 500;
    /* -webkit-background-clip: text; */
    /* -webkit-text-fill-color: transparent; */
    line-height: 1.3em;
    letter-spacing: -1px;
}

section[name="Plate"] > h1 {
    font-size: clamp(24px, 5vw, 58px)!important;
    color: #000000 !important;
    /* background: linear-gradient(to left, #E5A604, #FDED80 25%, #FDED80 75%, #E5A604 100%); */
    /* -webkit-background-clip: text; */
    /* -webkit-text-fill-color: transparent; */
    line-height: 1.3em;
    /* letter-spacing: -1px; */
}
section[name="Plate"] > .price {
    font-size: clamp(20px, 3vw, 38px);
    font-weight: 600;
}

/* สำหรับ .plate_sum_level */
section[name="Plate"] > .plate_sum {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem auto;
    padding: 10px;
    width: 100%; /* ใช้เต็มวามกว้างที่กำหนด */
}

/* วกลมสีทอง */
section[name="Plate"] > .plate_sum .value {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(150deg, #E5A604, #FDED80 25%, #E5A604 100%);
    border: 2px solid #c9a000;
    border-radius: 50%;
    font-weight: bold;
    color: #000;
    text-align: center;
    width: clamp(50px, 8vw, 80px);
    height: clamp(50px, 8vw, 80px);
    font-size: clamp(24px, 5vw, 36px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

/* กำหนดรยะห่างจาก label */
section[name="Plate"] > .plate_sum .label {
    margin-right: 10px;
}

/* กระดาษสำหรับอ่าความหมาย */
section[name="Plate"] > .meaning {
    max-width: -webkit-fill-available;
    margin: 20px auto;
    padding: clamp(16px, 3vw, 32px);
    background: #fff;
    background-image: linear-gradient(163deg, #fffad1, #e9c88b 50%, #c9ad70);
    border: 1px solid #ddd;
    border-radius: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: clamp(14px, 1.5vw, 18px);
    line-height: 1.8;
    color: #333;
}

/* หัวข้อ */
section[name="Plate"] > .meaning > .label {
    font-size: clamp(16px, 2vw, 24px); /* ขนาดฟอต์ยืดหยุ่น */
    font-weight: bold;
    color: #444;
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    border-bottom: 2px solid #444; /* เส้นขีดแบ่ */
    padding-bottom: 5px;
}

/* เนื้อหาความหมาย */
section[name="Plate"] > .meaning > p.text {
    font-size: clamp(16px, 1.2vw, 22px);
    color: #555;
    text-align: justify; /* จัข้อความให้ยู่แนวเดียวกันทั้งสอข้าง */
    margin-top: 10px;
    line-height: 1.6;
    text-indent: 5vw; /* ระยย่อหน้า */
}

/* เพิ่มเส้นปะตกแต่งด้านข้าง */
section[name="Plate"] > .meaning:before,
section[name="Plate"] > .meaning:after {
    content: "";
    position: absolute;
    width: 1px;
    height: 90%;
    background: repeating-linear-gradient(
        to bottom,
        #ddd,
        #ddd 2px,
        transparent 2px,
        transparent 4px
    );
    top: 5%;
    z-index: -1;
}

section[name="Plate"] > .meaning:before {
    left: -10px;
}

section[name="Plate"] > .meaning:after {
    right: -10px;
}



section[name="Contact"] {
    width: -webkit-fill-available;
    min-width: 300px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    border-top: 1px solid rgb(168 168 168);
    border-radius: 2rem 2rem 0rem 0rem;
    background: linear-gradient(180deg, #000000, rgb(72 72 72), rgb(44 44 44 / 96%), #000000);
    background-clip: padding-box;
    color: #000;
    padding: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    box-shadow: -3px 0px 10px rgb(0 0 0 / 100%);
    justify-content: space-around;
}

section[name="Contact"] > a {
    width: -webkit-fill-available;
    height: 60px;
    color: #FFFFFF;
    font-size: 1.2em;
    line-height: 1em;
    max-width: 100%;
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: 1rem;
    box-shadow: rgba(151, 65, 252, 0.2) 0 15px 30px -5px;
    box-sizing: border-box;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

section[name="Contact"] > a > img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: invert(1);
}

section[name="Contact"] > a[name="Line"] {
    background-image: linear-gradient(144deg, #03a747, #4dc764);
}
section[name="Contact"] > a[name="Call"] {
    color: #000000;
    background-image: linear-gradient(163deg, #fffad1, #e9c88b 50%, #653616);
}
section[name="Contact"] > a[name="Call"] > img {
    filter: invert(0);
}

/* Responsive Design */
@media (max-width: 512px) {
    section[name="Plate"] .plate-body {
        /* font-size: 20vw;
        line-height: 10vw; */
    }
}
/* Smallest Screens */
@media (max-width: 400px) {
    section[name="Contact"] > a {
        font-size: 0;
    }
    section[name="Contact"] > a[name="Line"]::after {
        font-size: 16px;
        content: "Line";
    }
    section[name="Contact"] > a[name="Call"]::after {
        font-size: 16px;
        content: "โทร";
    }
    section[name="Contact"] > a > img {
        width: 20px;
        height: 20px;
    }
}
@media (max-width: 300px) {
    /* section[name="Plate"] .plate-body {
        font-size: clamp(60px, 20vw, 48px);
        line-height: 31px;
    } */

}