/* TurkeyBoards Tools — accounts: the header's Sign in / account button and menu, the sign-in dialog,
   and the notices under the header (announcement, maintenance, a newer copy of the open keyboard). */

/* header button */
.acct-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; flex: none; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 700 13px/1 var(--font-ui); cursor: pointer; position: relative; white-space: nowrap; }
.acct-btn:hover { background: var(--surface-sunken); }
.acct-btn svg { width: 16px; height: 16px; }
.acct-btn.is-in { width: 34px; height: 34px; padding: 0; justify-content: center; border-color: var(--sticker-edge); background: var(--brand-feather); color: var(--on-feather); }
.acct-btn.is-in:hover { background: var(--brand-feather-deep); }
.acct-btn[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus); }
.acct-av { font: 700 14px/1 var(--font-ui); }
.acct-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--surface); background: var(--success); }
.acct-dot.is-busy { background: var(--brand-feather); animation: acct-pulse 1s ease-in-out infinite alternate; }
.acct-dot.is-warn { background: var(--warning); }
@keyframes acct-pulse { from { opacity: .35; } to { opacity: 1; } }
@media (max-width: 860px) { .acct-btn:not(.is-in) span { display: none; } .acct-btn:not(.is-in) { width: 34px; height: 34px; padding: 0; justify-content: center; } }

/* the account menu */
.acct-menu { position: fixed; z-index: 70; width: min(320px, calc(100vw - 16px)); padding: 6px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); display: grid; }
.acct-menu a, .acct-menu > button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: 400 14px/20px var(--font-ui); color: var(--ink); background: none; border: 0; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; }
.acct-menu a:hover, .acct-menu a:focus-visible, .acct-menu > button:hover, .acct-menu > button:focus-visible { background: var(--surface-sunken); outline: none; }
.acct-menu a svg, .acct-menu > button svg { width: 16px; height: 16px; color: var(--ink-muted); flex: none; }
.acct-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.acct-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 4px; min-width: 0; }
.acct-who > span:last-child { display: grid; min-width: 0; }
.acct-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who small { font: 400 12px/16px var(--font-mono); color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who .acct-av { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--brand-feather); color: var(--on-feather); border: 1.5px solid var(--sticker-edge); }
.acct-sync { display: flex; align-items: center; gap: 8px; margin: 4px 4px 0; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--surface-sunken); font: 400 12px/16px var(--font-ui); color: var(--ink-muted); }
.acct-sync > svg { width: 16px; height: 16px; flex: none; color: var(--success); }
.acct-sync.is-warn > svg { color: var(--warning); }
.acct-sync span { flex: 1; min-width: 0; }
.acct-sync .tb-iconbtn { width: 28px; height: 28px; }
.acct-sync .tb-iconbtn svg { width: 15px; height: 15px; }

/* dialogs */
.acct-dlg { width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 28px; border: 2px solid var(--sticker-edge); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sticker), var(--shadow-pop); overflow-y: auto; }
.acct-dlg::backdrop { background: rgba(0, 22, 52, .45); }
.acct-x { position: absolute; top: 12px; right: 12px; }
.acct-h { margin: 0 32px 6px 0; font: 700 20px/28px var(--font-display); letter-spacing: -0.02em; }
.acct-lede { margin: 0 0 16px; color: var(--ink-muted); font-size: 14px; line-height: 22px; }
.acct-lede p { margin: 0 0 8px; }
.acct-err { margin: 0 0 14px; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--danger); color: var(--danger); font-size: 13px; line-height: 20px; }
.acct-prov { display: grid; gap: 8px; }
.acct-pbtn { justify-content: center; height: 42px; font-size: 14px; }
.acct-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--ink-muted); font-size: 12px; }
.acct-or::before, .acct-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.acct-email, .acct-code { display: grid; gap: 6px; }
.acct-row { display: flex; gap: 8px; }
.acct-row .tb-input { height: 38px; font-size: 14px; flex: 1; }
.acct-codein { letter-spacing: .3em; font-weight: 700; font-size: 18px !important; text-align: center; }
.acct-row .tb-btn { flex: none; }
.acct-fine { margin: 2px 0 0; font-size: 12px; line-height: 18px; color: var(--ink-muted); }
.acct-sent { margin: 0 0 8px; font-size: 14px; line-height: 22px; }
.acct-terms { margin-top: 18px; }
.acct-link { font: inherit; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.acct-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; }
@media (max-width: 480px) { .acct-dlg { padding: 22px 18px; } .acct-row { flex-direction: column; } .acct-row .tb-btn { justify-content: center; } }

/* notices under the header */
.acct-notices { display: grid; }
.acct-notices:empty { display: none; }
.acct-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px var(--gutter-r) 8px var(--gutter-l); border-bottom: 1px solid var(--line); background: var(--surface-sunken); font-size: 14px; line-height: 20px; }
.acct-note > span:first-child { flex: 1; min-width: 200px; }
.acct-note.is-info { box-shadow: inset 4px 0 0 var(--brand-feather); }
.acct-note.is-success { box-shadow: inset 4px 0 0 var(--success); }
.acct-note.is-warning { box-shadow: inset 4px 0 0 var(--brand-beak); }
.acct-note .tb-iconbtn { width: 28px; height: 28px; }
.acct-note-acts { display: inline-flex; gap: 8px; }
.editor-mode .acct-notices { position: relative; z-index: 19; }

/* the toast, for pages without the tools' stylesheet */
.toast { position: fixed; left: 50%; bottom: calc(32px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 80; width: max-content; background: var(--brand-outline); color: #ffffff; font: 700 14px/20px var(--font-ui); padding: 10px 16px; border-radius: var(--radius-md); box-shadow: var(--shadow-pop); display: flex; gap: 12px; align-items: center; max-width: calc(100% - 32px); }
.toast button { font: 700 13px/1 var(--font-ui); color: var(--brand-feather); background: none; border: 0; cursor: pointer; padding: 4px; }
