/* ============================================
   ROLVERDELER - styling
   Sluit aan op het design system in style.css
   ============================================ */

/* ---------- Leeg ---------- */
.rv-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);
}
.rv-empty-icon { font-size: 48px; margin-bottom: 12px; }
.rv-empty p { margin: 0; line-height: 1.6; }

/* ---------- Bedieningsbalk ---------- */
.rv-toolbar {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
    flex-wrap: wrap; margin-bottom: 12px;
}
.rv-tb-group { display: flex; flex-direction: column; gap: 6px; }
.rv-tb-label { font-size: 12px; font-weight: 700; color: var(--text-medium, #636E72); text-transform: uppercase; letter-spacing: .03em; }
.rv-tb-row { display: flex; gap: 8px; align-items: center; }
.rv-tb-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rv-tb-divider { width: 1px; height: 26px; background: var(--border, #E8E8F0); }

.rv-select, .rv-num, .rv-text {
    border: 1px solid var(--border, #E8E8F0); border-radius: 10px;
    padding: 9px 12px; font-size: 14px; color: var(--text-dark, #2D3436);
    background: var(--bg-white, #fff); font-family: inherit;
}
.rv-num { width: 72px; text-align: center; }
.rv-set-select { max-width: 180px; }

.rv-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;
}
.rv-btn:active { transform: translateY(1px); }
.rv-btn-primary { background: var(--primary, #6C63FF); color: #fff; }
.rv-btn-primary:hover { box-shadow: 0 6px 18px rgba(108,99,255,.3); }
.rv-btn-ghost { background: var(--bg-light, #F1F0FA); color: var(--text-dark, #2D3436); }
.rv-btn-ghost:hover { background: #E7E5F6; }

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

/* ---------- Secties ---------- */
.rv-section-title { font-size: 15px; color: var(--text-dark, #2D3436); margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.rv-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 ---------- */
.rv-pool-section { margin-bottom: 22px; }
.rv-pool {
    display: flex; flex-wrap: wrap; gap: 10px; min-height: 64px;
    background: var(--bg-white, #fff); border: 1px dashed var(--border, #E8E8F0);
    border-radius: 14px; padding: 12px;
}
.rv-pool.is-droptarget { border-color: var(--primary, #6C63FF); background: #FAF9FF; cursor: pointer; }
.rv-pool-empty { color: var(--text-medium, #636E72); font-size: 14px; margin: 6px; }

/* ---------- Chip (leerling) ---------- */
.rv-chip {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: var(--bg-white, #fff); border: 2px solid var(--border, #E8E8F0);
    border-radius: 12px; padding: 8px 8px 9px; width: 92px; cursor: pointer;
    transition: border-color .12s, transform .08s, box-shadow .12s;
    position: relative;
}
.rv-chip:hover { border-color: #C9C5F0; }
.rv-chip:active { transform: translateY(1px); }
.rv-chip.is-selected { border-color: var(--primary, #6C63FF); box-shadow: 0 0 0 3px rgba(108,99,255,.18); }
.rv-chip-monster { width: 42px; height: 42px; object-fit: contain; }
.rv-chip-initials {
    display: none; width: 42px; height: 42px; border-radius: 50%; background: var(--bg-light, #F1F0FA);
    align-items: center; justify-content: center; font-weight: 700; color: var(--text-medium, #636E72); font-size: 15px;
}
.rv-chip-name { font-size: 12.5px; font-weight: 600; color: var(--text-dark, #2D3436); text-align: center; line-height: 1.15; }
.rv-role-select {
    margin-top: 4px; max-width: 84px; font-size: 11px; padding: 3px 4px;
    border: 1px solid var(--border, #E8E8F0); border-radius: 7px; background: #fff; cursor: pointer; font-family: inherit;
}

/* ---------- Groepjes ---------- */
.rv-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.rv-groups-empty { color: var(--text-medium, #636E72); font-size: 14px; padding: 16px 2px; }
.rv-group {
    background: var(--bg-white, #fff); border: 1px solid var(--border, #E8E8F0);
    border-radius: 14px; box-shadow: var(--shadow-sm); padding: 12px 12px 14px;
}
.rv-group.is-droptarget { border-color: var(--primary, #6C63FF); cursor: pointer; }
.rv-group.is-droptarget .rv-group-body { background: #FAF9FF; border-radius: 10px; }
.rv-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rv-group-title { font-weight: 700; color: var(--text-dark, #2D3436); font-size: 15px; }
.rv-group-count {
    display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px;
    border-radius: 999px; background: var(--bg-light, #F1F0FA); color: var(--text-medium, #636E72); font-size: 11px; font-weight: 700;
}
.rv-group-del { margin-left: auto; border: none; background: none; cursor: pointer; color: #B9B6D6; font-size: 18px; line-height: 1; padding: 2px 4px; }
.rv-group-del:hover { color: #C0392B; }
.rv-group-body { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; padding: 4px; transition: background .12s; }
.rv-group-empty { color: var(--text-medium, #636E72); font-size: 12.5px; margin: 6px; }

/* ---------- Rollen beheren ---------- */
.rv-settings-sub { color: var(--text-medium, #636E72); font-size: 14px; margin: 0 0 16px; line-height: 1.5; }
.rv-roles-edit { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.rv-role-row { display: flex; gap: 8px; align-items: flex-start; }
.rv-role-icon {
    width: 48px; text-align: center; font-size: 18px; padding: 9px 4px;
    border: 1px solid var(--border, #E8E8F0); border-radius: 10px; flex-shrink: 0;
}
.rv-role-fields { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.rv-role-label, .rv-role-desc {
    width: 100%; border: 1px solid var(--border, #E8E8F0); border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit;
}
.rv-role-label { font-weight: 600; }
.rv-role-desc { font-size: 13px; color: var(--text-medium, #636E72); }
.rv-role-del { border: none; background: none; cursor: pointer; font-size: 16px; padding: 8px 4px; flex-shrink: 0; }
.rv-role-del:hover { filter: brightness(.85); }
.rv-add-role { width: 100%; justify-content: center; }
.rv-field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-medium, #636E72); margin-bottom: 8px; }

/* ---------- Presenteren ---------- */
.rv-present {
    position: fixed; inset: 0; z-index: 4000; overflow-y: auto; padding: 32px 40px 56px;
    background: radial-gradient(circle at 30% 0%, #7A70FF 0%, #5B51D6 45%, #3F37A8 100%); color: #fff;
}
.rv-present-close {
    position: fixed; top: 20px; right: 24px; z-index: 4010; width: 46px; height: 46px; border-radius: 50%;
    border: none; cursor: pointer; background: rgba(255,255,255,.18); color: #fff; font-size: 20px;
}
.rv-present-close:hover { background: rgba(255,255,255,.3); }
.rv-present-title { text-align: center; font-size: 34px; margin-bottom: 28px; }
.rv-present-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; max-width: 1500px; margin: 0 auto; }
.rv-pr-group { background: rgba(255,255,255,.12); border-radius: 16px; padding: 16px 18px; }
.rv-pr-group-title { font-size: 19px; font-weight: 800; margin-bottom: 10px; }
.rv-pr-member { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.rv-pr-monster { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.rv-pr-name { font-size: 16px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-pr-role {
    flex-shrink: 0; background: rgba(255,255,255,.92); color: #3F37A8;
    border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.rv-pr-norole { background: rgba(255,255,255,.18); color: rgba(255,255,255,.85); }
.rv-present-empty { text-align: center; color: rgba(255,255,255,.85); font-size: 18px; margin-top: 40px; }
body.rv-presenting { overflow: hidden; }

/* ---------- Toast ---------- */
.rv-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;
}
.rv-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .rv-toolbar { flex-direction: column; align-items: stretch; }
    .rv-tb-actions { justify-content: flex-start; }
    .rv-groups { grid-template-columns: 1fr; }
}
