/* รายชื่อออนไลน์ (คลิกป้าย Online) */
.online-list-root {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
        max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.online-list-root.open {
    pointer-events: auto;
    opacity: 1;
}

.online-list-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.online-list-panel {
    position: relative;
    width: min(94vw, 380px);
    max-height: min(80vh, 560px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(180deg, #2a3540 0%, #161c24 40%, #0e1218 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.online-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px 8px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.35);
}

.online-list-heading {
    min-width: 0;
}

.online-list-title {
    margin: 0;
    font-size: var(--text-md);
    font-weight: bold;
    color: #90caf9;
}

.online-list-count {
    margin: 2px 0 0;
    font-size: var(--text-xs);
    color: rgba(176, 190, 197, 0.9);
}

.online-list-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 8px 10px 12px;
}

.online-list-empty {
    margin: 16px 8px;
    text-align: center;
    color: rgba(245, 230, 211, 0.65);
    font-size: var(--text-sm);
}

.online-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.online-list-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(120, 144, 156, 0.35);
    background: rgba(0, 0, 0, 0.28);
    color: #e8eef2;
    box-sizing: border-box;
}

.online-list-row.is-self {
    border-color: rgba(255, 213, 79, 0.4);
    background: rgba(255, 213, 79, 0.08);
}

.online-list-row-name {
    grid-column: 1;
    font-weight: bold;
    font-size: var(--text-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.online-list-row-meta {
    grid-column: 2;
    font-size: var(--text-xs);
    color: rgba(245, 230, 211, 0.8);
    text-align: right;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.online-list-row-loc {
    grid-column: 1;
    font-size: var(--text-xs);
    color: rgba(176, 190, 197, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.online-list-row-tag {
    grid-column: 2;
    font-size: var(--text-xs);
    font-weight: bold;
    color: #81c784;
    text-align: right;
}

.online-list-row.is-self .online-list-row-tag {
    color: var(--px-gold);
}
