/* SpectraHub V56 - editor popups, quote/code/spoiler refresh */

/* Froala dropdowns: never start underneath the toolbar and never grow across the form. */
body.spectrahubForum .shXfEditorShell .fr-popup,
body.spectrahubAdmin .shXfEditorShell .fr-popup,
body.spectrahubForum .shXfEditorShell .fr-dropdown-menu,
body.spectrahubAdmin .shXfEditorShell .fr-dropdown-menu{
  z-index:12000!important;
  margin-top:9px!important;
  max-height:min(300px,42vh)!important;
  overflow:hidden!important;
  border-radius:8px!important;
  box-shadow:0 16px 38px rgba(0,0,0,.42)!important;
}
body.spectrahubForum .shXfEditorShell .fr-dropdown-list,
body.spectrahubAdmin .shXfEditorShell .fr-dropdown-list{
  max-height:min(250px,36vh)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-width:thin;
}
body.spectrahubForum .shXfEditorShell .shXfFontMenu,
body.spectrahubAdmin .shXfEditorShell .shXfFontMenu{
  width:260px!important;
  min-width:260px!important;
  max-height:min(250px,36vh)!important;
}
body.spectrahubForum .shXfEditorShell .shXfSizeMenu,
body.spectrahubAdmin .shXfEditorShell .shXfSizeMenu{
  width:290px!important;
  min-width:290px!important;
  max-height:min(250px,36vh)!important;
}
.shXfEditorShell .shXfFallbackMenu{
  max-height:min(245px,36vh)!important;
  overscroll-behavior:contain!important;
}
.shXfEditorShell .shXfAllBbMenu>.shXfFallbackMenu{max-height:min(270px,40vh)!important}

