/* RuneNation Social Hub V1 + Inbox V2: scoped styles; no changes to Joomla layout */
#rnsh-root{position:relative;display:flow-root;height:0;min-height:0;margin:0;padding:0;overflow:visible;z-index:9995;font:13px/1.4 Arial,Helvetica,sans-serif;color:#eef5ff}
#rnsh-root *{box-sizing:border-box}
#rnsh-root .rnsh-bar{position:absolute;top:8px;left:50%;transform:translateX(-50%);width:50vw;min-width:430px;height:26px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 9px;background:linear-gradient(180deg,#182f52,#101f37);border:1px solid #38577f;border-radius:7px;box-shadow:0 2px 11px rgba(0,0,0,.55);color:#fff;z-index:9999}
#rnsh-root .rnsh-online{display:flex;align-items:center;min-width:0;overflow:hidden;gap:6px;white-space:nowrap;font-size:11px;font-weight:700;flex:1}
#rnsh-root .rnsh-brand{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#rnsh-root .rnsh-original{display:flex!important;align-items:center;gap:5px!important;position:static!important;float:none!important;transform:none!important;margin:0!important;padding:0!important;min-height:0!important;max-height:28px!important;background:transparent!important;box-shadow:none!important;border:0!important;font-size:10px!important;white-space:nowrap;min-width:0}
#rnsh-root .rnsh-original *{font-size:10px!important;max-height:22px!important}
#rnsh-root .rnsh-actions{display:flex;gap:3px;align-items:center;flex:0 0 auto}
#rnsh-root .rnsh-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;border:0;border-radius:5px;background:transparent!important;color:#fff!important;cursor:pointer;text-decoration:none!important;padding:3px!important}
#rnsh-root .rnsh-btn:hover,#rnsh-root .rnsh-btn:focus-visible{background:#28466f!important;outline:1px solid #89b7f4}
#rnsh-root .rnsh-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#rnsh-root .rnsh-badge{position:absolute;top:-5px;right:-6px;background:#f8bf58;color:#172642;border-radius:999px;min-width:14px;height:14px;display:flex;align-items:center;justify-content:center;font-size:10px;line-height:1;padding:0 3px;font-weight:900;border:1px solid #fff}
#rnsh-root .rnsh-panel{position:absolute;z-index:10000;top:46px;left:50%;transform:translateX(-50%);width:min(640px,calc(100vw - 20px));max-height:min(84vh,760px);overflow-y:auto;overflow-x:hidden;background:linear-gradient(#172c48,#101d31);border:1px solid #54749c;border-radius:12px;box-shadow:0 16px 55px #000b;padding:16px;color:#fff}
#rnsh-root .rnsh-panel[hidden]{display:none!important}
#rnsh-root .rnsh-panelheader{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #36506d;padding-bottom:10px;margin-bottom:12px}
#rnsh-root .rnsh-panel h2{font-size:19px!important;line-height:1.2!important;margin:0!important;color:#ffd17a!important;font-weight:800}
#rnsh-root .rnsh-panel h3{color:#e8f2ff!important;font-size:14px!important;margin:12px 0 6px!important}
#rnsh-root .rnsh-panel p,#rnsh-root .rnsh-panel label{color:#dfecff!important;margin:7px 0;font-size:13px}
#rnsh-root .rnsh-panel input,#rnsh-root .rnsh-panel textarea{border:1px solid #6283ad!important;border-radius:6px!important;background:#f9fbff!important;color:#19283d!important;box-shadow:none!important;width:100%;padding:9px;font-size:14px!important;line-height:1.35}
#rnsh-root .rnsh-panel textarea{min-height:70px;resize:vertical}
#rnsh-root .rnsh-panel .rnsh-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#rnsh-root .rnsh-item{border:1px solid #3a587b;background:#112138;border-radius:8px;padding:11px;margin:8px 0;min-width:0;overflow-wrap:anywhere}
#rnsh-root .rnsh-item small{color:#bdcfe4;font-size:11px;display:block;margin-top:3px}
#rnsh-root .rnsh-item strong{color:#fff}
#rnsh-root .rnsh-line{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:7px}
#rnsh-root button.rnsh-act,#rnsh-root a.rnsh-act{background:#2e527b!important;color:#fff!important;border:1px solid #7198be!important;border-radius:6px!important;padding:6px 10px!important;font-size:12px!important;font-weight:700!important;text-decoration:none!important;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1.3}
#rnsh-root .rnsh-act.rnsh-primary{background:#227a45!important;border-color:#6ec38e!important}
#rnsh-root .rnsh-act.rnsh-danger{background:#812f39!important;border-color:#d06f76!important}
#rnsh-root .rnsh-act.rnsh-gold{background:#85601f!important;border-color:#eebf60!important}
#rnsh-root button.rnsh-act:focus-visible,#rnsh-root a.rnsh-act:focus-visible{outline:2px solid #fff;outline-offset:2px}
#rnsh-root .rnsh-empty{font-size:13px;color:#c8d6ec!important}
#rnsh-root .rnsh-toast{position:fixed;right:14px;bottom:20px;z-index:10001;background:#142e4a;border:1px solid #a8cbf5;border-radius:8px;color:white;padding:10px 14px;max-width:350px;box-shadow:0 6px 30px #0008;display:none}
#rnsh-root .rnsh-toast.rnsh-visible{display:block}
#rnsh-root .rnsh-muted{color:#aac1dc!important;font-size:11px!important}
@media(max-width:760px){#rnsh-root .rnsh-bar{width:calc(100vw - 16px);min-width:0;max-width:none;top:6px;height:43px;padding:3px 7px}#rnsh-root .rnsh-online{font-size:10px;gap:3px;min-width:50px}#rnsh-root .rnsh-btn{min-width:39px;height:39px}#rnsh-root .rnsh-btn svg{width:18px;height:18px}#rnsh-root .rnsh-panel{top:56px;padding:12px;max-height:70vh}#rnsh-root .rnsh-panel .rnsh-grid{grid-template-columns:1fr}#rnsh-root .rnsh-original *{font-size:9px!important}}
@media(max-width:380px){#rnsh-root .rnsh-btn{min-width:35px}#rnsh-root .rnsh-online{font-size:9px}}
/* Dedicated inbox route: neutral white page; NO full-page gradient or tinted panel. */
body.rnsh-standalone{margin:0!important;background:#fff!important;background-image:none!important;min-height:100vh;color:#252525!important}
body.rnsh-standalone #rnsh-root{min-height:100vh;height:auto}
body.rnsh-standalone #rnsh-root .rnsh-bar{position:relative;top:0;left:auto;transform:none;margin:12px auto 20px}
body.rnsh-standalone #rnsh-root .rnsh-back{max-width:880px;margin:15px auto;padding:0 12px}
body.rnsh-standalone #rnsh-root .rnsh-back a{color:#245782!important}
body.rnsh-standalone #rnsh-root .rnsh-panel{position:relative;left:auto;top:auto;transform:none;margin:22px auto;width:min(880px,calc(100% - 24px));max-height:none;min-height:300px;background:transparent!important;background-image:none!important;border:1px solid #d5d5d5!important;box-shadow:none!important;color:#242424!important}
body.rnsh-standalone #rnsh-root .rnsh-panelheader{border-bottom-color:#dedede!important}
body.rnsh-standalone #rnsh-root .rnsh-panel h2{color:#252525!important}
body.rnsh-standalone #rnsh-root .rnsh-panel h3{color:#303030!important}
body.rnsh-standalone #rnsh-root .rnsh-panel p,body.rnsh-standalone #rnsh-root .rnsh-panel label{color:#242424!important}
body.rnsh-standalone #rnsh-root .rnsh-panel .rnsh-item{background:transparent!important;background-image:none!important;border:1px solid #d9d9d9!important;color:#252525!important}
body.rnsh-standalone #rnsh-root .rnsh-panel .rnsh-item strong{color:#242424!important}
body.rnsh-standalone #rnsh-root .rnsh-panel .rnsh-item small{color:#606060!important}
body.rnsh-standalone #rnsh-root .rnsh-panel .rnsh-muted,body.rnsh-standalone #rnsh-root .rnsh-panel .rnsh-empty{color:#555!important}
body.rnsh-standalone #rnsh-root .rnsh-panel input,body.rnsh-standalone #rnsh-root .rnsh-panel textarea{border:1px solid #bdbdbd!important;background:#fff!important;color:#242424!important}
body.rnsh-standalone #rnsh-root .rnsh-panel a:not(.rnsh-act){color:#245782!important}
body.rnsh-standalone #rnsh-root .rnsh-panel .rnsh-btn{color:#333!important}
#rnsh-root .rnsh-pending{border-style:dashed!important}
@media(max-width:760px){body.rnsh-standalone #rnsh-root .rnsh-panel{width:calc(100% - 20px);padding:14px!important}body.rnsh-standalone #rnsh-root .rnsh-back{padding:0 14px}}

/* V3: inline conversation view. Existing blue social bar and neutral standalone background stay unchanged. */
#rnsh-root .rnsh-thread-row{display:flex!important;width:100%;align-items:center;justify-content:space-between;gap:12px;text-align:left;margin:7px 0;padding:11px 12px!important;background:rgba(255,255,255,.05)!important;border:1px solid #577396!important;border-radius:9px!important;color:inherit!important;cursor:pointer;min-height:64px}
#rnsh-root .rnsh-thread-row:hover,#rnsh-root .rnsh-thread-row:focus-visible{background:rgba(255,255,255,.14)!important;border-color:#e5bb78!important;outline:2px solid transparent}
#rnsh-root .rnsh-thread-main{display:block;flex:1;min-width:0}
#rnsh-root .rnsh-thread-main strong{display:block;font-size:14px;color:inherit!important}
#rnsh-root .rnsh-thread-main small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:430px;opacity:.85;font-size:12px}
#rnsh-root .rnsh-thread-side{display:flex;align-items:flex-end;flex-direction:column;gap:6px;flex-shrink:0}
#rnsh-root .rnsh-thread-side small{font-size:10px;opacity:.8;white-space:nowrap}
#rnsh-root .rnsh-thread-count{font-size:11px;background:#f8bf58;color:#172642;border-radius:15px;min-width:20px;text-align:center;padding:2px 5px;font-weight:800}
#rnsh-root .rnsh-conversation-top{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:8px 0 12px}
#rnsh-root .rnsh-conversation-top h3{margin:0!important}
#rnsh-root .rnsh-chat{display:flex;flex-direction:column;gap:10px;min-height:120px;max-height:370px;overflow:auto;overscroll-behavior:contain;padding:13px 8px;border-radius:10px;border:1px solid #577396;background:rgba(0,0,0,.12)}
#rnsh-root .rnsh-chat-row{display:flex;width:100%;min-width:0}
#rnsh-root .rnsh-chat-row.rnsh-mine{justify-content:flex-end}
#rnsh-root .rnsh-chat-row.rnsh-theirs{justify-content:flex-start}
#rnsh-root .rnsh-bubble{border-radius:12px;padding:9px 12px;max-width:min(85%,440px);min-width:75px;border:1px solid #668ab0;background:#243b56;overflow-wrap:anywhere}
#rnsh-root .rnsh-chat-row.rnsh-mine .rnsh-bubble{background:#345b4c;border-color:#70aa89;border-bottom-right-radius:3px}
#rnsh-root .rnsh-chat-row.rnsh-theirs .rnsh-bubble{border-bottom-left-radius:3px}
#rnsh-root .rnsh-bubble p{color:#fff!important;margin:0!important;white-space:pre-wrap;overflow-wrap:anywhere}
#rnsh-root .rnsh-bubble small{display:block;color:#d4e1ec;font-size:10px;text-align:right;margin-top:5px}
#rnsh-root .rnsh-chat-compose{margin-top:12px}
#rnsh-root .rnsh-chat-compose label{display:block;margin-bottom:5px}
body.rnsh-standalone #rnsh-root .rnsh-thread-row{border-color:#d4d4d4!important;background:#fff!important;color:#252525!important}
body.rnsh-standalone #rnsh-root .rnsh-thread-row:hover{background:#f4f4f4!important}
body.rnsh-standalone #rnsh-root .rnsh-chat{background:transparent!important;border-color:#ddd!important}
body.rnsh-standalone #rnsh-root .rnsh-chat-row.rnsh-mine .rnsh-bubble{background:#ecf4ee!important;border-color:#b7d3bd!important}
body.rnsh-standalone #rnsh-root .rnsh-chat-row.rnsh-theirs .rnsh-bubble{background:#f5f5f5!important;border-color:#ddd!important}
body.rnsh-standalone #rnsh-root .rnsh-bubble p{color:#242424!important}
body.rnsh-standalone #rnsh-root .rnsh-bubble small{color:#646464!important}
@media(max-width:760px){#rnsh-root .rnsh-chat{max-height:42vh}#rnsh-root .rnsh-bubble{max-width:90%}#rnsh-root .rnsh-thread-side small{max-width:95px;overflow:hidden;text-overflow:ellipsis}#rnsh-root .rnsh-thread-row{min-height:52px}#rnsh-root .rnsh-conversation-top{gap:6px}}


/* V4: clearer conversation UI and reply affordance */
#rnsh-root .rnsh-thread-open{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:999px;border:1px solid #6f8fb6;background:rgba(255,255,255,.06);font-size:11px;font-weight:700;white-space:nowrap}
#rnsh-root .rnsh-conversation-shell{display:block;min-width:0}
#rnsh-root .rnsh-conversation-top{padding:2px 0 2px}
#rnsh-root .rnsh-chat-wrap{border:1px solid #4b6890;border-radius:12px;background:rgba(9,18,31,.28);padding:10px;margin:0 0 12px;overflow:hidden}
#rnsh-root .rnsh-chat{width:100%;box-sizing:border-box;min-width:0;min-height:150px;max-height:340px;padding:8px;border:0;background:transparent}
#rnsh-root .rnsh-chat-row{min-width:0}
#rnsh-root .rnsh-bubble{box-sizing:border-box}
#rnsh-root .rnsh-chat-compose{border:1px solid #4b6890;border-radius:12px;background:rgba(255,255,255,.05);padding:12px;margin-top:12px}
#rnsh-root .rnsh-compose-head{display:flex;align-items:center;gap:8px;margin-bottom:6px}
#rnsh-root .rnsh-compose-head label{margin:0!important;font-weight:700;color:#fff!important}
#rnsh-root .rnsh-compose-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:999px;background:#29476f;border:1px solid #7ea1c9;color:#fff;font-size:16px;line-height:1}
#rnsh-root .rnsh-chat-compose textarea{margin-bottom:8px}
body.rnsh-standalone #rnsh-root .rnsh-thread-open{border-color:#c8c8c8;background:#f5f5f5;color:#333}
body.rnsh-standalone #rnsh-root .rnsh-chat-wrap{background:#fff!important;border-color:#ddd!important}
body.rnsh-standalone #rnsh-root .rnsh-chat-compose{background:#fff!important;border-color:#ddd!important}
body.rnsh-standalone #rnsh-root .rnsh-compose-head label{color:#242424!important}
body.rnsh-standalone #rnsh-root .rnsh-compose-icon{background:#f0f0f0!important;border-color:#ccc!important;color:#333!important}
@media(max-width:760px){#rnsh-root .rnsh-thread-row{align-items:flex-start}#rnsh-root .rnsh-thread-side{align-items:flex-end}#rnsh-root .rnsh-thread-open{font-size:10px;padding:2px 6px}#rnsh-root .rnsh-chat-wrap{padding:8px}#rnsh-root .rnsh-chat{max-height:36vh;padding:4px}#rnsh-root .rnsh-chat-compose{padding:10px}#rnsh-root .rnsh-compose-head{margin-bottom:4px}}


/* V5: compact empty conversations and bulletproof reply composer */
#rnsh-root .rnsh-chat.rnsh-chat-empty{min-height:56px;max-height:none;padding:10px 8px}
#rnsh-root .rnsh-chat.rnsh-chat-empty .rnsh-empty{margin:0!important}
#rnsh-root .rnsh-chat-compose{display:block!important;clear:both;width:100%!important;max-width:none!important;overflow:visible!important}
#rnsh-root .rnsh-chat-compose textarea{display:block!important;float:none!important;clear:both!important;width:100%!important;max-width:100%!important;min-width:100%!important;min-height:110px!important;margin:8px 0!important;position:static!important;visibility:visible!important;opacity:1!important}
#rnsh-root .rnsh-chat-compose .rnsh-line{justify-content:flex-start}
#rnsh-root .rnsh-chat-wrap + .rnsh-chat-compose{margin-top:0}
body.rnsh-standalone #rnsh-root .rnsh-chat.rnsh-chat-empty{background:#fff!important}
@media(max-width:760px){#rnsh-root .rnsh-panel{max-height:86vh}#rnsh-root .rnsh-chat.rnsh-chat-empty{min-height:50px}#rnsh-root .rnsh-chat-compose textarea{min-height:96px!important}}


/* RuneNation Social Hub V6 - full-height, safely scrolling conversations. */
#rnsh-root .rnsh-panel.rnsh-is-conversation{
 position:fixed!important;top:clamp(60px,9vh,100px)!important;left:50%!important;
 transform:translateX(-50%)!important;
 width:min(760px,calc(100vw - 24px))!important;
 height:min(84vh,760px)!important;
 height:min(84dvh,760px)!important;
 max-height:calc(100vh - 84px)!important;
 max-height:calc(100dvh - 84px)!important;
 padding:16px!important;display:flex!important;flex-direction:column!important;
 overflow:hidden!important;z-index:10020!important;
 box-sizing:border-box!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-panelheader{
 flex:0 0 auto!important;min-height:44px;margin:0 0 8px!important;padding:0 0 10px!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-conversation-shell{
 display:flex!important;flex-direction:column!important;flex:1 1 auto!important;
 min-height:0!important;min-width:0!important;height:auto!important;max-height:none!important;
 overflow:hidden!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-conversation-top{
 flex:0 0 auto!important;margin:0 0 10px!important;padding:2px 0!important;min-height:39px!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-conversation-top h3{
 margin:0!important;font-size:15px!important;line-height:1.3!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat-wrap{
 display:flex!important;flex-direction:column!important;flex:1 1 auto!important;
 height:100%!important;min-height:0!important;max-height:none!important;
 overflow:hidden!important;padding:9px!important;margin:0 0 12px!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat-toolbar{
 flex:0 0 auto!important;display:flex!important;align-items:center!important;
 justify-content:space-between!important;gap:8px!important;
 margin:0 0 8px!important;padding:0 4px 8px!important;
 border-bottom:1px solid #435c7b!important;font-weight:700!important;font-size:12px!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat-toolbar small{
 font-size:10px!important;font-weight:400!important;color:#b5c9e1!important;text-align:right;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat{
 display:flex!important;flex-direction:column!important;flex:1 1 auto!important;
 min-height:0!important;height:auto!important;max-height:none!important;
 overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important;
 padding:8px!important;margin:0!important;border:0!important;background:transparent!important;
 scrollbar-width:thin;scrollbar-color:#7896ba transparent;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat.rnsh-chat-empty{
 flex:1 1 auto!important;min-height:0!important;max-height:none!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat-row{flex:0 0 auto!important;}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat-compose{
 display:block!important;flex:0 0 auto!important;width:100%!important;
 margin:0!important;padding:10px!important;overflow:visible!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-compose-head{
 margin:0 0 4px!important;min-height:23px!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-compose-icon{
 width:24px!important;height:24px!important;font-size:14px!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat-compose textarea{
 box-sizing:border-box!important;display:block!important;width:100%!important;
 min-width:0!important;max-width:100%!important;height:68px!important;
 min-height:68px!important;max-height:120px!important;resize:vertical!important;
 margin:5px 0!important;padding:9px!important;font-size:13px!important;line-height:1.4!important;
}
#rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat-compose .rnsh-line{
 margin-top:5px!important;
}
@media(max-width:760px){
 #rnsh-root .rnsh-panel.rnsh-is-conversation{
  top:56px!important;width:calc(100vw - 16px)!important;height:calc(100vh - 70px)!important;
  height:calc(100dvh - 70px)!important;max-height:calc(100dvh - 70px)!important;
  padding:12px!important;border-radius:12px!important;
 }
 #rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat-toolbar{flex-direction:column!important;align-items:flex-start!important;gap:2px!important}
 #rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat-toolbar small{text-align:left}
 #rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-conversation-top{gap:8px!important}
 #rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat-compose textarea{height:60px!important;min-height:60px!important;max-height:110px!important}
}
@media(max-height:550px){
 #rnsh-root .rnsh-panel.rnsh-is-conversation{top:42px!important;height:calc(100dvh - 48px)!important;max-height:calc(100dvh - 48px)!important;padding:8px!important}
 #rnsh-root .rnsh-panel.rnsh-is-conversation .rnsh-chat-compose textarea{height:48px!important;min-height:48px!important}
}
