/* RESET CSS */
/* Prevent font size inflation */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* Improve text rendering */
body {
    -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas {
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    line-height: 1.4;
    overflow-wrap: break-word;
}

p {
    overflow-wrap: break-word;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 135px;
}

body {
    font-size: 14px;
    font-family: "LINE Seed Sans TH", var(--bs-body-font-family);
    /* background-color: #ffffff; */
    color: #111827;
    padding-top: 90px;
    background-color: #E7FCFA;
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: #ffffff;
}

.site-nav-top {
    padding: 8px 0;
}

.web-logo {
    width: auto;
    height: 32px;
    display: block;
}

.site-hashtag {
    white-space: nowrap;
}

.site-nav-bottom {
    background: linear-gradient(to right, #fcbad3, #fa89b4);
}

.site-nav-wrap {
    padding: 6px 0;
    overflow-x: auto;
}

#nav-tab {
    flex-wrap: nowrap;
}

#nav-tab:before,
#nav-tab:after {
    content: "";
    display: block;
    padding-left: 12px;
}

#nav-tab .nav-link {
    --bs-nav-link-color: #fff;
    --bs-nav-link-hover-color: #f85895;
    --bs-nav-pills-link-active-color: #fff;
    --bs-nav-pills-link-active-bg: #f85895;
    height: 30px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    min-width: 100px;
}

h1,
.tab-title {
    font-size: 20px;
    font-weight: 700 !important;
}

h2 {
    font-size: 16px;
}

h3 {
    font-size: 14px;
}

.bar-cta {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 2;
    background-color: #fa89b4;
    color: #fff;
    padding: 5px;
    font-size: 12px;
}

.mobile-nav .btn {
    font-size: 10px;
}

b,
strong {
    font-weight: 700 !important;
}

#main {
    min-height: 85vh;
}

.fw-100 {
    font-weight: 100 !important;
}

.fw-200 {
    font-weight: 200 !important;
}

.fw-300 {
    font-weight: 300 !important;
}

.fw-400 {
    font-weight: 400 !important;
}

.fw-500 {
    font-weight: 500 !important;
}

.fw-600 {
    font-weight: 600 !important;
}

.fw-700 {
    font-weight: 700 !important;
}

.fw-800 {
    font-weight: 800 !important;
}

.fw-900 {
    font-weight: 900 !important;
}

.fs-16 {
    font-size: 16px !important;
}

.fs-14 {
    font-size: 14px !important;
}

.fs-12 {
    font-size: 12px !important;
}

.fs-10 {
    font-size: 10px !important;
}

.fs-8 {
    font-size: 8px !important;
}


/* GE 2025 */
.sec-candidate-title {
    background-color: #fa89b4;
    color: #fff;
    padding: 10px 15px;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    font-size: 12px;
    text-align: center;
}

.item-candidate {
    display: flex;
    gap: 15px;
    /* background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px); */
    border-bottom: 1px solid #e5e5e5;
    padding: 15px;
    cursor: pointer;
}

.item-candidate:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.item-candidate .songs {
    font-size: 12px;
    padding-left: 16px;
}

.sec-songs-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background-color: #fa89b4;
    color: #fff;
    padding: 10px 15px;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    font-size: 12px;
}

.song-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 15px;
}

.song-item .member {
    display: grid;
    gap: 5px;
    margin-top: 8px;
}

.member-song-item {
    font-size: 12px;
    cursor: pointer;
}

.member-song-item:hover {
    text-decoration: underline;
}

.member-song-item .pic {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 6px;
    margin-top: -4px;
}

.song-item .count {
    /* font-size: 12px; */
    font-weight: 600;
    align-self: self-start;
}

.form-select {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    color: #111827;
    border-radius: 8px;
    border-color: #e5e5e5;
}

.form-floating>.form-select~label::after {
    background-color: #ffffff;
}

.sec-prediction-title {
    background-color: #fa89b4;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    text-align: center;
    font-weight: 600;
}

.sec-prediction-title .beta {
    display: inline-block;
    font-size: 8px;
    padding: 2px 8px;
    border: 1px solid #fff;
    border-radius: 15px;
    vertical-align: middle;
}

.sec-prediction {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid #e5e5e5;
    padding: 15px;
    border-radius: 0 0 8px 8px;
}

.secondary-nav {
    position: sticky;
    top: 92px;
    z-index: 900;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 15px;
    text-align: center;
}

.secondary-nav .btn {
    font-size: 12px;
}

.secondary-nav .nav-link {
    font-size: 12px;
    font-weight: 500;
}

.summary-grid {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(3, 70px);
    gap: 6px;
    text-align: center;
    font-size: 12px;
    line-height: 1.2;
}

.summary-grid .sum {
    color: #fff;
    border-radius: 4px;
    padding: 8px;
}

.summary-grid strong {
    font-size: 20px;
    font-weight: 600 !important;
}

.btn-sort {
    min-width: 130px;
    font-size: 12px;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
}

.btn-sort svg {
    height: 1em;
}

.vote-box {
    /* background-color: #ffffff; */
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    height: 100%;
    overflow: hidden;
}

.vote-box .info {
    padding: 14px 15px 6px;
}

.vote-box .remark {
    padding: 3px 15px 6px;
    background-color: rgba(0, 0, 0, 0.04);
}

.vote-box .number {
    font-size: 20px;
    font-weight: 700;
}

.vote-box .update {
    margin-top: 3px;
    font-size: 10px;
    /* opacity: 0.8; */
}

.vote-box.-time {
    text-align: center;
}