/* Editor quote: a current SpectraHub card, not the old left-border-only quote. */
body.spectrahubForum .shXfEditorShell .fr-element blockquote.shQuoteBlock,
body.spectrahubAdmin .shXfEditorShell .fr-element blockquote.shQuoteBlock,
.shXfEditorShell>.shXfVisualHost blockquote.shQuoteBlock{
  position:relative!important;
  margin:14px 0!important;
  padding:38px 16px 14px!important;
  border:1px solid #56616b!important;
  border-left:1px solid #56616b!important;
  border-radius:10px!important;
  background:linear-gradient(180deg,#343b42,#2c3238)!important;
  color:#eef2f5!important;
  box-shadow:inset 3px 0 0 #42a5f5!important;
}
body.spectrahubForum .shXfEditorShell .fr-element blockquote.shQuoteBlock::before,
body.spectrahubAdmin .shXfEditorShell .fr-element blockquote.shQuoteBlock::before,
.shXfEditorShell>.shXfVisualHost blockquote.shQuoteBlock::before{
  content:'❝  Idézet';position:absolute;left:14px;top:10px;color:#8cc9f5;font-size:14px;font-weight:800;letter-spacing:.03em;
}
.shXfEditorShell blockquote.shQuoteBlock cite{display:block!important;margin:0 0 8px!important;color:#a9cce8!important;font-style:normal!important;font-size:14px!important;font-weight:700!important}

/* CODE is a block. ICODE is genuinely inline and always shows raw code text. */
.shXfEditorShell .fr-element pre.shCodeBlock,
.shXfEditorShell>.shXfVisualHost pre.shCodeBlock{
  position:relative!important;margin:14px 0!important;padding:34px 14px 14px!important;border:1px solid #4e5963!important;border-radius:9px!important;background:#11171d!important;color:#e8edf1!important;
}
.shXfEditorShell .fr-element pre.shCodeBlock::before,
.shXfEditorShell>.shXfVisualHost pre.shCodeBlock::before{
  content:'KÓD';position:absolute;left:12px;top:8px;color:#7fb9e8;font:800 14px/1.2 system-ui,sans-serif;letter-spacing:.12em;
}
.shXfEditorShell .fr-element code.shInlineCode,
.shXfEditorShell>.shXfVisualHost code.shInlineCode{
  display:inline!important;width:auto!important;max-width:100%!important;min-width:0!important;margin:0 2px!important;padding:2px 6px!important;border:1px solid #4d5963!important;border-radius:5px!important;background:#171d23!important;color:#dce8f2!important;font:0.94em/1.45 ui-monospace,SFMono-Regular,Consolas,monospace!important;white-space:pre-wrap!important;
}

/* ISPOILER: one compact masked inline element. Click to reveal, click again to hide. */
.shXfEditorShell .shInlineSpoiler,
.bb-inline-spoiler{
  display:inline!important;width:auto!important;max-width:100%!important;min-width:0!important;padding:2px 7px!important;border:1px solid #515b65!important;border-radius:5px!important;background:#11161b!important;cursor:pointer!important;box-decoration-break:clone;-webkit-box-decoration-break:clone;
}
.shXfEditorShell .shInlineSpoiler:not(.is-revealed),
.shXfEditorShell .shInlineSpoiler:not(.is-revealed) *,
.bb-inline-spoiler:not(.is-revealed),
.bb-inline-spoiler:not(.is-revealed) *{
  color:transparent!important;text-shadow:none!important;text-decoration-color:transparent!important;
}
.shXfEditorShell .shInlineSpoiler:not(.is-revealed){background:#0d1115!important;box-shadow:inset 0 0 0 999px #0d1115!important}
.bb-inline-spoiler:not(.is-revealed){background:#0d1115!important;box-shadow:inset 0 0 0 999px #0d1115!important}
.shXfEditorShell .shInlineSpoiler.is-revealed,
.bb-inline-spoiler.is-revealed{background:#2b3238!important;color:inherit!important;box-shadow:none!important}
.bb-inline-spoiler:focus-visible{outline:2px solid #42a5f5!important;outline-offset:2px!important}

/* Public quote - new SpectraHub style. */
.shBbQuote{
  margin:16px 0!important;border:1px solid #46525d!important;border-radius:10px!important;background:linear-gradient(180deg,#30363c,#282e34)!important;overflow:hidden!important;box-shadow:inset 3px 0 0 #42a5f5!important;color:#eaf0f4!important;
}
.shBbQuoteHead{display:flex!important;align-items:center!important;gap:8px!important;min-height:38px!important;padding:9px 13px!important;border-bottom:1px solid #46515b!important;background:#343b42!important;color:#eef4f8!important;font-size:14px!important}
.shBbQuoteMark{color:#62b4ef!important;font-size:19px!important;line-height:1!important}.shBbQuoteHead strong{font-size:14px!important}.shBbQuoteAuthor{margin-left:auto!important;color:#9fb3c3!important;font-size:14px!important}
.shBbQuoteBody{padding:13px 15px!important;line-height:1.65!important;color:#e5eaee!important}

/* Public code blocks. */
.shBbCodeBox{margin:14px 0!important;border:1px solid #414c56!important;border-radius:9px!important;background:#10151a!important;overflow:hidden!important}
.shBbCodeHead{padding:8px 12px!important;border-bottom:1px solid #414c56!important;background:#252c32!important;color:#8cc9f5!important;font-size:14px!important;font-weight:900!important;letter-spacing:.11em!important;text-transform:uppercase!important}
.shBbCodeBox .bbcode-code{margin:0!important;border:0!important;border-radius:0!important;background:#11171d!important;color:#e7edf2!important;padding:14px!important;white-space:pre!important;overflow:auto!important;font:14px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace!important}
.bb-inline-code{
  display:inline!important;width:auto!important;max-width:100%!important;min-width:0!important;margin:0 2px!important;padding:2px 6px!important;border:1px solid #4c5862!important;border-radius:5px!important;background:#171d23!important;color:#dbe8f2!important;font:0.94em/1.45 ui-monospace,SFMono-Regular,Consolas,monospace!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;
}

/* Old [SPOILER] stays readable for backwards compatibility, but it is no longer offered by the editor. */
details.spoiler{margin:12px 0!important;border:1px solid #48535d!important;border-radius:8px!important;background:#2a3036!important;overflow:hidden!important;padding:0!important}
details.spoiler>summary{cursor:pointer!important;padding:10px 12px!important;background:#333a41!important;color:#e9eef2!important;font-weight:800!important;list-style:none!important}details.spoiler>summary::-webkit-details-marker{display:none!important}details.spoiler>summary::before{content:'▸';display:inline-block;margin-right:7px;color:#74bced!important;transition:transform .15s ease}details.spoiler[open]>summary::before{transform:rotate(90deg)}details.spoiler[open]{padding-bottom:12px!important}details.spoiler[open]>:not(summary){margin-left:12px!important;margin-right:12px!important}

@media(max-width:700px){
  body.spectrahubForum .shXfEditorShell .fr-popup,body.spectrahubAdmin .shXfEditorShell .fr-popup{max-width:calc(100vw - 24px)!important;max-height:42vh!important}
  body.spectrahubForum .shXfEditorShell .shXfFontMenu,body.spectrahubAdmin .shXfEditorShell .shXfFontMenu,body.spectrahubForum .shXfEditorShell .shXfSizeMenu,body.spectrahubAdmin .shXfEditorShell .shXfSizeMenu{width:min(290px,calc(100vw - 36px))!important;min-width:0!important;max-width:calc(100vw - 36px)!important}
  .shBbQuoteAuthor{margin-left:0!important;width:100%!important}.shBbQuoteHead{flex-wrap:wrap!important}
}

/* Froala may append dropdown popups outside the editor shell. Keep the menu fix global as well. */
body.spectrahubForum .fr-popup,
body.spectrahubAdmin .fr-popup,
body.spectrahubForum .fr-dropdown-menu,
body.spectrahubAdmin .fr-dropdown-menu{margin-top:9px!important;z-index:12000!important}
body.spectrahubForum .shXfFontMenu,
body.spectrahubAdmin .shXfFontMenu,
body.spectrahubForum .shXfSizeMenu,
body.spectrahubAdmin .shXfSizeMenu{max-height:min(250px,36vh)!important;overflow-y:auto!important;overscroll-behavior:contain!important}
.shXfEditorShell .fr-element code,
.shXfEditorShell>.shXfVisualHost code{display:inline!important;width:auto!important;max-width:100%!important;min-width:0!important;padding:2px 6px!important;border:1px solid #4d5963!important;border-radius:5px!important;background:#171d23!important;color:#dce8f2!important;font:0.94em/1.45 ui-monospace,SFMono-Regular,Consolas,monospace!important;white-space:pre-wrap!important}
.shXfEditorShell .fr-element pre code,
.shXfEditorShell>.shXfVisualHost pre code{padding:0!important;border:0!important;background:transparent!important;color:inherit!important;border-radius:0!important;font:inherit!important;white-space:pre!important}
