/* ── Global Participation ── */

#gp-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
    margin: 0 auto;
}

/* Two-column layout */
.gp-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}

/* ── Flag grid ── */
.gp-flag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

.gp-card {
    border: 1.5px solid #e2e5d0;
    border-radius: 12px;
    padding: 14px 6px 10px;
    cursor: pointer;
    background: #fff;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
    list-style: none;
}

.gp-card:hover {
    border-color: #C1C79C;
    background: #f7f8f3;
}

.gp-card.gp-active {
    border-color: #C1C79C;
    background: #d0d3c1;
}

.gp-card-flag {
    font-size: 38px;
    line-height: 1;
    display: block;
    margin-bottom: 8px;
}

.gp-card-name {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    line-height: 1.3;
}

/* ── Side panel ── */
.gp-side {
    border: 1.5px solid #e2e5d0;
    border-radius: 14px;
    background: #fff;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 80px; /* stays in view while scrolling the grid */
}

/* Empty state */
.gp-side-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.gp-empty-icon {
    font-size: 40px;
    opacity: 0.35;
    margin-bottom: 10px;
}

.gp-empty-text {
    font-size: 13px;
    color: #bbb;
}

/* Filled state */
.gp-side-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #d0d3c1;
    border-radius: 15px;
}

.gp-side-content[hidden] {
    display: none;
}

.gp-side-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.gp-sh-flag {
    font-size: 30px;
    line-height: 1;
    flex-shrink: 0;
}

.gp-sh-name {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
}

.gp-sh-count {
    font-size: 13px;
    color: #000000;
    margin-top: 2px;
}

/* Institution list */
.gp-inst-list {
    padding: 6px 20px 18px;
    display: flex;
    flex-direction: column;
}

.gp-inst-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    color: #333;
}

.gp-inst-row:last-child {
    border-bottom: none;
}

.gp-inst-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C1C79C;
    flex-shrink: 0;
}

.gp-no-inst {
    padding: 16px 0;
    font-size: 13px;
    color: #000000;
}

/* ── Mobile: stack vertically ── */
@media (max-width: 600px) {
    .gp-layout {
        grid-template-columns: 1fr;
    }

    .gp-side {
        min-height: auto;
        position: static;
    }

    .gp-card-flag {
        font-size: 32px;
    }

    .gp-flag-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}
