/* BN Spil – chat. BN-DESIGN.DK */
.bn-chat{box-sizing:border-box;width:100%;margin:18px 0 24px;border-radius:24px;padding:clamp(16px,2.4vw,26px);color:#e8e9f3;
  font-family:'Outfit',system-ui,-apple-system,sans-serif;background:radial-gradient(700px 300px at 0 0,rgba(99,102,241,.22),transparent 60%),#11121f;
  border:1px solid rgba(255,255,255,.08);box-shadow:0 24px 50px -24px rgba(0,0,0,.6)}
.bn-chat *{box-sizing:border-box;min-width:0}
.bn-chat-hoved{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:6px 16px;margin-bottom:12px}
.bn-chat-hoved h3{margin:0;color:#fff;font-size:21px;font-weight:700;display:flex;align-items:center;gap:10px}
.bn-chat-prik{width:10px;height:10px;border-radius:50%;background:#34d399;box-shadow:0 0 0 4px rgba(52,211,153,.2)}
.bn-chat-info{font-size:14px;color:#9a9cb8}
.bn-chat-liste{height:260px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:16px;background:rgba(0,0,0,.25);border:1px solid rgba(255,255,255,.06);scroll-behavior:smooth}
.bn-chat-liste:focus-visible{outline:2px solid #a5b4fc;outline-offset:2px}
.bn-chat-tom{margin:auto;color:#8b8da8;font-size:15px}
.bn-chat-besked{align-self:flex-start;max-width:min(80%,560px);background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.07);border-radius:16px 16px 16px 6px;padding:8px 12px}
.bn-chat-besked.mig{align-self:flex-end;background:linear-gradient(135deg,#6366f1,#8b5cf6);border-color:transparent;border-radius:16px 16px 6px 16px}
.bn-chat-besked .top{display:flex;align-items:baseline;gap:8px;font-size:13px}
.bn-chat-besked b{color:#c7d2fe;font-weight:600}
.bn-chat-besked.mig b{color:#fff}
.bn-chat-besked time{color:#8b8da8;font-size:12px}
.bn-chat-besked.mig time{color:rgba(255,255,255,.75)}
.bn-chat-besked .top button{margin-left:auto;border:0;background:transparent;color:inherit;opacity:.6;cursor:pointer;font-size:16px;line-height:1;padding:0 2px}
.bn-chat-besked .top button:hover{opacity:1;color:#fca5a5}
.bn-chat-besked p{margin:2px 0 0;color:#fff;font-size:15px;line-height:1.4;overflow-wrap:anywhere}
.bn-chat-form{margin-top:12px}
.bn-chat-emoji{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.bn-chat-emoji button{width:38px;height:38px;border-radius:12px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);font-size:18px;cursor:pointer;transition:transform .12s,background .12s}
.bn-chat-emoji button:hover{transform:translateY(-2px);background:rgba(255,255,255,.12)}
.bn-chat-felt{display:flex;gap:8px}
.bn-chat-felt input{flex:1;min-height:48px;border-radius:14px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#fff;padding:10px 16px;font:inherit;font-size:16px}
.bn-chat-felt input::placeholder{color:#8b8da8}
.bn-chat-felt input:focus{outline:none;border-color:#818cf8;box-shadow:0 0 0 4px rgba(129,140,248,.2)}
.bn-chat-felt button{min-height:48px;padding:10px 22px;border:0;border-radius:14px;font:inherit;font-weight:700;font-size:16px;cursor:pointer;color:#fff;background:linear-gradient(135deg,#6366f1,#8b5cf6);box-shadow:0 10px 22px -10px rgba(99,102,241,.9)}
.bn-chat-felt button:hover{filter:brightness(1.1)}
.bn-chat-fejl{min-height:1.2em;margin:6px 0 0;color:#fca5a5;font-size:14px}
.bn-chat-login{margin:12px 0 0;color:#9a9cb8}
.bn-chat-login a{color:#fde047;font-weight:700}

/* ---------- Chat ude til højre for spillet ---------- */
.bn-spil-med-chat{display:grid;grid-template-columns:minmax(0,1fr) clamp(300px,24vw,380px);gap:clamp(14px,1.6vw,22px);align-items:start;width:100%}
.bn-spil-omraade{min-width:0}
.bn-spil-med-chat>.bn-chat{position:sticky;top:calc(var(--wp-admin--admin-bar--height,0px) + 16px);margin:24px 0;
  height:calc(100vh - var(--wp-admin--admin-bar--height,0px) - 48px);min-height:380px;display:flex;flex-direction:column}
.bn-spil-med-chat>.bn-chat .bn-chat-hoved{flex-direction:column;align-items:flex-start;gap:2px;position:relative}
.bn-spil-med-chat>.bn-chat .bn-chat-liste{flex:1;height:auto;min-height:0}
.bn-spil-med-chat>.bn-chat .bn-chat-besked{max-width:90%}
.bn-spil-med-chat>.bn-chat .bn-chat-emoji button{width:34px;height:34px;font-size:16px}
.bn-chat-luk{display:none}
.bn-chat-knap{display:none}

/* Mindre skærme: chatten glider ind fra højre via en knap */
@media(max-width:1099px){
  .bn-spil-med-chat{grid-template-columns:minmax(0,1fr)}
  .bn-spil-med-chat>.bn-chat{position:fixed;top:0;right:0;bottom:0;z-index:99990;margin:0;height:auto;max-height:none;min-height:0;
    width:min(400px,92vw);border-radius:24px 0 0 24px;transform:translateX(105%);transition:transform .28s ease;box-shadow:-20px 0 50px rgba(0,0,0,.5)}
  .bn-spil-med-chat>.bn-chat.aaben{transform:none}
  .bn-chat-luk{display:block;position:absolute;top:-4px;right:0;width:40px;height:40px;border:0;border-radius:12px;background:rgba(255,255,255,.08);color:#fff;font-size:24px;line-height:1;cursor:pointer}
  .bn-chat-knap{display:flex;align-items:center;gap:8px;position:fixed;right:16px;bottom:16px;z-index:99989;min-height:54px;padding:12px 20px;border:0;border-radius:999px;cursor:pointer;
    font:700 16px 'Outfit',system-ui,sans-serif;color:#fff;background:linear-gradient(135deg,#6366f1,#8b5cf6);box-shadow:0 14px 30px -8px rgba(99,102,241,.8)}
  .bn-chat-knap b{min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#f43f5e;font-size:13px;display:grid;place-items:center}
  .bn-chat-knap b:empty{display:none}
}
