
body.mg-ui-refined .container.sg-offcanvas{margin-inline:auto!important;max-width:1240px!important}
body.mg-ui-refined .container.sg-offcanvas:has(.profile-header){max-width:1120px!important}
@media(min-width:768px){body.mg-ui-refined .container.sg-offcanvas>.row:has(>.sg-offcanvas-sidebar.d-md-none)>.sg-offcanvas-mainbar{flex:0 0 100%!important;max-width:100%!important;width:100%!important}}
body.mg-ui-refined .page-header.mini{background:#fff!important;background-image:none!important;color:#1c1e21!important;border:1px solid #e4e6eb!important;border-radius:12px!important;box-shadow:none!important;padding:20px!important;text-align:left!important;min-height:0!important}
body.mg-ui-refined .page-header.mini h1,body.mg-ui-refined .page-header.mini h2{color:#1c1e21!important;font-size:26px!important;margin-bottom:6px!important}
body.mg-ui-refined .page-header.mini p{color:#65676b!important;font-size:14px!important}.page-header.mini .circle-1,.page-header.mini .circle-2{display:none!important}
@media(max-width:767px){
body.mg-ui-refined .main-wrapper{padding-top:62px!important;padding-bottom:calc(66px + env(safe-area-inset-bottom,0px))!important}
body.mg-ui-refined .container.sg-offcanvas{width:100%!important;padding-inline:10px!important;max-width:100%!important;margin-inline:0!important}
body.mg-ui-refined .container.sg-offcanvas>.row>.sg-offcanvas-mainbar,body.mg-ui-refined .container.sg-offcanvas>.row>.sg-offcanvas-main{max-width:100%!important;flex:0 0 100%!important}
body.mg-ui-refined .mg-main-navigation{position:fixed!important;top:auto!important;bottom:0!important;left:0!important;right:0!important;height:calc(58px + env(safe-area-inset-bottom,0px))!important;padding:0 4px env(safe-area-inset-bottom,0px)!important;z-index:1230!important;border-top:1px solid #ddd;border-bottom:0;background:#fff;gap:0!important}
body.mg-ui-refined .mg-main-navigation>a{flex:1!important;max-width:none!important;min-width:0!important;width:auto!important;border-top:3px solid transparent;border-bottom:0!important;border-radius:0!important}
body.mg-ui-refined .mg-main-navigation>a.active{border-top-color:#0866ff!important}
body.mg-ui-refined .mg-market-tools{top:54px!important}
body.mg-ui-refined.mg-reels-shell{--mg-reel-header:54px!important;--mg-reel-panel:0px!important;--mg-reel-nav:0px!important}
body.mg-ui-refined.mg-reels-shell .mg-rg-topbar{height:54px!important;background:#000!important;color:#fff!important}
body.mg-ui-refined.mg-reels-shell .mg-rg-brand{color:#fff!important;font-size:22px!important}
body.mg-ui-refined.mg-reels-shell .mg-rg-reels-nav{top:54px!important;left:0!important;width:100%!important;height:36px!important;background:#000!important;padding:0!important}
body.mg-ui-refined.mg-reels-shell .reels-wrapper{position:fixed!important;top:90px!important;bottom:calc(58px + env(safe-area-inset-bottom,0px))!important;height:auto!important;padding:0!important;width:100%!important;overflow:hidden!important}
body.mg-ui-refined.mg-reels-shell .reels-wrapper .reel-container{height:100%!important;max-height:100%!important;touch-action:pan-x!important}
body.mg-ui-refined.mg-reels-shell .reel-video-wrapper{height:100%!important;width:100%!important;touch-action:pan-x!important}
body.mg-ui-refined.mg-reels-shell .reel-video-wrapper video{height:100%!important;width:100%!important;object-fit:contain!important;touch-action:pan-x!important}
body.mg-ui-refined.mg-reels-shell .video-controlls{bottom:26px!important;right:12px!important}
body.mg-ui-refined.mg-reels-shell .video-caption{bottom:24px!important;width:calc(100% - 86px)!important}
body.mg-ui-refined.mg-reels-shell .mg-main-navigation{background:#242526!important;border-color:#333!important}
body.mg-ui-refined.mg-reels-shell .mg-main-navigation svg{filter:grayscale(1) brightness(0) invert(1)}
body.mg-ui-refined.mg-reels-shell .reel-comments-wrapper{bottom:calc(58px + env(safe-area-inset-bottom,0px))!important;top:auto!important;height:min(66dvh,650px)!important;max-height:calc(100dvh - 158px)!important;z-index:1220!important}
}

/* Composer: bounded dialog, reachable actions and optional advanced settings. */
.modal:has(#publisher-box) .modal-dialog{max-width:640px!important;margin:20px auto!important}
.modal:has(#publisher-box) .modal-content{max-height:calc(100dvh - 40px);display:flex;flex-direction:column}
.modal:has(#publisher-box) .modal-header{flex-shrink:0}
.modal:has(#publisher-box) .modal-body{overflow-y:auto!important;overscroll-behavior:contain;min-height:0}
.modal #publisher-box .publisher-message{padding:16px!important}
.modal #publisher-box .publisher-message .ql-editor{min-height:100px!important;max-height:180px!important}
.modal #publisher-box .publisher-tools-tabs{padding:8px 12px!important}
.modal #publisher-box .mg-composer-advanced{display:flex;align-items:center;justify-content:space-between;width:calc(100% - 32px);margin:8px 16px;padding:12px 14px;border:1px solid #e4e6eb;border-radius:10px;background:#f7f8fa;color:#454950;font-weight:600;text-align:start}
.modal #publisher-box .mg-composer-advanced::after{content:'+';font-size:20px}
.modal #publisher-box .mg-composer-advanced[aria-expanded=true]::after{content:'−'}
.modal #publisher-box .publisher-footer.mg-advanced-collapsed{display:none!important}
.modal #publisher-box .publisher-footer-buttons{position:sticky;bottom:0;z-index:4;background:var(--bs-body-bg,#fff);display:flex!important;gap:10px;padding:12px 16px!important;border-top:1px solid #e4e6eb}
.modal #publisher-box .publisher-footer-buttons>.mg-preview{width:auto!important;flex:0 1 38%;margin:0!important}
.modal #publisher-box .publisher-footer-buttons>.d-grid{flex:1;min-width:0}
.modal #publisher-box .publisher-footer-buttons .btn{min-height:42px;border-radius:8px}
@media(max-width:767px){.modal:has(#publisher-box) .modal-dialog{margin:8px!important;max-width:none!important}.modal:has(#publisher-box) .modal-content{max-height:calc(100dvh - 16px)}.modal #publisher-box .publisher-message{padding:12px!important}.modal #publisher-box .publisher-footer-buttons{padding-bottom:max(12px,env(safe-area-inset-bottom))!important}}

body .modal #publisher-box.publisher .publisher-footer-buttons{display:flex!important;align-items:stretch;gap:10px}
body .modal #publisher-box.publisher .publisher-footer-buttons>.mg-preview{flex:0 1 38%;width:auto!important;margin:0!important}
body .modal #publisher-box.publisher .publisher-footer-buttons>.d-grid{flex:1;min-width:0}
body.mg-ui-refined .mg-market-tools{justify-content:center;max-width:1280px;margin-left:auto!important;margin-right:auto!important;gap:8px}
body.mg-ui-refined .mg-market-tools>a,body.mg-ui-refined .mg-market-tools>button{min-height:42px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}
@media(max-width:767px){body.mg-ui-refined .mg-market-tools{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding:8px 12px;scrollbar-width:thin}body.mg-ui-refined .mg-market-tools>a,body.mg-ui-refined .mg-market-tools>button{flex-shrink:0}}

#publisher-wapper-modal #publisher-box.publisher .publisher-footer-buttons{display:flex!important;align-items:stretch;gap:10px}
#publisher-wapper-modal #publisher-box.publisher .publisher-footer-buttons>.mg-preview{flex:0 1 36%;width:auto!important;margin:0!important}
#publisher-wapper-modal #publisher-box.publisher .publisher-footer-buttons>.d-grid{flex:1;min-width:0}