.ct-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 3px;
}

@media(min-width: 768px) {
    .vote-box.-time {
        text-align: left;
    }

    .ct-time {
        justify-content: start;
        margin-top: 8px;
        margin-bottom: 0;
    }
}

.ct-time b {
    font-size: 20px;
    line-height: 1;
}

.rank-heading {
    padding: 8px 10px;
    background-color: var(--band, #d1d5db);
    color: #fff;
    font-weight: 600;
    line-height: 1;
    border-radius: 8px 8px 0 0;
}

.rank-song {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 15px;
    color: #fff;
}

.rank-card {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    position: relative;
}

.rank-card .rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    border-radius: 50%;
    background-color: var(--band, #d1d5db);
    color: #fff;
    text-align: center;
    font-size: 12px !important;
    font-weight: 500;
    line-height: 1;
}

.rank-card img {
    border-radius: 5px;
    width: 36px;
    height: auto;
}

.rank-card .name {
    font-size: 14px;
    font-weight: 600;
}

.rank-card .token {
    margin-left: auto;
    font-size: 12px !important;
    color: #6b7280;
    text-align: right;
}

.rank-card.center img {
    width: 48px;
}

.rank-card.center .name {
    font-size: 18px !important;
}

.rank-card.center .desc {
    font-size: 12px !important;
    color: #9ca3af;
}

.item-candidate[class$="CGM48"],
.rank-heading[class$="CGM48"],
.rank-card[class$="CGM48"] {
    --band: #3cc3b1;
}

.item-candidate[class$="BNK48"],
.rank-heading[class$="BNK48"],
.rank-card[class$="BNK48"] {
    --band: #cc96c2;
}

.timeupdate {
    font-size: 10px;
    line-height: 1;
    margin-top: 4px;
    color: #6b7280;
}

.timeupdate .spinner-grow {
    --bs-spinner-width: 10px;
    --bs-spinner-height: 10px;
}

.candidate-rank {
    min-width: 70px;
    font-size: 10px;
}

.candidate-rank .rank {
    background-color: #e5e7eb;
    color: #374151;
    margin-bottom: 5px;
    padding: 2px 4px;
    border-radius: 15px;
    text-align: center;
}

.candidate-rank .rank.-mark {
    background-color: var(--band, #9ca3af);
    color: #ffffff;
    font-weight: 600;
}

section:focus-visible {
    outline: none;
}


p.placeholder-wave {
    width: 75px;
    opacity: 0.3;
    margin-bottom: 0;
    line-height: 1;
}

p.placeholder-wave .placeholder {
    width: 100%;
    border-radius: 2px;
}

.rank-card .token p.placeholder-wave {
    width: 50px;
}

/* 29/03/2025 */
.sep {
    margin: 0 8px;
    border-left: 1px solid #fff;
}

.sec-summary-wrap {
    padding: 30px 0 60px;
}

#summary .rank-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

#summary .rank-card:nth-of-type(1) {
    grid-column: 1 / -1;
}

#summary .rank-card:nth-of-type(2) {
    grid-column: 1 / 4;
}

#summary .rank-card:nth-of-type(3) {
    grid-column: 4 / -1;
}

#summary .rank-card {
    position: relative;
    flex-direction: column;
    gap: 8px;
    grid-column: span 2;
    margin-bottom: 0;
    padding: 10px 8px 8px;
    line-height: 1;
}

#summary .rank-card .rank {
    position: absolute;
    top: 38px;
    left: calc(50% - 18px);
    transform: translateX(-50%);
    font-size: 10px !important;
    font-weight: 700 !important;
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    z-index: 1;
}

#summary .rank-card.center .rank {
    top: 46px;
    left: calc(50% - 22px);
}

#summary .rank-card img {
    width: 42px;
}

#summary .rank-card.center img {
    width: 50px;
}

#summary .rank-card .token {
    display: none;
}

.sep-line {
    width: 100px;
    height: 3px;
    margin: 15px auto 0;
    background-color: #fa89b4;
}

/* Candidate Modal */
.candidate-group-title {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 2px 6px;
}

.candidate-name {
    cursor: pointer;
}

.candidate-name:hover {
    text-decoration: underline;
}

.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline-item {
    position: relative;
    padding-bottom: 16px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 8px;
    bottom: -12px;
    width: 1px;
    background-color: #d1d5db;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: -19px;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #fa89b4;
}

.timeline-item.-sub .timeline-dot {
    width: 7px;
    height: 7px;
    left: -18px;
    background-color: #6b7280;
}

.timeline-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.timeline-label {
    font-weight: 600;
    font-size: 14px;
}

.timeline-item.-sub .timeline-label {
    font-weight: 700;
    font-size: 12px;
    color: #6b7280;
}

.timeline-rank {
    font-weight: 700;
    font-size: 14px;
    color: #fa89b4;
    white-space: nowrap;
}

.timeline-item.-sub .timeline-rank {
    font-size: 12px;
    color: #6b7280;
}

.timeline-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.bg-fixed {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
    width: 100vw;
    height: calc(100vh - 90px);
    background-image: linear-gradient(205deg, #FDE8FD 0%, #FDE8FD 30%, #E7FCFA 70%, #E7FCFA 100%);
}

#sort_applied,
#sort_songs {
    font-size: 12px;
    padding: .25em 2.25em .25em 1em;
}

#candidate_others img {
    width: 40px !important;
    height: 40px !important;
}

.modal-content {
    --bs-modal-border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
}

#candidate_applied,
#candidate_others,
#sec_songs {
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-bottom: none;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
}