/* SpectraHub V50: profile media editor, AI assistant, mobile menu, editor image sizing */
body.spectrahubForum{overflow-x:hidden}

/* Profile picture/banner editing lives on the public profile */
.xfMemberCover.is-editable,.xfMemberAvatar.is-editable{cursor:pointer}
.xfMemberCover.is-editable:focus-visible,.xfMemberAvatar.is-editable:focus-visible{outline:2px solid #39a8ff;outline-offset:2px}
.xfMemberCover>img,.xfMemberAvatar>img{will-change:transform;transition:transform .18s ease}
.shProfileMediaEdit{position:absolute;z-index:5;display:inline-flex;align-items:center;justify-content:center;background:rgba(16,24,32,.86);border:1px solid rgba(255,255,255,.22);color:#fff;font-weight:800;box-shadow:0 7px 22px rgba(0,0,0,.28);pointer-events:none}
.shProfileBannerEdit{right:14px;bottom:12px;padding:8px 11px;border-radius:8px;font-size:14px}
.shProfileAvatarEdit{right:5px;bottom:5px;width:30px;height:30px;border-radius:50%;font-size:15px}
.shMediaEditorModal[hidden]{display:none!important}.shMediaEditorModal{position:fixed;inset:0;z-index:2500;background:rgba(6,10,15,.76);display:grid;place-items:center;padding:18px;backdrop-filter:blur(5px)}
body.shMediaModalOpen{overflow:hidden}
.shMediaEditorDialog{width:min(660px,100%);max-height:min(820px,92dvh);overflow:auto;background:#343a41;border:1px solid #58616b;border-radius:12px;color:#edf2f6;box-shadow:0 28px 90px rgba(0,0,0,.52)}
.shMediaEditorHead{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 18px;background:#252a30;border-bottom:1px solid #505860}.shMediaEditorHead strong{font-size:17px}.shMediaEditorHead button{width:36px;height:36px;border:1px solid #5e6872;background:#343b43;color:#fff;border-radius:8px;font-size:22px;cursor:pointer}
.shMediaEditorBody{padding:18px}.shMediaEditorPreview{position:relative;overflow:hidden;margin:0 auto 15px;background:#1b2026;border:1px solid #57616b;touch-action:none;cursor:grab;user-select:none}.shMediaEditorPreview:active{cursor:grabbing}.shMediaEditorPreview.is-avatar{width:min(340px,78vw);aspect-ratio:1;border-radius:50%}.shMediaEditorPreview.is-banner{width:100%;aspect-ratio:4/1;border-radius:8px}.shMediaEditorPreview img{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none;user-select:none}
.shMediaEditorHelp{margin:0 0 14px;color:#b9c2cb;line-height:1.55;font-size:14px}.shMediaFileButton{display:inline-flex!important;align-items:center;justify-content:center;min-height:40px;margin:0 0 14px!important;padding:0 14px;border-radius:8px;background:#2196f3;color:#fff!important;font-weight:800;cursor:pointer}.shMediaZoomLabel{display:grid!important;grid-template-columns:auto 1fr;align-items:center;gap:14px;margin:0!important;color:#d9e1e7}.shMediaZoom{margin:0!important;padding:0!important}.shMediaEditorMsg{min-height:22px;margin-top:10px;color:#9fd4ff;font-size:14px}.shMediaEditorFoot{display:flex;align-items:center;gap:9px;padding:14px 18px;border-top:1px solid #505860;background:#2c3238}.shMediaSpacer{flex:1}.shMediaDelete{color:#ffb2bc!important;border-color:#7a4650!important}

/* Selected editor images use preset toolbar sizing, not width/height prompts. */
/* Froala drag-resize handles are intentionally hidden: size is selected from the editor menu just like text size. */
.fr-image-resizer,.fr-image-resizer.fr-active{display:none!important}
.shXfSelectedImage{outline:2px solid #2196f3!important;outline-offset:3px!important}
.bb-img{height:auto;max-width:100%}
.bbcode-code,.bb-inline-code{unicode-bidi:plaintext}

/* Fixed SpectraHub site assistant */
.shAiChat{position:fixed;right:22px;bottom:22px;z-index:1800;font-family:inherit}.shAiToggle{width:54px;height:54px;border:1px solid #5c6873;border-radius:16px;background:#343a41;color:#fff;display:grid;place-items:center;cursor:pointer;box-shadow:0 16px 42px rgba(0,0,0,.38)}.shAiToggle img{width:22px;height:22px;filter:brightness(0) invert(1)}
.shAiPanel{position:absolute;right:0;bottom:66px;width:min(390px,calc(100vw - 24px));height:min(590px,calc(100dvh - 120px));background:#343a41;border:1px solid #59626c;border-radius:12px;overflow:hidden;box-shadow:0 25px 80px rgba(0,0,0,.52);display:grid;grid-template-rows:auto 1fr auto}.shAiPanel[hidden]{display:none!important}.shAiHead{display:flex;align-items:center;gap:10px;padding:13px 14px;background:#24292f;border-bottom:1px solid #505961}.shAiHeadLogo{width:34px;height:34px;border-radius:8px;background:#15243b;padding:7px}.shAiHeadText{min-width:0;flex:1}.shAiHeadText strong{display:block;color:#fff;font-size:14px}.shAiHeadText span{display:block;color:#aeb8c1;font-size:14px;margin-top:2px}.shAiClose{width:32px;height:32px;border:1px solid #58636d;border-radius:7px;background:#343b42;color:#fff;cursor:pointer;font-size:18px}
.shAiMessages{overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px}.shAiMsg{display:flex}.shAiMsg.is-user{justify-content:flex-end}.shAiBubble{max-width:88%;padding:10px 12px;border-radius:10px;background:#414851;border:1px solid #59636d;color:#eef2f5;font-size:14px;line-height:1.5;overflow-wrap:anywhere}.shAiMsg.is-user .shAiBubble{background:#1e6fae;border-color:#3186c6;color:#fff}.shAiBubble a{color:#78c7ff;font-weight:700}.shAiChoices{display:flex;gap:7px;flex-wrap:wrap;margin-top:7px}.shAiChoices button,.shAiSupportActions button{border:1px solid #5c6975;background:#303840;color:#fff;border-radius:7px;padding:8px 10px;cursor:pointer}.shAiChoices button[data-yes],.shAiSupportActions button[type=submit]{background:#2196f3;border-color:#2196f3}
.shAiForm{display:grid;grid-template-columns:1fr auto;gap:8px;padding:11px;border-top:1px solid #505961;background:#2c3238}.shAiInput{margin:0!important;min-width:0!important;height:42px!important;padding:0 11px!important;border-radius:8px!important}.shAiSend{min-width:70px;border:0;border-radius:8px;background:#2196f3;color:#fff;font-weight:800;cursor:pointer}.shAiSend:disabled{opacity:.55}
.shAiSupportForm{margin:2px 0 8px;padding:12px;background:#292f35;border:1px solid #58616a;border-radius:10px;color:#fff}.shAiSupportForm>strong{display:block;margin-bottom:8px}.shAiSupportForm label{font-size:14px;margin:8px 0 4px!important}.shAiSupportForm input,.shAiSupportForm textarea{margin:0!important;background:#1e242a!important;border-color:#515c66!important;padding:9px!important}.shAiSupportForm textarea{min-height:88px!important}.shAiSupportActions{display:flex;justify-content:flex-end;gap:7px;margin-top:9px}.shAiSupportForm small{display:block;color:#ffb5bd;margin-top:7px}

/* Mobile navigation: full-height, touch-friendly, no horizontal overflow. */
@media(max-width:1100px){body.shMenuOpen{overflow:hidden!important}.shHeaderDrawer{top:0!important;right:0!important;bottom:0!important;left:auto!important;width:min(380px,100vw)!important;max-width:100vw!important;height:100dvh!important;padding:14px!important;border-radius:0!important;overflow-y:auto!important;overscroll-behavior:contain}.shHeaderDrawerHead{position:sticky;top:-14px;z-index:2;background:#10203d;padding:14px 0 10px;margin:0 0 10px!important}.shHeaderDrawerNav{display:grid!important;grid-template-columns:1fr!important;gap:5px!important}.shHeaderDrawerNav a{width:100%!important;min-height:48px!important;padding:0 13px!important;white-space:normal!important}.shHeaderDrawerLang{position:sticky;bottom:-14px;background:#10203d;padding:14px 8px!important}.shHeaderDrawerSearch{position:relative!important}.shHeaderOverlay{z-index:1190!important}.shHeaderDrawer{z-index:1200!important}}
@media(max-width:600px){.shAiChat{right:12px;bottom:12px}.shAiPanel{position:fixed;inset:10px 10px 76px;width:auto;height:auto;max-height:none;border-radius:10px}.shAiToggle{width:50px;height:50px}.shMediaEditorModal{padding:8px}.shMediaEditorDialog{max-height:96dvh}.shMediaEditorFoot{flex-wrap:wrap}.shMediaDelete{order:2}.shMediaSpacer{display:none}.shMediaEditorFoot .btn{flex:1 1 120px}.shProfileBannerEdit{right:8px;bottom:8px}}

/* V50 mobile navigation final pass: same neutral SpectraHub UI as the desktop forum. */
@media(max-width:1100px){
  .shHeaderOverlay{background:rgba(10,12,15,.68)!important;backdrop-filter:blur(2px)}
  .shHeaderDrawer{
    background:#2d3238!important;
    border-left:1px solid #505861!important;
    box-shadow:-20px 0 60px rgba(0,0,0,.45)!important;
    padding:max(14px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom))!important;
  }
  .shHeaderDrawerHead{
    top:calc(-1 * max(14px,env(safe-area-inset-top)))!important;
    background:#252a30!important;
    margin:-14px -14px 12px!important;
    padding:16px 16px 12px!important;
    border-bottom:1px solid #4b535c!important;
  }
  .shHeaderDrawerHead button{background:#343b42!important;border-color:#59636d!important}
  .shHeaderDrawerSearch{background:#252b31!important;border-color:#505a64!important;border-radius:9px!important;margin-bottom:12px!important}
  .shHeaderDrawerSearch input{color:#fff!important}.shHeaderDrawerSearch button{background:#2196f3!important}
  .shHeaderDrawerNav{gap:6px!important}
  .shHeaderDrawerNav a{background:transparent!important;border:1px solid transparent!important;border-radius:8px!important;color:#edf2f6!important}
  .shHeaderDrawerNav a:hover,.shHeaderDrawerNav a.is-active{background:#3b424a!important;border-color:#515b65!important}
  .shHeaderDrawerLang{
    bottom:calc(-1 * max(14px,env(safe-area-inset-bottom)))!important;
    background:#252a30!important;
    margin:14px -14px -14px!important;
    padding:14px 16px!important;
    border-top:1px solid #4b535c!important;
  }
  .shHeaderDrawerLang .dmLangBtn{background:#343b42!important;color:#e8eef3!important;border:1px solid #56616c!important}
  .shHeaderDrawerLang .dmLangBtn.active{background:#2196f3!important;border-color:#2196f3!important;color:#fff!important}
}
@media(max-width:520px){
  .shHeaderDrawer{width:100vw!important}
  .spectrahubForum .shHeaderTop.wrap{grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important}
  .shHeaderBrand{min-width:0!important}.shHeaderBrand span{min-width:0!important}.shHeaderBrand strong{white-space:nowrap!important}
  .shHeaderUser{grid-column:2!important;gap:6px!important}.shHeaderQuick{display:none!important}
  .shHeaderProfile{width:38px!important;height:38px!important}.shHeaderMenuButton{width:38px!important;height:38px!important;flex-basis:38px!important}
}

/* V59 AI support wizard: decision and fields replace the normal composer. */
.shAiForm.is-special{display:block!important;padding:11px!important;}
.shAiForm.is-special>.shAiInput,.shAiForm.is-special>.shAiSend{display:none!important;}
.shAiComposerSpecial{width:100%;display:grid;gap:8px;box-sizing:border-box;}
.shAiDecision{grid-template-columns:1fr 1fr;}
.shAiDecision button,.shAiWizardActions button{min-height:42px;border:1px solid #5d6872;border-radius:8px;background:#343b42;color:#fff;font:inherit;font-weight:800;cursor:pointer;}
.shAiDecision .shAiDecisionYes,.shAiWizardNext{background:#2196f3!important;border-color:#2196f3!important;}
.shAiDecision .shAiDecisionNo,.shAiWizardCancel{background:#343b42!important;}
.shAiWizardInput{display:block;width:100%!important;min-width:0!important;box-sizing:border-box!important;margin:0!important;padding:10px 11px!important;border:1px solid #5a646e!important;border-radius:8px!important;background:#20262c!important;color:#fff!important;font:inherit!important;}
textarea.shAiWizardInput{min-height:92px!important;max-height:190px!important;resize:vertical!important;line-height:1.45!important;}
.shAiWizardActions{display:grid;grid-template-columns:auto 1fr;gap:8px;}
.shAiWizardError{display:block;min-height:16px;color:#ffb5bd;font-size:14px;}
@media(max-width:520px){.shAiDecision{grid-template-columns:1fr 1fr}.shAiWizardActions{grid-template-columns:1fr 1fr}}
