/* css/plates.css */
/* สไตล์พื้นฐานสำหรับแท็บทั้ง 3 ชนิด */
ul > * {
    position: relative;
    z-index: 1;
}
ul > h3 {
    width: -webkit-fill-available;
    font-size: 1em;
    text-align: center;
}
ul > li {
    
}
ul > li > .icon {
    width: 40px;
    height: 40px;
    background-size: 40px;
    background-position: center;
    background-repeat: no-repeat;
}
ul > li > span {

}
ul[name="vehicle"],
ul[name="plate_type"],
ul[name="plate_era"] {
    list-style: none;
    margin: 0 1rem 1rem 1rem;
    color: white;
    padding: 0;
    border: 2px solid rgb(255 255 255 / 70%);
    border-bottom: none;
    border-radius: 1.5rem 1.5rem 0.5rem 0.5rem;
    background: linear-gradient(180deg, #515151, rgb(108 108 108), rgb(76 76 76 / 96%), #373737);
    background-clip: padding-box;
    box-shadow: 0 0px 10px rgb(0 0 0 / 10%);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

/* สไตล์สำหรับแต่ละแท็บ */
ul[name="vehicle"] li,
ul[name="plate_type"] li,
ul[name="plate_era"] li {
    flex: 1;
    min-height: 40px;
    font-size: 1em;
    padding: 3px 5px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid transparent;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* สไตล์สำหรับแท็บที่ถูกเลือก (active) */
ul[name="vehicle"] li.active,
ul[name="plate_type"] li.active,
ul[name="plate_era"] li.active {
    /* background-color: #fff; */
    /* border: 1px solid #ccc; */
    /* border-bottom: 2px solid #2980b9; */
    color: white;
    -webkit-tap-highlight-color: transparent;
    /* font-weight: bold; */
}

/* สไตล์สำหรับไอคอนภายในแท็บ */
ul[name="vehicle"] li .icon,
ul[name="plate_type"] li .icon,
ul[name="plate_era"] li .icon {
    margin-bottom: 5px;
    filter: invert(1);
}

ul[name="vehicle"] li[value="car"] .icon {
    background-image: url("../assets/icon_car.svg");
}

ul[name="vehicle"] li[value="pickup"] .icon {
    background-image: url("../assets/icon_pickup.svg");
}

ul[name="vehicle"] li[value="van"] .icon {
    background-image: url("../assets/icon_van.svg");
}

ul[name="vehicle"] li[value="motorcycle"] .icon {
    background-image: url("../assets/icon_motorcycle.svg");
}

ul[name="plate_type"] li,
ul[name="plate_era"] li {
    min-height: 40px;
    align-items: center;
    justify-content: center;
}

ul li.active .icon {
    filter: invert(1);
}

ul > .active_indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: calc(100% - 2rem);
    border-radius: 1rem 1rem 0.5rem 0.5rem;
    border-bottom: 2px solid #a5330f;
    background: linear-gradient(180deg, #ecd0a0, #d09e4a);
    transition: left 0.3s ease, width 0.3s ease;
    z-index: 0;
}

/* ซ่อนแท็บที่ไม่ต้องการแสดง */
.hide {
    display: none;
}

@media only screen and (max-width: 480px) {
    ul > h3 {
        font-size: 0.9em;
    }
    ul[name="vehicle"] li, 
    ul[name="plate_type"] li, 
    ul[name="plate_era"] li {
        font-size: 0.8em;
    }
}