/* ============================================
   PLATTEGROND - styling
   ============================================ */

.pg-empty {
    text-align: center; padding: 56px 24px; color: var(--text-medium, #636E72);
    background: var(--bg-white, #fff); border-radius: var(--radius-lg, 16px); box-shadow: var(--shadow-sm);
}
.pg-empty-icon { font-size: 48px; margin-bottom: 12px; }
.pg-empty p { margin: 0; line-height: 1.6; }

/* ---------- Bedieningsbalk ---------- */
.pg-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.pg-tb-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pg-tb-divider { width: 1px; height: 26px; background: var(--border, #E8E8F0); }
.pg-status { font-size: 13px; color: var(--text-medium, #636E72); font-weight: 600; }
.pg-btn {
    border: none; border-radius: 999px; cursor: pointer; font-family: inherit;
    font-size: 14px; font-weight: 600; padding: 9px 16px; display: inline-flex; align-items: center; gap: 6px;
    transition: background .15s, box-shadow .15s, transform .08s;
}
.pg-btn:active { transform: translateY(1px); }
.pg-btn-primary { background: var(--primary, #6C63FF); color: #fff; }
.pg-btn-primary:hover { box-shadow: 0 6px 18px rgba(108,99,255,.3); }
.pg-btn-ghost { background: var(--bg-light, #F1F0FA); color: var(--text-dark, #2D3436); }
.pg-btn-ghost:hover { background: #E7E5F6; }
.pg-btn-socio { background: linear-gradient(135deg, #6C63FF 0%, #B06CFF 100%); color: #fff; }
.pg-btn-socio:hover { box-shadow: 0 6px 18px rgba(140,99,255,.35); }

.pg-hint { background: #F4F2FF; border-radius: 10px; padding: 9px 14px; font-size: 13.5px; color: #4A4470; margin-bottom: 16px; }

/* ---------- Sociogram-balk ---------- */
.pg-socio-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: linear-gradient(135deg, #F3F2FF 0%, #F7EEFF 100%);
    border: 1px solid #E2DBFF; border-radius: 12px; padding: 8px 14px; margin-bottom: 12px;
}
.pg-socio-info { font-size: 13.5px; color: #4A4470; }
.pg-socio-toggle { display: inline-flex; align-items: center; gap: 6px; }
.pg-socio-toggle-label { font-size: 13px; color: var(--text-medium, #636E72); font-weight: 600; }
.pg-socio-toggle button {
    border: 1px solid #D9D2F5; background: #fff; color: #5A52D5; cursor: pointer; font-family: inherit;
    font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; transition: background .15s, color .15s, border-color .15s;
}
.pg-socio-toggle button:hover { background: #F1EEFF; }
.pg-socio-toggle button.active { background: var(--primary, #6C63FF); color: #fff; border-color: var(--primary, #6C63FF); }

.pg-section-title { font-size: 15px; color: var(--text-dark, #2D3436); margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.pg-count {
    display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 7px;
    border-radius: 999px; background: var(--bg-light, #F1F0FA); color: var(--text-medium, #636E72); font-size: 12px; font-weight: 700;
}

/* ---------- Pool ---------- */
.pg-pool-section { margin-bottom: 18px; }
.pg-pool {
    display: flex; flex-wrap: wrap; gap: 8px; min-height: 56px;
    background: var(--bg-white, #fff); border: 1px dashed var(--border, #E8E8F0); border-radius: 14px; padding: 10px;
}
.pg-pool.is-droptarget { border-color: var(--primary, #6C63FF); background: #FAF9FF; cursor: pointer; }
.pg-pool-empty { color: var(--text-medium, #636E72); font-size: 14px; margin: 6px; }
.pg-chip {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: var(--bg-white, #fff); border: 2px solid var(--border, #E8E8F0); border-radius: 12px;
    padding: 6px 8px 7px; width: 80px; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .08s;
}
.pg-chip:hover { border-color: #C9C5F0; }
.pg-chip:active { transform: translateY(1px); }
.pg-chip.is-selected { border-color: var(--primary, #6C63FF); box-shadow: 0 0 0 3px rgba(108,99,255,.18); }
.pg-chip-monster { width: 36px; height: 36px; object-fit: contain; }
.pg-chip-initials { display: none; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-light, #F1F0FA); align-items: center; justify-content: center; font-weight: 700; color: var(--text-medium, #636E72); font-size: 13px; }
.pg-chip-name { font-size: 12px; font-weight: 600; color: var(--text-dark, #2D3436); text-align: center; line-height: 1.1; }

/* ---------- Lokaal ---------- */
.pg-room-section { background: var(--bg-white, #fff); border-radius: var(--radius-lg, 16px); box-shadow: var(--shadow-sm); padding: 16px; }
.pg-front {
    background: linear-gradient(180deg, #EEEDF8, #F6F5FC); color: var(--primary, #6C63FF);
    text-align: center; font-weight: 700; font-size: 13px; letter-spacing: .03em;
    border-radius: 10px; padding: 8px; margin-bottom: 18px;
}
.pg-front-bottom { margin-bottom: 0; margin-top: 18px; }
.pg-room { display: block; }
.pg-room-empty { text-align: center; color: var(--text-medium, #636E72); font-size: 14px; padding: 30px 10px; }

/* Kolommen naast elkaar; de ruimte tussen de kolommen is het looppad */
.pg-cols { display: flex; gap: 36px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.pg-col { display: flex; flex-direction: column; gap: 12px; }
.pg-desk { display: flex; gap: 8px; }
.pg-col .pg-seat { width: 90px; }

.pg-grid-room { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.pg-cell-empty { min-height: 8px; }
.pg-table {
    display: grid; gap: 8px; border: 1px solid var(--border, #E8E8F0); border-radius: 14px;
    padding: 10px; background: #FAFAFE;
}
.pg-table-groep { grid-template-columns: 1fr 1fr; }
.pg-table-rij { grid-template-columns: repeat(2, 1fr); }
/* Oneven groepstafel: eerste plek bovenaan over de volle breedte, gecentreerd */
.pg-table-odd .pg-seat:first-child { grid-column: 1 / -1; justify-self: center; }

/* ---------- Plek (seat) ---------- */
.pg-seat {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 2px solid var(--border, #E8E8F0); border-radius: 12px; background: var(--bg-white, #fff);
    padding: 8px 6px; min-width: 84px; min-height: 78px; transition: border-color .12s, box-shadow .12s, transform .08s;
}
.pg-col .pg-seat { width: 92px; }
.pg-seat.is-occupied { cursor: pointer; }
.pg-seat.is-occupied:hover { border-color: #C9C5F0; }
.pg-seat.is-empty { background: #F7F7FB; border-style: dashed; cursor: pointer; color: #C2BEE0; }
.pg-seat.is-empty:hover { border-color: var(--primary, #6C63FF); color: var(--primary, #6C63FF); }
.pg-seat.is-selected { border-color: var(--primary, #6C63FF); box-shadow: 0 0 0 3px rgba(108,99,255,.2); }
.pg-seat-monster { width: 40px; height: 40px; object-fit: contain; }
.pg-seat-initials { display: none; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-light, #F1F0FA); align-items: center; justify-content: center; font-weight: 700; color: var(--text-medium, #636E72); font-size: 14px; }
.pg-seat-name { font-size: 12.5px; font-weight: 600; color: var(--text-dark, #2D3436); text-align: center; line-height: 1.1; }
.pg-seat-plus { font-size: 22px; font-weight: 300; }
.pg-seat { position: relative; }
.pg-seat-remove {
    position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border: none; border-radius: 50%;
    background: rgba(0, 0, 0, .07); color: #8A86A8; cursor: pointer; font-size: 13px; line-height: 18px;
    padding: 0; opacity: .55; transition: opacity .12s, background .12s, color .12s;
}
.pg-seat.is-empty:hover .pg-seat-remove { opacity: 1; }
.pg-seat-remove:hover { background: #FCE7E7; color: #C0392B; }

/* ---------- Instellingen ---------- */
.pg-field-label { display: block; font-size: 13px; font-weight: 700; color: var(--text-medium, #636E72); margin: 0 0 8px; }
.pg-grid-label { margin-top: 18px; }
.pg-seg { display: flex; gap: 8px; margin-bottom: 18px; }
.pg-seg button {
    flex: 1; border: 1px solid var(--border, #E8E8F0); background: var(--bg-white, #fff); color: var(--text-dark, #2D3436);
    border-radius: 12px; padding: 12px 8px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.pg-seg button.active { border-color: var(--primary, #6C63FF); background: #F3F2FF; color: var(--primary, #6C63FF); }
.pg-rijen-fields { display: flex; gap: 16px; }
.pg-rijen-fields > div { flex: 1; }
.pg-num { width: 90px; padding: 11px 12px; font-size: 17px; font-weight: 700; text-align: center; border: 2px solid var(--border, #E8E8F0); border-radius: 10px; }
.pg-num:focus { outline: none; border-color: var(--primary, #6C63FF); }
.pg-set-hint { font-size: 12.5px; color: var(--text-medium, #636E72); margin-top: 8px; line-height: 1.5; }
.pg-grid-editor { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; max-width: 320px; }
.pg-ge-cell {
    aspect-ratio: 1 / 1; border: 2px dashed var(--border, #E8E8F0); background: #FAFAFE; border-radius: 12px;
    cursor: pointer; font-size: 22px; color: var(--primary, #6C63FF); display: flex; align-items: center; justify-content: center;
}
.pg-ge-cell:hover { border-color: #C9C5F0; }
.pg-ge-groep { border-style: solid; border-color: var(--primary, #6C63FF); background: #EFEDFF; }
.pg-ge-rij { border-style: solid; border-color: #36B45A; background: #E6F7EC; color: #1E7B3A; }

/* ---------- Presenteren ---------- */
.pg-present { position: fixed; inset: 0; z-index: 4000; overflow-y: auto; padding: 28px 32px 48px; background: #F1F0FA; }
.pg-present-close { position: fixed; top: 18px; right: 22px; z-index: 4010; width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; background: #fff; color: #555; font-size: 20px; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.pg-present-close:hover { background: #EEE; }
.pg-present-front {
    max-width: 1300px; margin: 0 auto 22px; background: linear-gradient(180deg, #6C63FF, #8B7FFF); color: #fff;
    text-align: center; font-weight: 700; font-size: 17px; border-radius: 12px; padding: 12px;
}
.pg-present-front-bottom { margin: 22px auto 0; }
.pg-present-room { max-width: 1300px; margin: 0 auto; }
.pg-present-room .pg-seat { min-width: 96px; min-height: 88px; }
.pg-present-room .pg-col .pg-seat { width: 104px; }
.pg-present-room .pg-cols { gap: 48px; }
.pg-present-room .pg-seat-monster { width: 46px; height: 46px; }
.pg-present-room .pg-seat-name { font-size: 14px; }
body.pg-presenting { overflow: hidden; }

/* ---------- Toast ---------- */
.pg-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(12px);
    background: #2D3436; color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 5000; opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s; max-width: 90vw;
}
.pg-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
    .pg-toolbar { align-items: flex-start; }
    .pg-grid-room { gap: 8px; }
    .pg-seat { min-width: 72px; }
}
