/* 5AA5 native encrypted conversations. Local fonts; no plaintext composer fields. */
[data-faa-crypto][hidden],.faa-key-dialog [hidden],.faa-crypto-composer [hidden]{display:none!important}
.faa-key-list-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 20px;border:1px solid #355d48;border-radius:14px;background:#102b20;margin:0 0 18px;color:#cceedd}
.faa-key-list-heading p{margin:0;max-width:75ch;font-size:15px}.faa-key-list-heading .button{flex-shrink:0}
.faa-key-dialog{box-sizing:border-box;color:#e2f3e9;background:#0c231a;border:1px solid #416f55;border-radius:20px;max-width:600px;width:calc(100% - 32px);max-height:calc(100dvh - 32px);padding:clamp(20px,3vw,32px);box-shadow:0 24px 100px #0009;font:16px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif;overflow:auto;color-scheme:dark}
.faa-key-dialog::backdrop{background:#010d09c7;backdrop-filter:blur(5px)}.faa-key-dialog h2{font:650 clamp(23px,3vw,29px)/1.3 system-ui,sans-serif;letter-spacing:-.5px;color:#c5f7d9;margin:14px 0}.faa-key-dialog p{margin:12px 0;overflow-wrap:anywhere}
.faa-key-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.faa-key-dialog-head button{width:38px;height:38px;display:grid;place-items:center;background:#133625;border:1px solid #446c51;border-radius:10px;color:#cde7d8;cursor:pointer;font:25px/1 system-ui}
.faa-key-field{display:block;margin:14px 0;color:#baddc9;font-size:14px}.faa-key-field input{box-sizing:border-box;margin-top:6px;display:block;width:100%;border:1px solid #416952;background:#06170f;color:#ebfff4;font-size:17px;border-radius:10px;padding:12px;min-height:48px;outline-offset:3px}
.faa-key-field input:focus-visible,.faa-compose-text:focus-visible{outline:2px solid #8ae3b2}.faa-key-check{display:flex;gap:12px;align-items:flex-start;margin:15px 0;font-size:14px}.faa-key-check input{flex-shrink:0;width:18px;height:18px;margin-top:3px;accent-color:#80dbac}
.faa-key-secondary,.faa-key-actions{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin:16px 0}.faa-key-dialog .button,.faa-key-page .button,.faa-crypto-composer .button{cursor:pointer;font:600 14px/1.3 system-ui,sans-serif;min-height:42px;white-space:normal;box-sizing:border-box}
.faa-key-help{color:#a3beae;font-size:13px;line-height:1.65}.faa-key-status:empty{display:none}.faa-key-status{border-radius:10px;padding:12px;background:#173e2b;color:#bcebd2;font-size:14px}.faa-key-status.is-error,#faa-crypto-status.is-error{color:#f3d3ac}
.faa-key-page .block-row{padding:clamp(18px,3vw,30px)}.faa-key-page h2{font-size:25px;color:#c9f3dc}.faa-key-page p{max-width:85ch}.faa-key-archive{border-top:1px solid #355742;padding:18px 0 6px;margin-top:24px;color:#b9cfbf}.faa-key-archive summary{cursor:pointer;font-size:14px}
.faa-crypto-composer{margin:0!important;min-width:0}.faa-crypto-composer>.block-container{border-width:1px 0 0!important;border-radius:0!important;background:#0a241a!important}.faa-crypto-composer .block-row{padding:15px clamp(12px,2vw,24px)}
.faa-compose-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:32px;margin-bottom:10px}.faa-compose-top #faa-crypto-status{font:14px/1.5 system-ui,sans-serif;color:#bce6ce;overflow-wrap:anywhere}.faa-compose-top .button{flex-shrink:0}
/* Error messages are intentionally separate from the periodic E2EE status. */
.faa-crypto-error{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:2px 0 12px;padding:10px 12px;border:1px solid #9c5b56;border-radius:10px;background:#34201c;color:#ffded7;overflow-wrap:anywhere;font:13px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif}
.faa-crypto-error[hidden]{display:none!important}
.faa-crypto-error>span{min-width:0;flex:1 1 auto;white-space:pre-wrap}
.faa-crypto-error>button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:28px;min-height:28px;padding:0;border:1px solid #915e57;border-radius:7px;background:#432722;color:#ffe6df;font:22px/1 system-ui,sans-serif;cursor:pointer}
.faa-crypto-error>button:hover{background:#57332d}.faa-crypto-error>button:focus-visible{outline:2px solid #ffe2d9;outline-offset:2px}
.faa-compose-text{box-sizing:border-box;display:block;width:100%;min-height:95px;max-height:310px;resize:vertical;border:1px solid #38654b!important;background:#081b13!important;color:#ecfbf2!important;font:17px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif!important;padding:13px 15px!important;border-radius:13px!important;caret-color:#bcf8d5;box-shadow:none!important}
.faa-compose-text:disabled{opacity:.7}.faa-compose-text::placeholder{color:#a2bdac}.faa-compose-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:11px}.faa-compose-actions #faa-compose-send{margin-left:auto;min-width:132px}.faa-compose-actions input[type=file]{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
.faa-compose-drafts{display:flex;gap:8px;flex-wrap:wrap;max-height:140px;overflow:auto}.faa-draft-file{font:13px/1.5 system-ui,sans-serif;overflow-wrap:anywhere;border:1px solid #40614c;border-radius:8px;padding:7px 10px;margin-top:10px;background:#173122}
.faa-decrypted-text{white-space:pre-wrap;overflow-wrap:anywhere;tab-size:4;font:inherit;line-height:1.6;min-width:0}.faa-cipher-placeholder{font-size:14px;color:#a7c8b4;max-width:75ch}.faa-legacy-plain{display:block;color:#d8bd89;font-size:11px;line-height:1.6;margin-bottom:6px}.faa-system-message{font-size:13px;line-height:1.6;color:#a6cbb5}
.faa-file-download{display:block;max-width:100%;padding:11px 14px;border:1px solid #487356;border-radius:10px;background:#0c261b;color:#bcf3d6;font:14px/1.5 system-ui,sans-serif;overflow-wrap:anywhere;cursor:pointer;margin:10px 0}
.faa-file-download:hover{background:#214934}.faa-file-download:disabled{opacity:.6;cursor:progress}.faa-read-receipt.is-read{color:#99f4c5!important}
.faa-legacy-secure{padding:12px 20px;color:#99bda7;border-top:1px solid #294a38;background:#0a2016;font-size:13px}.faa-legacy-secure summary{cursor:pointer;list-style-position:outside;margin-left:12px}.faa-legacy-secure p{line-height:1.6;max-width:90ch}.faa-legacy-secure .button{margin:4px 8px 6px 0}.faa-legacy-cipher{padding:14px;border:1px solid #345742;border-radius:11px;background:#102a1d;margin:9px 0;color:#d8eedf}.faa-legacy-cipher small{display:block;margin-bottom:5px;color:#98c8aa}
#faa-safety-code,#faa-safety-peers{white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.8 ui-monospace,Consolas,monospace;color:#c5ecd2}#faa-safety-code{padding:15px;border:1px solid #3b694e;background:#06190f;border-radius:10px}
@media(max-width:650px){.faa-key-dialog{padding:19px;border-radius:16px}.faa-compose-top{align-items:flex-start}.faa-compose-top #faa-crypto-status{font-size:13px}.faa-compose-actions .button{font-size:13px;min-height:42px}.faa-compose-actions #faa-safety{order:4;width:100%;margin:0;text-align:center}.faa-compose-actions #faa-compose-send{min-width:110px}.faa-compose-text{font-size:16px!important}.faa-key-list-heading{padding:13px}.faa-legacy-secure{padding-inline:13px}}
@media(prefers-reduced-motion:reduce){.faa-key-dialog{backdrop-filter:none}}

/* предыдущая версия: locally decrypted raster previews, independent of theme enablement. */
.faa-inline-image{box-sizing:border-box;display:block;width:min(360px,100%);max-width:100%;min-width:0;margin:12px 0 4px;border:1px solid #47745b;border-radius:12px;background:#0b251b;overflow:hidden;color:#cfefdf;}
.faa-image-open{box-sizing:border-box;display:flex;align-items:center;justify-content:center;min-height:110px;max-width:100%;width:100%;padding:0;margin:0;border:0;background:#0b1d16;color:#baddca;cursor:zoom-in;font:14px/1.5 system-ui,sans-serif;}
.faa-image-open[aria-busy="true"]{cursor:progress;}.faa-image-placeholder{display:block;padding:22px 16px;text-align:center;max-width:100%;overflow-wrap:anywhere;}
.faa-image-open img.faa-decrypted-image{display:block;width:100%!important;height:auto!important;max-height:360px;object-fit:contain;max-width:100%!important;margin:0!important;border:0!important;background:#081b13;}
.faa-image-caption{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 10px;padding:10px 12px;text-align:left;}
.faa-image-name{min-width:0;overflow-wrap:anywhere;font:500 12px/1.5 system-ui,sans-serif;}.faa-image-size{grid-column:1;color:#9dc2ae;font:11px/1.5 system-ui,sans-serif;}
.faa-image-download{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:5px 9px;border:1px solid #4b755c;border-radius:7px;background:#153b28;color:#d1f4e1;cursor:pointer;font:500 12px/1.4 system-ui,sans-serif;text-decoration:none;}
.faa-image-caption .faa-image-download{grid-column:2;grid-row:1 / span 2;}.faa-image-download:hover{background:#24583c;}.faa-image-download:disabled{opacity:.6;cursor:progress;}
:is(.faa-image-open,.faa-image-download,.faa-image-close):focus-visible{outline:2px solid #a2edc6;outline-offset:-3px;}
.faa-image-viewer{box-sizing:border-box;padding:0;max-width:calc(100vw - 32px);width:fit-content;max-height:calc(100dvh - 32px);margin:auto;border:1px solid #5a876c;border-radius:14px;background:#071a12;color:#e5f4ec;box-shadow:0 24px 90px #0009;overflow:auto;}
.faa-image-viewer::backdrop{background:#020b08db;}.faa-image-viewer-bar{position:sticky;top:0;display:flex;gap:10px;align-items:center;padding:12px 14px;background:#102c20;border-bottom:1px solid #315740;z-index:1;}
.faa-image-viewer-title{min-width:0;flex:1;overflow-wrap:anywhere;max-width:60ch;font:500 14px/1.5 system-ui,sans-serif;}
.faa-image-close{flex-shrink:0;border:1px solid #4b755c;border-radius:8px;padding:7px 12px;background:#1c3c2c;color:#e5f5ec;font:500 13px/1.4 system-ui,sans-serif;cursor:pointer;}
.faa-image-full{display:block;max-width:calc(100vw - 34px)!important;width:auto!important;height:auto!important;max-height:calc(100dvh - 116px);object-fit:contain;margin:0 auto;background:#06120d;}
@media(max-width:650px){.faa-inline-image{width:min(320px,100%);}.faa-image-open img.faa-decrypted-image{max-height:300px;}.faa-image-viewer{max-width:calc(100vw - 14px);max-height:calc(100dvh - 14px);border-radius:10px;}.faa-image-viewer-bar{flex-wrap:wrap;padding:10px;}.faa-image-viewer-title{flex-basis:100%;max-width:100%;}.faa-image-full{max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 144px);}}
/* Native Froala/XF controls; no external fonts or live BBCode rendering service. */
.faa-crypto-composer .fr-box{width:100%;min-width:0;margin:0;border-radius:12px;}
.faa-crypto-composer .fr-toolbar{border:1px solid #436c54!important;border-radius:12px 12px 0 0!important;background:#163b2b!important;box-shadow:none!important;padding:4px 5px!important;}
.faa-crypto-composer .fr-wrapper{background:#081e14!important;border:1px solid #436c54!important;border-top:0!important;border-radius:0 0 12px 12px!important;box-shadow:none!important;color:#e5f4ec!important;}
.faa-crypto-composer .fr-element{font:16px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif!important;color:#e5f4ec!important;caret-color:#baf4d3;min-height:110px!important;max-height:280px!important;padding:12px 15px!important;overflow:auto;}
.faa-crypto-composer .fr-placeholder{color:#adceba!important;font-size:16px!important;opacity:1!important;}
.faa-crypto-composer .fr-toolbar .fr-command.fr-btn{color:#c4ead5!important;}
.faa-crypto-composer .fr-toolbar .fr-command.fr-btn.fr-active,.faa-crypto-composer .fr-toolbar .fr-command.fr-btn:hover{background:#315c44!important;color:#ecfff4!important;}
.faa-crypto-composer .fr-command.fr-disabled{opacity:.35!important;}
.faa-crypto-composer .fr-wrapper p{margin:0 0 .55em;}
.faa-crypto-composer [hidden]{display:none!important;}
.faa-editor-source{display:block;box-sizing:border-box;width:100%;min-height:130px;max-height:280px;resize:vertical;padding:12px 15px!important;border:1px solid #436c54!important;border-radius:0 0 12px 12px!important;background:#081e14!important;color:#e5f4ec!important;font:15px/1.6 ui-monospace,Consolas,monospace!important;}
.faa-editor-preview{min-height:110px;max-height:300px;overflow:auto;padding:15px;border:1px solid #436c54;border-radius:0 0 12px 12px;background:#0b2319;color:#e5f4ec;}
.faa-editor-local-note{color:#aacbb7;font:12px/1.5 system-ui,sans-serif;margin-top:6px;}
/* The E2EE compose dialog deliberately emulates XF's normal compact code
 * overlay instead of inheriting the oversized key-management dialog. It stays
 * a native <dialog>, with no AJAX/form submission of decrypted content. */
dialog.faa-editor-dialog{
 box-sizing:border-box;width:min(590px,calc(100vw - 28px));max-width:calc(100vw - 28px);
 max-height:calc(100dvh - 28px);margin:auto;padding:0;overflow:auto;
 border:1px solid #355a46;border-radius:8px;background:#0d241a;color:#d9eee2;
 box-shadow:0 20px 60px #0009;color-scheme:dark;
 font:14px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;
}
dialog.faa-editor-dialog::backdrop{background:#020e09b8;}
.faa-editor-dialog .faa-editor-dialog-header{
 display:flex;align-items:center;justify-content:space-between;gap:12px;
 padding:11px 16px;background:#153827;border-bottom:1px solid #3c634f;
}
.faa-editor-dialog .faa-editor-dialog-header h2{
 flex:1;min-width:0;margin:0;color:#d8f0e1;font:650 16px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;
}
.faa-editor-dialog .faa-editor-dialog-close{
 flex:none;width:30px;height:30px;display:grid;place-items:center;padding:0;
 border:1px solid transparent;border-radius:6px;background:transparent;color:#c5ddce;
 cursor:pointer;font:24px/1 system-ui,sans-serif;
}
.faa-editor-dialog .faa-editor-dialog-close:hover{
 border-color:#436f55;background:#224f37;color:#fff;
}
.faa-editor-dialog .faa-editor-dialog-body{padding:18px 18px 15px;background:#0d241a;}
.faa-editor-dialog .faa-editor-dialog-field{
 display:block;margin:0 0 13px;color:#bedacb;font:500 13px/1.5 system-ui,sans-serif;
}
.faa-editor-dialog .faa-editor-dialog-field span{display:block;margin-bottom:6px;}
.faa-editor-dialog .faa-editor-dialog-language,
.faa-editor-dialog .faa-editor-dialog-content{
 box-sizing:border-box;display:block;width:100%;max-width:100%;margin:0;
 border:1px solid #3c674f;border-radius:6px;background:#081b12;color:#e4f5eb;
 box-shadow:none;outline:none;opacity:1;
}
.faa-editor-dialog .faa-editor-dialog-language{
 min-height:38px;padding:8px 10px;font:14px/1.4 system-ui,sans-serif;
}
.faa-editor-dialog .faa-editor-dialog-content{
 min-height:156px;height:192px;max-height:50vh;padding:11px 12px;resize:vertical;
 font:13px/1.6 SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;
 tab-size:4;white-space:pre;overflow:auto;
}
.faa-editor-dialog .faa-editor-dialog-language:focus,
.faa-editor-dialog .faa-editor-dialog-content:focus{
 border-color:#91e6b8;outline:2px solid #91e6b8;outline-offset:1px;
}
.faa-editor-dialog .faa-editor-dialog-actions{
 display:flex;align-items:center;flex-wrap:wrap;gap:9px;
 padding:12px 18px 15px;border-top:1px solid #355a46;background:#102c20;
}
.faa-editor-dialog .faa-editor-dialog-actions .button{
 box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;
 min-height:35px;margin:0;padding:7px 12px;border:1px solid #396a4f;border-radius:6px;
 background:#1b422f;color:#cfe9da;box-shadow:none;text-shadow:none;
 font:600 13px/1.4 system-ui,sans-serif;cursor:pointer;
}
.faa-editor-dialog .faa-editor-dialog-actions .button--primary{
 background:#8ce9b8;border-color:#8ce9b8;color:#082419;
}
.faa-editor-dialog .faa-editor-dialog-actions .button:not(.button--primary):hover{
 border-color:#6a9f7f;background:#25553c;color:#fff;
}
.faa-editor-dialog .faa-editor-dialog-actions .button--primary:hover{
 background:#b0f6d0;border-color:#b0f6d0;color:#082419;
}
.faa-editor-dialog .faa-editor-dialog-actions .button:focus-visible,
.faa-editor-dialog .faa-editor-dialog-close:focus-visible{
 outline:2px solid #91e6b8;outline-offset:2px;
}
@media(max-width:520px){
 dialog.faa-editor-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);}
 .faa-editor-dialog .faa-editor-dialog-header{padding:10px 12px;}
 .faa-editor-dialog .faa-editor-dialog-body{padding:13px 12px;}
 .faa-editor-dialog .faa-editor-dialog-actions{padding:11px 12px 13px;}
 .faa-editor-dialog .faa-editor-dialog-content{height:160px;min-height:120px;max-height:36vh;}
}

/* Fallback: XF-compatible blocks render correctly in decrypted chat even
 * when the optional Zer0Kernel Code Blocks enhancement is not installed. */
.faa-decrypted-bbcode .faa-chat-code:not(.zkCode--enhanced){
 box-sizing:border-box;display:block;width:100%;max-width:100%;min-width:0;
 margin:10px 0;border:1px solid #315542;border-radius:9px;
 background:#071610;color:#d7efe1;overflow:hidden;
}
.faa-decrypted-bbcode .faa-chat-code:not(.zkCode--enhanced) > .bbCodeBlock-title{
 box-sizing:border-box;display:block;min-width:0;margin:0;padding:10px 14px;
 border:0;border-bottom:1px solid #315542;border-radius:0;
 background:#122d20;color:#d2ebdc;font:600 12px/1.5 system-ui,sans-serif;text-align:left;
}
.faa-decrypted-bbcode .faa-chat-code:not(.zkCode--enhanced) > .bbCodeBlock-content{
 box-sizing:border-box;width:100%;max-width:100%;min-width:0;margin:0;padding:0;border:0;background:#071610;
}
.faa-decrypted-bbcode .faa-chat-code:not(.zkCode--enhanced) pre.bbCodeCode{
 box-sizing:border-box;display:block;width:100%;max-width:100%;max-height:440px;
 margin:0;padding:13px 15px;overflow:auto;border:0;border-radius:0;
 background:transparent;color:#d7efe1;font:13px/1.7 SFMono-Regular,Consolas,monospace;
 white-space:pre;overflow-wrap:normal;word-break:normal;tab-size:4;
}
.faa-decrypted-bbcode .faa-chat-code:not(.zkCode--enhanced) pre.bbCodeCode > code{
 background:transparent;color:inherit;padding:0;border:0;font:inherit;white-space:inherit;
}

.faa-decrypted-text.faa-decrypted-bbcode{white-space:normal;overflow-wrap:anywhere;min-width:0;}
:is(.faa-decrypted-bbcode,.faa-crypto-composer .fr-element) .faa-bb-code{display:block;max-width:100%;white-space:pre;overflow:auto;tab-size:4;margin:10px 0;padding:14px 16px;border:1px solid #436450;border-radius:10px;background:#071911;color:#d7f0df;font:14px/1.65 ui-monospace,Consolas,monospace;}
.faa-decrypted-bbcode .faa-bb-code code{font:inherit;color:inherit;background:none;padding:0;white-space:pre;}

/* 1.0.23: Code copied from highlighted sites must not inherit XenForo's
   per-token black backgrounds and paddings in the secure Froala composer. */
.faa-crypto-composer .fr-element pre.faa-bb-code > code{
 display:block;width:max-content;min-width:100%;max-width:none;
 background:transparent!important;color:inherit!important;
 padding:0!important;margin:0!important;border:0!important;
 border-radius:0!important;box-shadow:none!important;
 font:inherit!important;white-space:pre!important;
}
.faa-crypto-composer .fr-element pre.faa-bb-code > code *{
 background:transparent!important;box-shadow:none!important;
 border:0!important;padding:0!important;
}

.faa-bb-inline-code{font-family:ui-monospace,Consolas,monospace;padding:1px 5px;background:#082116;border:1px solid #44624e;border-radius:5px;white-space:pre-wrap;}
.faa-bb-quote{margin:10px 0;padding:10px 14px;border-left:3px solid #83c49e;background:#102b1f;color:#d2e8db;border-radius:0 9px 9px 0;}
.faa-bb-quote cite{display:block;font:600 13px/1.5 system-ui;color:#aee2c3;margin-bottom:6px;}
.faa-bb-spoiler{margin:10px 0;padding:10px 14px;border:1px solid #426750;border-radius:10px;background:#122e21;}.faa-bb-spoiler summary{cursor:pointer;font-weight:600;}.faa-bb-spoiler>div{margin-top:9px;}
.faa-bb-spoiler-editor{padding:10px;border:1px dashed #84b999;border-radius:8px;}.faa-bb-spoiler-editor::before{content:"[SPOILER]";display:block;color:#9bc8ae;font:12px ui-monospace,monospace;}
.faa-bb-ispoiler{color:transparent;background:#698674;border-radius:3px;}.faa-bb-ispoiler:hover,.faa-bb-ispoiler:focus{color:inherit;background:#102a1f;}
.faa-bb-indent{padding-inline-start:1.5em;}.faa-bb-table{display:block;border-collapse:collapse;max-width:100%;overflow-x:auto;margin:10px 0;}.faa-bb-table th,.faa-bb-table td{border:1px solid #4a7158;padding:7px 10px;text-align:start;}.faa-bb-table th{background:#173e2a;}
.faa-decrypted-bbcode :is(h2,h3,h4){font:650 1.2em/1.45 system-ui;margin:.8em 0 .5em;}.faa-decrypted-bbcode :is(ul,ol){margin:.6em 0;padding-inline-start:1.7em;}.faa-decrypted-bbcode a{color:#aff0cd;text-decoration:underline;}
.faa-decrypted-bbcode hr{border:0;border-top:1px solid #456a52;margin:12px 0;}
@media(max-width:600px){.faa-crypto-composer .fr-toolbar{padding:2px!important;}.faa-crypto-composer .fr-element{min-height:105px!important;max-height:220px!important;}.faa-editor-source{font-size:16px!important;}.faa-compose-actions #faa-safety{width:auto;order:0;}.faa-compose-actions #faa-compose-send{min-width:110px;}}

/* 1.0.2: XF-style [CODE] insertion for 5AA5 local/E2EE editor only.
   No CSS selectors here modify XenForo's ordinary overlays or the key dialog. */
dialog.faa-editor-dialog--code{
 box-sizing:border-box;width:min(800px,calc(100vw - 24px));max-width:calc(100vw - 24px);
 border-radius:3px;border-color:#335844;background:#0a2118;color:#dcefe4;
 overflow:hidden;max-height:calc(100dvh - 24px);
 font:14px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif;
}
.faa-editor-dialog--code .faa-editor-dialog-header{
 box-sizing:border-box;min-height:47px;padding:7px 8px;background:#163a2a;border-bottom:1px solid #38604a;
}
.faa-editor-dialog--code .faa-editor-dialog-header h2{font:400 22px/1.3 system-ui,-apple-system,"Segoe UI",sans-serif;color:#ccead7;}
.faa-editor-dialog--code .faa-editor-dialog-close{font:32px/1 sans-serif;color:#679a7f;width:31px;height:31px;}
.faa-editor-dialog--code .faa-editor-dialog-close:hover{color:#a9dfbb;}
.faa-editor-dialog--code .faa-editor-dialog-body{padding:0;background:#0b241a;}
.faa-editor-dialog--code .faa-editor-dialog-code-language{
 display:grid;grid-template-columns:minmax(125px,32.5%) minmax(0,1fr);
 gap:0;margin:0;background:#102a20;align-items:center;min-height:70px;
 border-bottom:1px solid #284c39;color:#e7f6eb;
}
.faa-editor-dialog--code .faa-editor-dialog-code-language > span{
 box-sizing:border-box;display:block;margin:0;padding:13px 10px;
 text-align:right;font:13px/1.5 system-ui,sans-serif;
}
.faa-editor-dialog--code .faa-editor-dialog-language{
 -webkit-appearance:auto;appearance:auto;
 box-sizing:border-box;display:block;width:calc(100% - 16px);max-width:100%;
 margin:8px 8px;min-height:43px;padding:8px 10px;
 border-radius:4px;background:#071c12;border:1px solid #387357;
 color:#f0fff7;font:14px/1.5 system-ui,sans-serif;
 color-scheme:dark;
}
.faa-editor-dialog--code .faa-editor-dialog-language:focus{
 outline:2px solid #8dffcb;outline-offset:1px;border-color:#91e6b8;
}
.faa-editor-dialog--code .faa-editor-dialog-other{
 grid-column:2;box-sizing:border-box;width:calc(100% - 16px);margin:0 8px 9px;
 padding:8px 10px;min-height:36px;color:#f0fff7;background:#071c12;
 border:1px solid #387357;border-radius:4px;
}
.faa-editor-dialog--code .faa-editor-dialog-other[hidden]{display:none!important;}
.faa-editor-dialog--code .faa-editor-dialog-code-editor{
 box-sizing:border-box;display:grid;grid-template-columns:30px minmax(0,1fr);
 width:calc(100% - 18px);max-width:calc(100% - 18px);
 height:286px;min-height:180px;max-height:min(55dvh,480px);
 margin:15px 9px 15px;border:1px solid #313d35;border-radius:3px;
 background:#191919;overflow:hidden;color:#e6eaf3;
}
.faa-editor-dialog--code .faa-editor-code-gutter{
 box-sizing:border-box;height:100%;min-height:0;padding:8px 4px 8px 0;
 border-right:1px solid #303030;background:#111;
 overflow:hidden;text-align:right;user-select:none;pointer-events:none;
}
.faa-editor-dialog--code .faa-editor-code-numbers{
 box-sizing:border-box;margin:0;padding:0;
 background:transparent;color:#98a8b9;border:0;
 font:13px/24px Consolas,"Liberation Mono",monospace;white-space:pre;
}
.faa-editor-dialog--code textarea.faa-editor-dialog-content{
 box-sizing:border-box;display:block;width:100%;height:100%;max-height:none;min-height:0;
 margin:0;padding:8px 5px 8px 4px;resize:none;
 border:0!important;outline:none!important;box-shadow:none!important;border-radius:0;
 background:#191919!important;color:#e9edf7!important;caret-color:#f1f3ff;
 white-space:pre;word-break:normal;overflow:auto;tab-size:4;
 font:13px/24px Consolas,"Liberation Mono",monospace!important;
}
.faa-editor-dialog--code textarea.faa-editor-dialog-content:focus{
 border:0!important;outline:none!important;box-shadow:none!important;
}
.faa-editor-dialog--code .faa-editor-dialog-actions{
 box-sizing:border-box;display:flex;justify-content:center;align-items:center;
 min-height:48px;padding:6px 12px;background:#102d20;border-top:1px solid #355945;
}
.faa-editor-dialog--code .faa-editor-dialog-actions .button--primary{
 display:inline-flex;min-height:29px;min-width:120px;
 padding:6px 17px;justify-content:center;
 color:#091e14;background:#89e9b8;border-color:#89e9b8;font-weight:400;
 border-radius:8px;
}
.faa-editor-dialog--code .faa-editor-dialog-actions .button--primary:hover{
 background:#adf5d0;border-color:#adf5d0;
}
@media(max-width:520px){
 dialog.faa-editor-dialog--code{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px);}
 .faa-editor-dialog--code .faa-editor-dialog-code-language{grid-template-columns:76px minmax(0,1fr);min-height:59px;}
 .faa-editor-dialog--code .faa-editor-dialog-code-language > span{font-size:12px;padding:8px 7px;}
 .faa-editor-dialog--code .faa-editor-dialog-language{min-height:40px;}
 .faa-editor-dialog--code .faa-editor-dialog-code-editor{
  margin:9px 6px;width:calc(100% - 12px);max-width:calc(100% - 12px);
  height:240px;max-height:42dvh;
 }
 .faa-editor-dialog--code .faa-editor-dialog-header h2{font-size:19px;}
}

/* 1.0.9: password change is a local WebCrypto operation, matching XF's dark UI. */
.faa-key-dialog #faa-change-status:not(:empty){margin:12px 0;}
.faa-key-dialog #faa-key-change-link{border:0;background:transparent;padding:5px 0;color:#adf0cb;text-align:left;text-decoration:underline;text-underline-offset:3px;cursor:pointer;}
.faa-key-dialog #faa-key-change-link:hover{color:#e6fff1;}
.faa-key-dialog #faa-key-change-link:focus-visible{outline:2px solid #a3f1c7;outline-offset:3px;}
.faa-key-page [data-faa-change-password]{color:#d6f9e7;}

/* 1.0.10: visible password-access state and real local-device revocation. */
.faa-key-page .faa-key-page-status{display:flex;align-items:center;gap:10px;max-width:85ch;min-height:20px;margin:13px 0 16px;padding:11px 14px;border-radius:10px;border:1px solid #345e47;background:#102d20;color:#cbeedb;font:500 14px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif;overflow-wrap:anywhere;}
.faa-key-page .faa-key-page-status::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:#85c7a3;box-shadow:0 0 0 3px #85c7a31c;}
.faa-key-page .faa-key-page-status[data-state="open"]::before{background:#8af4b5;box-shadow:0 0 0 3px #8af4b529;}
.faa-key-page .faa-key-page-status[data-state="closed"]::before{background:#d2c38b;box-shadow:0 0 0 3px #d2c38b22;}
.faa-key-page .faa-key-page-status[data-state="error"]{color:#ffdbc7;border-color:#81594d;background:#311f1c;}
.faa-key-page .faa-key-page-status[data-state="error"]::before{background:#f3aa91;box-shadow:0 0 0 3px #f3aa9122;}
.faa-key-page .faa-key-page-status[data-state="busy"]::before{background:#97d2ef;}
.faa-key-page button[data-faa-key-lock]:disabled{opacity:.56;cursor:not-allowed;filter:saturate(.55);}
.faa-key-page button[data-faa-key-lock]:not(:disabled){cursor:pointer;}
@media(max-width:680px){.faa-key-page .faa-key-page-status{font-size:13px;padding:10px 12px;}}

/* 1.0.12: calm, readable password guidance; typography follows the XenForo dialog. */
.faa-key-dialog .faa-key-password-warning{
  box-sizing:border-box;
  margin:15px 0 18px;
  padding:13px 16px;
  border:1px solid rgba(123,194,152,.19);
  border-left:3px solid #84dbaa;
  border-radius:9px;
  background:rgba(82,156,112,.085);
  color:#c6e3d2;
  font-family:inherit;
  font-size:14px;
  font-weight:400;
  line-height:1.58;
  letter-spacing:normal;
  overflow-wrap:break-word;
}
.faa-key-dialog .faa-key-password-warning__lead{
  display:block;
  margin-bottom:4px;
  color:#e0f9ea;
  font-size:14.5px;
  font-weight:600;
  line-height:1.5;
}
.faa-key-dialog .faa-key-password-warning__detail{
  display:block;
  font-size:13.5px;
  font-weight:400;
  line-height:1.6;
}
.faa-key-dialog .faa-key-password-warning__detail strong{
  color:#e0f9ea;
  font-weight:600;
}
@media (max-width:520px){
  .faa-key-dialog .faa-key-password-warning{padding:12px 13px;}
  .faa-key-dialog .faa-key-password-warning__lead{font-size:14px;}
  .faa-key-dialog .faa-key-password-warning__detail{font-size:13px;}
}

/* Decrypted links and previews are visually distinguishable; the server never
   sees plaintext URLs. Long links wrap without clipping the message bubble. */
.faa-decrypted-text a[href],.faa-editor-preview a[href]{
 color:#91e6b8;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere;
}
.faa-decrypted-text a[href]:hover,.faa-editor-preview a[href]:hover{color:#c3ffdc;}
.faa-decrypted-text a[href]:focus-visible,.faa-editor-preview a[href]:focus-visible{
 outline:2px solid #91e6b8;outline-offset:2px;
}
