/* Rooms (view/user/rooms.php, js/rooms.js) */
.RMPAGE{padding:16px 18px 40px;background:#fff;min-height:calc(100vh - 50px)}
.RMBTN{display:inline-flex;align-items:center;gap:6px;border:0;border-radius:8px;background:#5865f2;color:#fff!important;font-weight:600;font-size:14px;padding:8px 14px;cursor:pointer;text-decoration:none!important;white-space:nowrap}
.RMBTN:hover{background:#4752c4}.RMBTN[disabled]{opacity:.6;cursor:default}
.RMBTN.RMLIGHT{background:#e9ebee;color:#1c1e21!important}.RMBTN.RMLIGHT:hover{background:#dcdfe3}

/* directory */
.RMHEAD{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.RMHEAD h1{font-size:24px;font-weight:800;margin:0 0 2px;color:#060607}
.RMHEAD p{margin:0;color:#5c5e66;font-size:14px;max-width:560px}
.RMSEARCH{position:relative;margin:4px 0 18px;max-width:420px}
.RMSEARCH i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#80848e;font-size:14px}
.RMSEARCH input{width:100%;border:1px solid #dfe1e5;background:#f2f3f5;border-radius:8px;padding:8px 12px 8px 34px;font-size:14px;outline:none}
.RMSEARCH input:focus{background:#fff;border-color:#5865f2}
.RMSEC{margin-bottom:22px}
.RMSEC h2{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#5c5e66;margin:0 0 8px}
.RMSEC h2 small{font-weight:600;color:#80848e;margin-left:4px;font-size:12px}
.RMGRID{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.RMCARD{display:flex;gap:12px;align-items:flex-start;padding:12px;border:1px solid #e3e5e8;border-radius:12px;background:#fff;color:inherit!important;text-decoration:none!important;transition:background .12s,border-color .12s,box-shadow .12s;min-width:0}
.RMCARD:hover{background:#f6f7f9;border-color:#d4d7dc;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.RMIC{width:48px;height:48px;flex:0 0 48px;border-radius:16px;background:#e4e6eb center/cover no-repeat;display:inline-flex;align-items:center;justify-content:center}
.RMIL{color:#fff;font-weight:800;font-size:20px}
.RMICL{width:64px;height:64px;flex:0 0 64px;border-radius:20px;font-size:26px}
.RMTX{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;line-height:1.3}
.RMNM{font-weight:700;font-size:15px;color:#060607;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.RMNM .fa-lock{font-size:12px;color:#80848e}
.RMDS{font-size:13px;color:#4e5058;margin-top:2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}
.RMMT{font-size:12px;color:#80848e;margin-top:4px}
.RMMT a{color:#5865f2}
.RMHERE{font-size:12px;color:#23a55a;font-weight:600;margin-top:4px}
.RMNONE,.RMNOMATCH{text-align:center;color:#80848e;padding:30px 10px;border:1px dashed #d4d7dc;border-radius:12px}
.RMNONE i,.RMNOMATCH i{font-size:28px;display:block;margin-bottom:8px}
.RMNONE .t{font-weight:700;color:#4e5058}
.RMMORE{margin:12px auto 0;display:flex}
.RMMORE[hidden],.RMNONE[hidden],.RMNOMATCH[hidden]{display:none}

/* create dialog */
#RMCREATE .modal-content{border:0;border-radius:14px}
#RMCREATE .modal-header{border:0;padding-bottom:0}
#RMCREATE .modal-title{font-weight:800}
#RMCREATE .modal-footer{border:0;background:#f2f3f5;border-radius:0 0 14px 14px}
.RMICPICK{display:flex;align-items:center;gap:14px;margin-bottom:10px}
.RMICUP{position:relative;cursor:pointer;margin:0}
.RMICUP .RMIC{border:2px dashed transparent}
.RMICUP:hover .RMIC,.RMICUP:focus .RMIC{border-color:#5865f2}
.RMICUP.busy{opacity:.5;pointer-events:none}
.RMICCAM{position:absolute;right:-4px;bottom:-4px;width:24px;height:24px;border-radius:50%;background:#5865f2;color:#fff;font-size:11px;display:flex;align-items:center;justify-content:center;border:2px solid #fff}
.RMICHINT{font-weight:600;font-size:14px;color:#4e5058;display:flex;flex-direction:column;align-items:flex-start}
.RMICHINT small{font-weight:400;color:#80848e}
.RMICDEL{border:0;background:none;color:#da373c;padding:0;font-size:12px}
.RMLBL{display:block;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:#4e5058;margin:10px 0 4px}
.RMLBL small{text-transform:none;font-weight:400;color:#80848e;letter-spacing:0}
.RMCNT{text-align:right;font-size:11px;color:#80848e;margin-top:2px}
.RMVIS{display:block;margin:0 0 6px;cursor:pointer}
.RMVIS input{position:absolute;opacity:0}
.RMVIS span{display:grid;grid-template-columns:28px 1fr;column-gap:8px;padding:10px 12px;border:1px solid #dfe1e5;border-radius:10px}
.RMVIS span i{grid-row:span 2;font-size:18px;color:#4e5058;align-self:center;text-align:center}
.RMVIS span small{color:#5c5e66}
.RMVIS input:checked+span{border-color:#5865f2;background:#f0f1fe}
.RMVIS input:checked+span i{color:#5865f2}
.RMVIS input:focus-visible+span{outline:2px solid #5865f2}
.RMERR{color:#da373c;font-size:13px;margin-top:8px}

/* one room (header for now; the feed comes next) */
.RMROOMH{display:flex;gap:14px;align-items:flex-start;padding-bottom:14px;border-bottom:1px solid #e3e5e8;margin-bottom:16px}
.RMROOMH h1.RMNM{font-size:22px;font-weight:800;margin:0;white-space:normal}
.RMDSF{display:block;-webkit-line-clamp:unset;font-size:14px}
.RMBACK{width:36px;height:36px;flex:0 0 36px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#4e5058!important;background:#f2f3f5;margin-top:14px}
.RMBACK:hover{background:#e3e5e8}
.RMNOTE{text-align:center;padding:50px 16px;color:#5c5e66}
.RMNOTE>i{font-size:38px;color:#80848e;margin-bottom:10px}
.RMNOTE h2{font-size:20px;font-weight:800;color:#060607;margin:0 0 6px}
.RMNOTE .RMBTN{margin-top:12px}

/* room view: header, scrolling feed, composer at the bottom */
.RMPAGE.RMINROOM{display:flex;flex-direction:column;height:calc(100vh - 50px);min-height:0;padding:0;position:relative}
.RMINROOM .RMROOMH{padding:10px 16px;margin:0;align-items:center;gap:12px;flex:0 0 auto}
.RMINROOM .RMROOMH .RMICL{width:44px;height:44px;flex:0 0 44px;border-radius:14px;font-size:20px}
.RMINROOM .RMROOMH h1.RMNM{font-size:18px}
.RMINROOM .RMROOMH .RMDSF{display:-webkit-box;-webkit-line-clamp:1;font-size:13px}
.RMINROOM .RMROOMH .RMMT{margin-top:1px}
.RMINROOM .RMBACK{margin-top:0}
.RMFEEDW{position:relative;flex:1 1 auto;min-height:0;display:flex}
.RMFEED{flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;padding:8px 0 14px}
.RMSTART{padding:24px 16px 8px}
.RMSTART h2{font-size:26px;font-weight:800;color:#060607;margin:10px 0 2px}
.RMSTART p{color:#5c5e66;margin:0}
.RMSTART[hidden],.RMOLDER[hidden],.RMJUMP[hidden],.RMBAR[hidden],.RPRX[hidden]{display:none!important}
.RMOLDER{text-align:center;color:#80848e;padding:10px}
.RMJUMP{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);border:0;border-radius:16px;background:#5865f2;color:#fff;font-weight:600;font-size:13px;padding:6px 14px;box-shadow:0 2px 8px rgba(0,0,0,.2);z-index:3}

/* posts */
.RPDAY{display:flex;align-items:center;margin:16px 16px 6px;color:#5c5e66;font-size:12px;font-weight:600}
.RPDAY:before,.RPDAY:after{content:"";flex:1;border-top:1px solid #e3e5e8}
.RPDAY span{padding:0 8px}
.RPNEW{display:flex;align-items:center;margin:6px 16px 6px;color:#f23f43;font-size:11px;font-weight:700;text-transform:uppercase}
.RPNEW:before{content:"";flex:1;border-top:1px solid #f23f43}
.RPNEW span{background:#f23f43;color:#fff;border-radius:4px;padding:0 5px;margin-left:4px}
.RP{position:relative;padding:2px 48px 2px 72px;min-height:22px}
.RP.RPH{margin-top:14px;padding-top:3px}
.RP:hover,.RP.RPON{background:#f6f7f9}
.RP.RPHL{background:#fdf2d5;transition:background .4s}
.RPAV{position:absolute;left:16px;top:5px;width:40px;height:40px;border-radius:50%;background:#5865f2 center/cover no-repeat;color:#fff!important;font-weight:700;font-size:16px;display:flex;align-items:center;justify-content:center;text-decoration:none!important}
.RPT{position:absolute;left:0;width:64px;top:5px;text-align:center;font-size:11px;color:#80848e;visibility:hidden}
.RP:hover .RPT{visibility:visible}
.RPB{min-width:0}
.RPMETA{display:flex;align-items:baseline;gap:8px;line-height:1.35}
.RPN{font-weight:600;color:#060607!important;font-size:15px}
.RPMETA time{font-size:12px;color:#80848e}
.RPX{font-size:15px;line-height:1.4;color:#2e3338;overflow-wrap:anywhere;word-break:break-word}
.RPX.CTEX{padding:0;background:none}
.RPX img{max-width:min(100%,400px);max-height:350px;border-radius:8px}
.RPX .VMSG{margin:3px 0}
.RP .RPX .RPED{font-size:11px!important;color:#80848e;line-height:1}
.RPQ{display:flex;align-items:center;gap:6px;font-size:13px;color:#5c5e66;cursor:pointer;margin:0 0 2px;min-width:0;white-space:nowrap;overflow:hidden}
.RPQ>i{color:#80848e;font-size:11px;transform:scaleX(-1)}
.RPQ b{color:#060607;font-weight:600}
.RPQ span{overflow:hidden;text-overflow:ellipsis}
.RPQ:hover span{color:#060607}
.RPRX{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0 2px}
.RPRC{border:1px solid transparent;background:#f2f3f5;border-radius:8px;padding:1px 7px;font-size:14px;line-height:20px;cursor:pointer}
.RPRC b{font-size:12px;font-weight:600;color:#4e5058;margin-left:2px}
.RPRC.MINE{background:#e7e9fd;border-color:#5865f2}
.RPRC.MINE b{color:#4752c4}
.RPRC[disabled]{cursor:default}
.RPTOOLS{position:absolute;right:14px;top:-14px;display:none;background:#fff;border:1px solid #e3e5e8;border-radius:8px;box-shadow:0 1px 4px rgba(0,0,0,.08);z-index:2}
.RP:hover .RPTOOLS,.RP.RPON .RPTOOLS,.RPTOOLS:focus-within{display:flex}
.RPTOOLS button{border:0;background:none;width:32px;height:30px;color:#4e5058;font-size:14px;border-radius:6px}
.RPTOOLS button:hover{background:#f2f3f5;color:#060607}
.RPTOOLS .RPTD:hover{color:#da373c}
.RPPICK{position:absolute;right:14px;top:18px;display:flex;gap:2px;background:#fff;border:1px solid #e3e5e8;border-radius:10px;padding:4px;box-shadow:0 4px 14px rgba(0,0,0,.14);z-index:4}
.RPPICK button{border:0;background:none;font-size:20px;width:36px;height:36px;border-radius:8px}
.RPPICK button:hover{background:#f2f3f5}

/* composer */
.RMCOMP{flex:0 0 auto;padding:0 16px 14px}
.RMBAR{display:flex;align-items:center;gap:8px;background:#f2f3f5;border-radius:8px 8px 0 0;padding:6px 10px;font-size:13px;color:#4e5058}
.RMBTX{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.RMBTX b{margin-right:6px;color:#060607}
.RMBX{border:0;background:#c4c9ce;color:#fff;width:20px;height:20px;border-radius:50%;font-size:11px;display:flex;align-items:center;justify-content:center;padding:0}
.RMCROW{display:flex;align-items:flex-end;gap:4px;background:#ebedef;border-radius:8px;padding:4px 6px}
.RMBAR:not([hidden])+.RMCROW{border-radius:0 0 8px 8px}
.RMATT,.RMMIC,.RMSEND,.RMEMO .EMO{width:36px;height:36px;flex:0 0 36px;display:flex;align-items:center;justify-content:center;color:#4e5058;font-size:19px;cursor:pointer;margin:0;border:0;background:none;border-radius:6px}
.RMATT:hover,.RMMIC:hover,.RMEMO .EMO:hover{color:#060607}
.RMSEND{color:#5865f2;font-size:17px}
.RMSEND[disabled]{opacity:.5}
.RMINW{flex:1 1 auto;min-width:0}
.RMIN{min-height:36px;max-height:40vh;overflow-y:auto;padding:7px 4px;font-size:15px;line-height:22px;outline:none;color:#2e3338;overflow-wrap:anywhere}
.RMIN:empty:before{content:attr(data-ph);color:#80848e;pointer-events:none}
.RMIN.CHUP{opacity:.6}
.RMIN .FIL{display:inline-block;vertical-align:middle}
.RMEMO{position:relative}
.RMEMO .EMO{font-size:20px;filter:grayscale(1)}
.RMEMO .EMO:hover{filter:none}
.RMEMO .SMCONT{position:absolute;left:auto!important;right:-40px;bottom:calc(100% + 8px);top:auto!important;margin:0!important;width:280px;height:240px;border-radius:10px;box-shadow:0 4px 18px rgba(0,0,0,.2);z-index:20}
.RMCOMP .VREC{flex:1 1 auto}
.RMGUEST{flex:0 0 auto;margin:0 16px 14px;padding:12px 14px;background:#f2f3f5;border-radius:8px;color:#4e5058;font-size:14px;text-align:center}
.RMGUEST a{color:#5865f2;font-weight:600}
.RMDROP .RMFEEDW:after{content:"Drop files to attach";position:absolute;inset:8px;border:2px dashed #5865f2;border-radius:12px;background:rgba(88,101,242,.08);display:flex;align-items:center;justify-content:center;color:#4752c4;font-weight:700;z-index:5}

/* presence (task 3): who is here on cards, "Here now" panel, moved-to-another-room banner */
.RMHERE{display:flex;align-items:center;gap:6px;flex-wrap:wrap;color:#4e5058;font-weight:400;margin-top:6px}
.RMHERE[hidden]{display:none}
.RHFACES{display:inline-flex;padding-left:6px}
.RHAV{width:22px;height:22px;border-radius:50%;background:#5865f2 center/cover no-repeat;color:#fff;font-size:10px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.RHFACES .RHAV{margin-left:-6px;border:2px solid #fff;box-sizing:content-box}
.RHTX{flex:1 1 120px;min-width:0;font-size:12px;line-height:1.3}
.RHTX b{color:#060607;font-weight:600}
.RHTYP{color:#5865f2;font-style:italic}
.RMJOIN{background:#23a55a;color:#fff;font-weight:700;font-size:12px;border-radius:6px;padding:3px 10px}
.RMCARD:hover .RMJOIN{background:#1a8a4a}
.RMACTIVE .RMCARD{border-color:#b5e3c7;background:#f4fbf7}
.RMLIVE{display:inline-block;width:8px;height:8px;border-radius:50%;background:#23a55a;margin-right:6px;vertical-align:1px;animation:rmpulse 1.6s infinite}
@keyframes rmpulse{0%{box-shadow:0 0 0 0 rgba(35,165,90,.6)}70%{box-shadow:0 0 0 6px rgba(35,165,90,0)}100%{box-shadow:0 0 0 0 rgba(35,165,90,0)}}
@media (prefers-reduced-motion:reduce){.RMLIVE{animation:none}}

.RMBODY{flex:1 1 auto;min-height:0;display:flex}
.RMMAIN{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;position:relative}
.RMSIDE{flex:0 0 220px;border-left:1px solid #e3e5e8;background:#f7f8f9;overflow-y:auto;padding:12px 8px}
.RHHEAD{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:#5c5e66;padding:0 8px 8px}
.RHP{display:flex;align-items:center;gap:10px;padding:5px 8px;border-radius:6px;color:#2e3338!important;text-decoration:none!important}
.RHP:hover{background:#e9ebee}
.RHP .RHAV{width:32px;height:32px;font-size:13px;position:relative}
.RHP .RHAV.RHON:after{content:"";position:absolute;right:-2px;bottom:-2px;width:12px;height:12px;border-radius:50%;background:#23a55a;border:2px solid #f7f8f9}
.RHAWAY{opacity:.5}
.RHPT{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.RHPN{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.RHPN small{color:#80848e;font-weight:400}
.RHPS{font-size:12px;color:#80848e}
.RHG{font-size:13px;color:#5c5e66;padding:8px}
.RHEMPTY{font-size:13px;color:#80848e;padding:4px 8px}
.RMHEREB{display:none;margin-left:auto;border:0;background:#f2f3f5;border-radius:16px;padding:6px 10px;font-weight:600;color:#4e5058;font-size:13px;white-space:nowrap}
.RMMOVED{display:flex;align-items:center;gap:12px;margin:8px 16px 0;padding:10px 12px;border-radius:10px;background:#fff4e0;border:1px solid #f5d39a;color:#4e5058;font-size:13px}
.RMMOVED[hidden]{display:none}
.RMMOVED>i{font-size:20px;color:#c27c0e}
.RMMOVED>div{flex:1;min-width:0;display:flex;flex-direction:column}
.RMMOVED b{color:#060607}
.RMMOVED a{color:#5865f2;font-weight:600}
@media (max-width:991.98px){ .RMSIDE{flex-basis:180px} }

@media (max-width:767.98px){
	.RMPAGE{padding:12px 12px 90px}
	.RMHEAD{flex-direction:column;gap:10px}
	.RMHEAD .RMBTN{align-self:stretch;justify-content:center}
	.RMSEARCH{max-width:none}
	.RMGRID{grid-template-columns:1fr}
	.RMPAGE.RMINROOM{padding:0;height:calc(100vh - 101px);height:calc(100dvh - 101px)}
	.RMINROOM .RMROOMH{padding:8px 10px}
	.RMINROOM .RMROOMH .RMDSF,.RMINROOM .RMROOMH .RMMT{display:none}
	.RP{padding:2px 12px 2px 60px}
	.RPAV{left:10px;width:38px;height:38px}
	.RPT{width:56px}
	.RPTOOLS{right:8px}
	.RMCOMP{padding:0 8px 8px}
	.RMGUEST{margin:0 8px 8px}
	.RMHEREB{display:inline-flex;align-items:center;gap:5px}
	.RMSIDE{display:none;position:absolute;right:8px;top:56px;width:260px;max-height:60%;z-index:30;border:1px solid #e3e5e8;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.18)}
	.RMSIDEON .RMSIDE{display:block}
	.RMMOVED{margin:6px 8px 0;flex-wrap:wrap}
	.RMMOVED .RMBTN{width:100%;justify-content:center}
}
