@font-face {
    font-family: 'Noto Sans';
    src: url('font/NotoSansThai-VariableFont_wdth,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('font/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('font/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('font/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

*{
    box-sizing: border-box;
    font-family: 'Noto Sans';
}

a{
    cursor: pointer !important;
}

body{
    background: linear-gradient(
        to right, 
        rgba(156, 187, 200, 0.6),
        rgba(232, 127, 83, 0.6)
    ), url("bg.png");
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: cover;
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow: hidden;
}

.flex{
    display: flex;
}

.flex-col{
    flex-direction: column;
}

.cursor-pointer{
    cursor: pointer;
}

.text-center{
    text-align: center;
}

.relative{
    position: relative;
}

.absolute{
    position: absolute;
}

.left-0{
    left: 0;
}

.login{
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login .login-label{
    font-weight: bold;
    font-size: 15px;
    color: #2B2B2B;
    margin: auto;
    text-align: center;
}

.login .login-line-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    line-height: 150%;
    text-align: center;
    color: #FFFFFF;
    padding: 12px 16px;
    height: 40px;
    background: #06C755;
    border-radius: 4px;
    margin: auto;
    width: 311px;
    cursor: pointer;
    text-decoration: none;
}

.login .login-line-btn div{
    display: flex;
}

.login .login-policy{
    text-align: center;
    font-size: 12px;
    margin-top: -12px;
}

.login .login-policy .link{
    color: #3165DF;
    cursor: pointer;
    text-decoration: underline;
}

.home.container{
    padding-top: 32px !important;
    padding-bottom: 25px !important;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.home.container .vote-btn{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    gap: 8px;
    width: 311px;
    height: 40px;
    background: #3165DF;
    border-radius: 4px;
    margin: 0 auto;
    font-weight: 700;
    font-size: 16px;
    line-height: 150%;
    text-align: center;
    color: #FFFFFF;
    cursor: pointer;
}

.hidden{
    display: none !important;
}

.logo{
    display: flex;
    justify-content: center;
}

.container{
    padding: 24px;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.school.container{
    gap: 40px;   
}

.school.container .school-container{
    overflow-y: auto;
    max-height: calc(100vh - 284px);
    max-height: calc(100dvh - 284px);
    padding-bottom: 24px;
}

.school.container .school-container::-webkit-scrollbar{
    width: 0;
}

.school .card, .idol .card{
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 16px;
    gap: 16px;
    width: 100%;
    height: 172px;
    background: #FFFFFF;
    border-radius: 8px;
}

.school .card .avatar, .idol .card .avatar{
    min-width: 140px;
    max-width: 140px;
    min-height: 140px;
    max-height: 140px;
    border-radius: 4px;
    display: flex;
    overflow: hidden;
    background: transparent;
}

.school .card .avatar img, .idol .card .avatar img{
    object-fit: contain;
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
}

.school .card .detail, .idol .card .detail{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

.school .card .detail .name, .idol .card .detail .name{
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 150%;
    color: #2B2B2B;
}

.school .card .detail .vote-btn, .idol .card .detail .vote-btn{
    width: 100%;
    height: 36px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px;
    gap: 4px;
    margin: 0 auto;
    background: #3165DF;
    border-radius: 4px;
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    line-height: 150%;
    text-align: center;
    color: #FFFFFF;
}

.back{
    display: flex;
    gap: 11.5px;
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    color: #2B2B2B;
    cursor: pointer;
}

.vote .avatar{
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    max-width: 80px;
    max-height: 80px;
    background: #FFFFFF;
    border-radius: 16px;
    /* background: transparent; */
}

.vote .avatar img{
    object-fit: contain;
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    box-shadow: 4px 4px 12px 0px #63636340;
}

.vote .school-profile{
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 150%;
    color: #FFFFFF;
    display: flex;
    gap: 16px;
    flex: none;
    order: 1;
    flex-grow: 0;
    margin: auto;
}

.vote .school-profile .name{
    margin-block: auto;
    color: #2B2B2B;
}

.vote .form{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 16px;
    background: #FFFFFF;
    border-radius: 8px;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: #2B2B2B;
}

.vote .form .topic{
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    line-height: 150%;
    color: #000000;
    flex: none;
    order: 0;
    flex-grow: 0;
}

.radio-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    height: 24px;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    color: #2B2B2B;
    gap: 10px;
}

.radio-container input { display: none; }

.checkmark {
    height: 16px;
    width: 16px;
    border: 2px solid #5d3fd3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-container input:checked ~ .checkmark::after {
    content: "";
    width: 8px;
    height: 8px;
    background: #5d3fd3;
    border-radius: 50%;
}

.vote .group{
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

fieldset{
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0 16px 8px 16px;
    margin: 0;
}

legend {
    font-size: 12px;
    color: #666;
    padding: 0 4px;
    margin-left: 8px;
}

input {
    border: none;
    width: 100%;
    padding: 8px 0;
    font-size: 16px;
    color: #333;
    outline: none;
}

input::placeholder, textarea::placeholder {
    color: #bfbfbf;
}

textarea{
    border: none;
    outline: none;
    width: 100%;
    font-size: 16px;
    background: transparent;
    resize: none;
}

.pay{
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    gap: 12px;
    width: 100vw;
    height: 110px;
    background: #FFFFFF;
    border: 1px solid #E8E8E8;
    box-shadow: 0px -9px 43px rgba(0, 0, 0, 0.08);
    flex: none;
    order: 4;
    flex-grow: 0;
    position: fixed;
    background-origin: 0;
    bottom: 0;
    left: 0;
}

.vote .box{
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    max-height: calc(100vh - 347px);
    max-height: calc(100dvh - 347px);
    margin: 0 -24px;
    padding: 0 24px;
    padding-bottom: 130px;
}

.vote .box::-webkit-scrollbar{
    width: 0;
}

.vote .pay .label{
    width: 118px;
    height: 21px;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: #616161;
    flex: none;
    order: 0;
    flex-grow: 0;
    display: flex;
    flex-direction: column;
    margin: auto 0;
}

#package-price{
    height: 30px;
    font-style: normal;
    font-weight: 700;
    font-size: 20px;
    line-height: 150%;
    display: flex;
    align-items: center;
    color: #2B2B2B;
    flex: none;
    order: 1;
    flex-grow: 0;
    display: flex;
    flex-direction: column;
    margin: auto 0;
}

.vote .pay .btn{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    gap: 8px;
    height: 36px;
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
    line-height: 20px;
    color: #001A57;
    cursor: pointer;
    user-select: none;
    background: #3165DF;
    border-radius: 4px;
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    line-height: 150%;
    text-align: center;
    color: #FFFFFF;
}

.vote .pay .btn.disabled{
    filter: grayscale(1);
    cursor: not-allowed;
    color: antiquewhite;
}

#package-list{
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vote .input-container.error fieldset{
    border-color: #f5514f;
}

.vote .input-container.error fieldset:focus-within{
    box-shadow: 0 0 0 1px #f5514f; 
    outline: none;
}

.vote .input-container.error fieldset legend{
    color: #f5514f;
}

legend{
    background: #fff;
}

.error-label{
    display: none;
    font-size: 12px;
    color: #f5514f;
    margin-top: 2px;
    margin-left: 16px;
}

.vote .input-container.error .error-label{
    display: block;
}

.payment .box{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 16px;
    background: #FFFFFF;
    border-radius: 24px;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    font-size: 14px;
}

.payment .box .price{
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    line-height: 150%;
    width: 100%;
    align-items: center;
    color: #2B2B2B;
    flex: none;
    order: 0;
    flex-grow: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4;
}

#payment-price{
    height: 30px;
    font-style: normal;
    font-weight: 700;
    font-size: 20px;
    line-height: 150%;
    color: #571FC1;
    flex: none;
    order: 2;
    flex-grow: 0;
}

.payment .divide{
    width: 100%;
    height: 1px;
    background: #E8E8E8;
}

.payment-steps-container{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-steps-container .payment-steps{
    list-style-type: decimal;
    padding-left: 16px;
    margin: 0;
}

.payment-steps-container .payment-steps li{
    font-size: 12px;
    line-height: 1.6;
    color: #333;
}

.payment .payment-qrcode{
    display: flex;
    justify-content: center;
    margin: auto;
}

.paid .box, .closed .box{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 16px;
    gap: 16px;
    background: #FFFFFF;
    border-radius: 24px;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    font-size: 14px;
    margin-top: 24px;
}

.paid .box .success-icon, .closed .box .closed-icon{
    display: flex;
    justify-content: center;
    width: 100%;
}

.paid .box #vote-again, .closed .box #back-to-home{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px;
    gap: 4px;
    height: 32px;
    background: #3165DF;
    border-radius: 4px;
    flex: none;
    order: 2;
    align-self: stretch;
    flex-grow: 0;
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    line-height: 150%;
    text-align: center;
    color: #FFFFFF;
    cursor: pointer;
}

.loading{
    height: 100px;
    display: flex;
}

.spinner{
    margin: auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(farthest-side,#6624e2 94%,#0000) top/9px 9px no-repeat,
            conic-gradient(#0000 30%,#6624e2);
    -webkit-mask: radial-gradient(farthest-side,#0000 calc(100% - 9px),#000 0);
    animation: spinner-c7wet2 1s infinite linear;
}

.home.container .box, .school.container .box, .idol.container .box{
    position: relative;
    box-sizing: border-box;
    width: 100%;
    height: 84px;
    border: 3px solid #EE5A2A;
    border-radius: 24px;
    text-align: center;
    margin: auto;
    padding: 3px;
    text-decoration: none;
    background: #262626;
}

.home.container .box .header, .school.container .box .header, .idol.container .box .header{
    position: absolute;
    top: -19px;
    padding: 8px 16px;
    gap: 8px;
    position: absolute;
    width: 90px;
    height: 36px;
    left: calc(50% - 90px/2 - 0.5px);
    background: linear-gradient(134.14deg, #EE5A2A 3.08%, #FFDFD4 43.35%, #EE5A2A 83.63%);
    box-shadow: 0px 4px 10px rgba(25, 91, 167, 0.2);
    border-radius: 100px;
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 20px;
    color: #2B2B2B;
    flex: none;
    order: 0;
    flex-grow: 0;
}

.home.container .box .label, .school.container .box .label, .idol.container .box .label{
    font-style: normal;
    font-weight: 700;
    font-size: 22px;
    line-height: 150%;
    /* background: linear-gradient(134.14deg, #EE5A2A 3.08%, #FFA487 43.35%, #EE5A2A 83.63%); */
    background: linear-gradient(134.14deg, #7ca78e 3.08%, #ffffff 43.35%, #ffd1c2 83.63%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.1);
    height: 100%;
    border: 0.5px solid #EE5A2A;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.school.container .box{
    margin-top: 23px;
    width: 100%;
    cursor: default;
}

.profile-checking{
    margin-top: 20px;
    margin-right: 16px;
    margin-left: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 4px 8px;
    gap: 5px;
    width: 76px;
    height: 28px;
    background: #3165DF;
    border-radius: 24px;
    flex: none;
    order: 0;
    flex-grow: 0;
    color: #FFFFFF;
    font-weight: 400;
    font-size: 12px;
    line-height: 150%;
    text-align: center;
    flex: none;
    order: 1;
    flex-grow: 0;
    cursor: pointer;
}

.profile-checking-container{
    margin: auto;
    width: 100%;
}

.team-voting-container{
    overflow-y: auto;
    max-height: calc(100vh - 246px);
    max-height: calc(100dvh - 246px);
    padding-block: 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.team-voting-container::-webkit-scrollbar{
    width: 0;
}

.profile.container .profile-form fieldset legend,
.profile.container .profile-form fieldset input,
.profile.container .profile-form fieldset select,
.admin.container .admin-form fieldset legend,
.admin.container .admin-form fieldset input{
    background: none !important;
}

.profile.container .profile-form fieldset, .admin.container .admin-form fieldset{
    padding-inline: 16px;
}

.admin.container .admin-form fieldset{
    /* background: #d7d7d7; */
}

.profile.container .profile-form fieldset legend, .admin.container .admin-form legend{
    margin: 0;
}

.profile.container .profile-form fieldset select{
    border: none;
    width: 100%;
    padding: 8px 0;
    font-size: 16px;
    outline: none;
}

.profile.container .profile-form fieldset select:invalid{
    color: #999 !important; 
}

.profile.container .profile-form, .admin.container .admin-form{
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: auto;
    width: 100%;
    overflow-y: auto;
    max-height: calc(100vh - 214px);
    padding-bottom: 24px;
    gap: 32px;
    position: fixed;
    background: #fff;
    left: 50%;
    transform: translateX(-50%);
}

.profile.container .profile-form::-webkit-scrollbar{
    width: 0;
}

.profile.container .profile-operation{
    width: 100%;
    margin: auto;
}

.profile.container .profile-submit, .admin.container .admin-login{
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    height: 40px;
    background: #3165DF;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    line-height: 150%;
    text-align: center;
    color: #FFFFFF;
    margin-top: 8px;
}

.admin.container .admin-form{
    padding: 24px;
    left: 50%;
    transform: translate(-50%, -50%);
    top: 50%;
    border-radius: 4px;
    gap: 15px;
    padding-top: 50px;
}

#admin-modal-close{
    justify-content: flex-end;
    top: 18px;
    right: 18px;
    position: absolute;
    cursor: pointer;
}

.admin.container .admin-close{
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1;
    background: red;
    border-radius: 4px;
    height: 80px;
    font-weight: 700;
    font-size: 20px;
    line-height: 150%;
    text-align: center;
    color: #FFFFFF;
    margin-top: 30px;
    /* margin: auto;
    width: 100%; */
}

#admin-modal{
    gap: 32px;
    position: fixed;
    inset: 0;
    backdrop-filter: blur(8px) brightness(100%) saturate(50%);
}

.alert-modal{
    display: flex;
    padding: 8px 16px;
    position: fixed;
    align-items: center;
    top: 22px;
    height: 48px;
    background: #00A743;
    box-shadow: 8px 8px 16px rgba(99, 99, 99, 0.25);
    border-radius: 12px;
    left: 50%;
    transform: translateX(-50%);
    justify-content: space-between;
    z-index: 99;
    font-weight: 700;
    font-size: 14px;
    line-height: 150%;
    color: #FFFFFF;
    width: calc(100% - 32px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.is-hidden{
    opacity: 0;
    visibility: hidden;
}

.team-box{
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-height: calc(100vh - 436px);
    overflow-y: auto;
}

.team-box::-webkit-scrollbar{
    width: 0;
}

@keyframes spinner-c7wet2 {
    100% {
        transform: rotate(1turn);
    }
}

@media (min-width: 768px){
    body{
        background-size: 450px auto !important;
        background-color: #f9f9f9;
    }

    .school .card, .idol .card{
        max-width: 400px;
        margin: 0 auto;
    }

    .home.container .box, .school.container .box, .idol.container .box{
        max-width: 400px;
    }

    .back{
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .vote .box{
        width: 100%;
        max-width: 400px;
        margin-inline: auto;
        padding-inline: 0;
    }

    .payment .box{
        max-width: 400px;
        margin: 0 auto;
    }

    .paid .box, .closed .box{
        max-width: 400px;
        width: 100%;
        margin-inline: auto;
    }

    .pay{
        max-width: 400px;
        width: 100%;
        left: 50%;
        transform: translateX(-50%);
    }

    .vote .school-profile{
        max-width: 400px;
        width: 100%;
    }

    .profile-checking-container{
        max-width: 450px;
    }

    .profile.container .profile-form{
        max-width: 450px;
        padding-inline: 32px;
    }

    .profile.container .profile-operation{
        max-width: 450px;
        padding-inline: 32px;
    }

    .alert-modal{
        max-width: calc(450px - 48px);
        width: 100%;
    }

    .admin.container .admin-form{
        max-width: 402px;
        padding-inline: 32px;
    }

    .admin.container .admin-close{
        max-width: 402px;
        margin-inline: auto;
        width: 100%;
    }
}