/* 帳號按鈕、帳號選單、分享與加入分享的對話框。只用主題變數（themes.css），四種主題都跟著換。 */

.acct-btn { position: relative; gap: 6px; margin-inline-start: 4px; }
.acct-btn .acct-label { font-size: 0.875rem; }
.acct-btn[data-sync="loading"] { opacity: 0.75; }
@media (max-width: 1100px) { .acct-btn .acct-label { display: none; } }

.acct-avatar { position: relative; display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 50%; background: var(--acc); color: var(--acc-ink); font-weight: 700; font-size: 0.9rem; line-height: 1; box-shadow: 0 0 0 2px var(--ch-bg), 0 0 0 3px var(--ch-line); }
.acct-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 頭像右下角的小圓點：同步狀態 */
.acct-dot { position: absolute; right: 6px; bottom: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--ch-bg); }
.acct-btn[data-sync="syncing"] .acct-dot, .acct-btn[data-sync="loading"] .acct-dot, .acct-btn[data-sync="idle"] .acct-dot { background: var(--hi); animation: acct-pulse 1.2s ease-in-out infinite; }
.acct-btn[data-sync="offline"] .acct-dot { background: var(--ch-sub); }
.acct-btn[data-sync="error"] .acct-dot { background: var(--danger); }
@keyframes acct-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .acct-dot { animation: none !important; } }

.acct-menu { gap: 2px; }
.acct-menu .menu-note { margin: 2px 4px 12px; color: var(--ch-ink); font-size: 0.9375rem; line-height: 1.45; }
.acct-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; }
.acct-g { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #4285f4; font: 700 15px/1 system-ui, sans-serif; }
.acct-fine { margin: 10px 4px 2px; font-size: 0.8125rem; line-height: 1.45; }

.acct-who { display: flex; align-items: center; gap: 12px; padding: 4px 4px 2px; min-width: 0; }
.acct-who > div { display: flex; flex-direction: column; min-width: 0; }
.acct-who b, .acct-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who small { color: var(--ch-sub); font-size: 0.8125rem; }
.acct-status { display: flex; align-items: center; gap: 8px; margin: 8px 4px 2px; font-size: 0.875rem; color: var(--ch-sub); }
.acct-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--hi); flex: none; }
.acct-status.is-synced::before { background: var(--ok); }
.acct-status.is-offline::before { background: var(--ch-sub); }
.acct-status.is-error { color: var(--danger); }
.acct-status.is-error::before { background: var(--danger); }

/* 分享 */
.acct-share { display: flex; flex-direction: column; gap: 12px; }
.acct-linkrow { display: flex; gap: 8px; }
.acct-link { flex: 1; min-width: 0; font-size: 0.875rem; }
.acct-qr { width: min(220px, 60vw); height: auto; align-self: center; border-radius: 10px; border: 1px solid var(--ch-line); }

.acct-shares { display: flex; flex-direction: column; gap: 8px; min-width: min(28rem, 80vw); }
.acct-share-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--ch-line); border-radius: calc(var(--ch-radius) - 6px); }
.acct-share-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.acct-share-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-share-name small { color: var(--ch-sub); font-size: 0.8125rem; }
.acct-share-row .btn { min-height: 38px; padding: 0 12px; }

/* 加入分享的場景 */
.acct-join-name { margin: 0 0 4px; font-size: 1.25rem; font-weight: 700; }

/* 上課模式不顯示帳號按鈕的狀態閃動 */
body.present .acct-dot { animation: none; }
