
.menu-component {
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 99;
    /* padding-top: 2rem; */
    padding-top: calc(env(safe-area-inset-top) + 1rem);
    padding-bottom: 2rem;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.menu-component2 {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 99;
    /* padding-top: 2rem; */
    padding-top: calc(env(safe-area-inset-top) + 1rem);
    padding-bottom: 2rem;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.landing-menu-group {
    display: flex;
}

.menu-btn {
    padding: 0 1rem;
    position: relative;
    z-index: 100;
}

.overlay-menu button p {
    color: #000000 !important;
}

.toggle-lang-wrapper .lang-show-text p {
    color: #ffffff !important;
}

.menu-btn.show-menu {
    position: relative;
    z-index: 999;
}

.lang-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background-color: transparent;
    transition: 0.1s all linear;
    transform: scale(0);
}


.lang-btn.animation {
    transform: scale(1);
    transition: 0.3s all ease-in-out;
}

.lang-btn:active {
    transform: scale(0.95);
    transition: 0.1s all linear;
}

.lang-btn img {
    width: 100%;
    height: 100%;
}

.overlay-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.overlay-menu.show-menu {
    display: block;
    max-width: 1024px;
    left: 50%;
    transform: translateX(-50%);
}

.span-menu {
    width: 60%;
    max-width: 250px;
    position: absolute;
    right: 4%;
    top: 130px;
    top: calc(env(safe-area-inset-top) + 90px)
}

.span-menu img {
    width: 100%;
}

.menu-block {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 90%;
    height: 0;
    transform: translateX(-50%);
    overflow: hidden;
    transition: 0.2s all linear;
    display: flex;
    flex-direction: column;
}

.menu-block img {
    width: 100%;
    height: 100%;
}

.menu-block.show {
    /* height: auto; */
    height: 300px;
    transition: 0.2s all linear;
}

.menu-wrapper {
    padding: 0 1rem;
    height: 1px;
    overflow: hidden;
    transition: 0.2s all linear;
}

.menu-wrapper.show {
    padding: 0 1rem;
    height: auto;
    transition: 0.2s all linear;
}

.menu-wrapper .menu {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    position: relative;
    width: 100%;
    background: transparent;
    border: none;
    transition: all 0.2s linear;
}

.menu-wrapper .menu:active {
    transform: scale(0.95);
    transition: all 0.2s linear;
}

.menu-wrapper .menu .menu-img {
    width: 30px;
    margin-right: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-wrapper .menu p {
    font-size: 18px;
    font-weight: bold;
    text-align: start;
}

.wrapper-menu-sound {
    display: flex;
}


.toggle-lang-wrapper {
    position: relative;
    width: 60px;
    height: 30px;
    background-color: #ED1112;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 4px 6px rgba(0, 0, 0, 0.4),  
        inset 0 -2px 4px rgba(255, 255, 255, 0.2); 
    overflow: hidden;
}

.toggle-lang-wrapper .menu-img {
    position: absolute;
    top: 50%;
    left: 0%; /* ใช้ left แทนการระบุหลายฝั่ง */
    transform: translateY(-50%);
    transition: left 0.4s ease; /* เน้น transition ที่ค่า left */
}

.toggle-lang-wrapper .lang-show-text {
    position: absolute;
    top: 50%;
    left: 70%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.toggle-lang-wrapper .lang-show-text p {
    color: #ffffff;
    font-size: 14px !important;
    font-weight: 500;
}

.toggle-lang-wrapper.active-en {
    background-color: #7B1314; 
}

.toggle-lang-wrapper.active-en .menu-img {
    left: 50%; /* เลื่อนไปทางขวา 50% ของความกว้าง */
}

.toggle-lang-wrapper.active-en .lang-show-text {
    left: 30%; 
}

@media only screen and (max-height: 1000px) {
    .menu-block.show {
        height: 300px;
    }
}

@media only screen and (max-height: 850px) {
    .menu-block.show {
        height: 300px;
    }
}


@media only screen and (max-width: 768px) {
    .menu-btn {
        padding: 0 1.25vw;
    }

    .lang-btn {
        width: 50px;
        height: 50px;
    }
}

@media only screen and (max-width: 460px) {
    .menu-component {
        display: flex;
        justify-content: flex-end;
    }
    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .span-menu {
        top: 90px;
        top: calc(env(safe-area-inset-top) + 90px);
    }

    .menu-block.show {
        height: 300px;
    }
    
}

@media only screen and (max-width: 400px) {
    .menu-wrapper .menu p {
        font-size: 16px;
        font-weight: bold;
    }

    .menu-wrapper.show {
        padding: 0.5rem 1rem;
    }

    .menu-wrapper .menu {
        padding: 0.5rem 0.5rem;
    }

        .menu-block.show {
        height: 270px;
        top: 17px;
    }

    .span-menu {
        top: 90px;
        min-width: 200px;
        
    }
    
}

.menu .menu-img{
    pointer-events: none;
}
.menu p{
    pointer-events: none;
}
#language_th .menu-img{
    pointer-events: none;
}
#language_th .lang-show-text{
    pointer-events: none;
}
#redeem_conditions_back img{
    pointer-events: none;
}
#game_back img{
    pointer-events: none;
}
#menu-toggle-btn img{
    pointer-events: none;
}
#toggle-sound img{
    pointer-events: none;
}