/* ════════════════════════════════════════════
   top_likers/style.css — Figma Spec (exact)
   ════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@700&display=swap');

html, body {
    margin: 0;
    padding: 0;
    background: transparent;
    font-family: 'Noto Sans Thai', 'Segoe UI', system-ui, sans-serif;
    overflow: hidden;
}

/* ── Root ── */
.tl-root {
    padding: 12px;
    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
}

/* ── Outer card: Rectangle 411 ── */
.tl-card {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #FFE99F;
    border-radius: 20px;
    width: 318px;
    overflow: hidden;
}

/* ── Header: Rectangle 441 ── */
.tl-card-header {
    height: 70px;
    background: linear-gradient(90deg, #FFFAE8 0%, #FFE282 100%);
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    padding: 0 0 0 19px;
}

/* ── Title: "Top Liker" — color #C97800 ── */
.tl-title {
    font-family: 'Noto Sans Thai', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #C97800;
    line-height: 45px;
}

/* ── Rows container ── */
/* header=70px, gap=10px, rows=5×90px, gaps=4×10px, bottom=15px → total 585px */
.tl-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 9px 15px;
}

/* ── Individual row: Rectangle 442/505/506/507/508 ── */
.tl-row {
    height: 90px;
    width: 300px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 62px 60px 1fr;
    align-items: center;
    box-sizing: border-box;
    /* no background for ranks 4-5 */
}

/* Top-3 rows: rgba(245, 217, 125, 0.3) */
.tl-row.rank-1,
.tl-row.rank-2,
.tl-row.rank-3 {
    background: rgba(245, 217, 125, 0.3);
}

/* ── LEFT col: rank badge / number ── */
.tl-rank-col {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Rank badge: Vector 9/10/11 — SVG crown shape with number overlaid */
.tl-rank-badge {
    position: relative;
    width: 42px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG crown sits as background layer */
.tl-rank-badge svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 42px;
    height: 32px;
}

/* Rank number floats above crown SVG */
.tl-rank-badge .tl-rank-num {
    position: relative;
    z-index: 1;
    padding-bottom: 4px; /* nudge into crown body */
}

/* Rank number text — 24px, white + shadow */
.tl-rank-num {
    font-family: 'Noto Sans Thai', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 0 6px #000000;
    line-height: 1;
}

/* ── MIDDLE col: avatar — Ellipse 115-118 — 50px circle ── */
.tl-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    justify-self: center;
    align-self: center;
    flex: 0 0 50px;
}

.tl-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ── RIGHT col: name + heart + count ── */
.tl-user-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding-left: 6px;
}

/* Name: 22px, white, Noto Sans Thai */
.tl-name {
    font-family: 'Noto Sans Thai', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 0 6px #000000;
    line-height: 33px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Likes row: heart + count */
.tl-likes {
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
}

/* Heart: Figma SVG — 25×22px */
.tl-heart {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    line-height: 0;
}

.tl-heart svg {
    width: 25px;
    height: 22px;
    display: block;
}

/* Count: 32px, white, Noto Sans Thai */
.tl-likes-count {
    font-family: 'Noto Sans Thai', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 0 6px #000000;
    line-height: 48px;
    font-variant-numeric: tabular-nums;
}

/* ── Empty state ── */
.tl-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    padding: 20px 8px;
}

/* ── Pop animation on like count increase ── */
@keyframes tl-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}
.tl-row.tl-bump { animation: tl-pop 0.45s ease-out; }
