/* Atlayo Meet - prihlaseni (Atlayo ID): tlacitko v navigaci, menu uctu, dialogy, avatar.
   Pouziva se na webu i v mistnosti, proto ma vlastni fallbacky promennych. */

.aid-av { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; overflow: hidden; background: var(--accent, #ffdb4d); color: #1a1d24; font-weight: 800; letter-spacing: 0.01em; line-height: 1; user-select: none; }
.aid-av img { display: block; width: 100%; height: 100%; object-fit: cover; }
.aid-ic { flex: none; display: block; }

/* ------------------------------------------------------------- navigace */
.nav-account { position: relative; display: flex; align-items: center; }
html.acct-flag .nav-login { visibility: hidden; }
.nav-login { gap: 8px; border: 1px solid var(--line); color: var(--ink-2); background: transparent; }
.nav-login:hover { color: var(--ink); background: var(--soft); }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 5px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; max-width: 190px; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { background: var(--soft); }
.acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 70; min-width: 250px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg, #fff); box-shadow: 0 18px 50px rgba(20, 24, 31, 0.16); animation: aid-pop 0.14s ease-out; }
html[data-bs-theme="dark"] .acct-menu { background: #141b26; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); }
.acct-menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.acct-menu-head strong { display: block; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.acct-menu-head small { color: var(--ink-3, #6b7280); font-size: 12.5px; }
.acct-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; text-decoration: none; }
.acct-item:hover { background: var(--soft); text-decoration: none; }
.acct-item .aid-ic { color: var(--ink-2); }
@keyframes aid-pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- dialog */
.aid-ov { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(12, 16, 24, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.16s ease; }
.aid-ov.in { opacity: 1; }
.aid-card { position: relative; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 26px 26px 22px; border-radius: 22px; border: 1px solid var(--line, #e6e8ec); background: var(--panel, var(--bg, #fff)); color: var(--ink, #14181f); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); transform: translateY(8px) scale(0.985); transition: transform 0.18s ease; }
.aid-ov.in .aid-card { transform: none; }
html[data-bs-theme="dark"] .aid-card { background: #141b26; border-color: #2a3a4f; color: #e8edf5; }
.aid-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3, #6b7280); cursor: pointer; }
.aid-x:hover { background: var(--soft, #f3f4f6); color: var(--ink, #14181f); }
html[data-bs-theme="dark"] .aid-x:hover { background: #1c2838; color: #e8edf5; }
.aid-head { display: flex; align-items: center; gap: 12px; margin: 0 28px 14px 0; }
.aid-head h2 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; }
.aid-body { font-size: 15px; line-height: 1.55; }
.aid-lead { margin: 0 0 14px; color: var(--ink-2, #4b5563); }
.aid-shares { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--soft, #f3f4f6); color: var(--ink-2, #4b5563); font-size: 14px; }
.aid-shares .aid-ic { margin-top: 2px; color: #0c9e55; }
html[data-bs-theme="dark"] .aid-lead, html[data-bs-theme="dark"] .aid-shares { color: #b4bac4; }
html[data-bs-theme="dark"] .aid-shares { background: #1a2230; }
.aid-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-2, #4b5563); }
.aid-note.err { color: #c62828; font-weight: 600; }
html[data-bs-theme="dark"] .aid-note.err { color: #ff8a80; }
.aid-field { display: block; width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line, #d7dbe2); border-radius: 12px; background: transparent; color: inherit; font: inherit; font-size: 16px; margin-top: 4px; }
.aid-field:focus { outline: 2px solid var(--accent, #ffdb4d); outline-offset: 1px; border-color: transparent; }
.aid-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.aid-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line, #d7dbe2); background: transparent; color: inherit; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.aid-btn:hover { background: var(--soft, #f3f4f6); }
html[data-bs-theme="dark"] .aid-btn { border-color: #2a3a4f; }
html[data-bs-theme="dark"] .aid-btn:hover { background: #1c2838; }
.aid-btn.primary { background: var(--accent, #ffdb4d); border-color: transparent; color: #1a1d24; }
.aid-btn.primary:hover { filter: brightness(0.96); background: var(--accent, #ffdb4d); }
.aid-btn.danger { background: #d93025; border-color: transparent; color: #fff; }
.aid-btn.danger:hover { background: #c12a20; }
.aid-btn:disabled { opacity: 0.6; cursor: default; }
.aid-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(26, 29, 36, 0.25); border-top-color: #1a1d24; animation: aid-spin 0.8s linear infinite; }
@keyframes aid-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ prejoin (mistnost) */
.pj-acct { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 0 14px; border-radius: 14px; border: 1px solid var(--line, #2a3342); background: var(--soft, rgba(127, 127, 127, 0.08)); }
.pj-acct-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.pj-acct-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.pj-acct-text small { opacity: 0.7; font-size: 12.5px; }
.pj-acct-link { border: 0; background: transparent; color: inherit; font: inherit; font-size: 13.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; border-radius: 8px; white-space: nowrap; }
.pj-acct-link:hover { opacity: 0.8; }
.pj-acct-btn { display: inline-flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 14px; justify-content: center; min-height: 46px; border-radius: 12px; border: 0; background: var(--accent, #ffdb4d); color: var(--accent-ink, #1b1b1b); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(255, 210, 31, 0.22); transition: background 0.15s; }
.pj-acct-btn:hover { background: var(--accent-hover, #ffd21f); }
.pj-acct-btn small { opacity: 0.7; font-weight: 600; }
.pj-gate { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid #5a4c1a; background: rgba(255, 219, 77, 0.12); font-size: 14px; line-height: 1.5; }

@media (max-width: 980px) {
  .acct-name { display: none; }
  .acct-btn { padding: 0 5px; }
}
@media (max-width: 640px) {
  .nav .brand { white-space: nowrap; }
  .nav-right .nav-login { width: 40px; min-width: 40px; padding: 0; border-radius: 50%; }
  .nav-right .nav-login span { display: none; }
  .aid-card { padding: 22px 18px 18px; border-radius: 20px; }
  .aid-actions { flex-direction: column-reverse; }
  .aid-actions .aid-btn { width: 100%; }
  .acct-menu { position: fixed; top: 64px; left: 12px; right: 12px; min-width: 0; }
}
@media (max-width: 480px) {
  .nav-in { gap: 8px; }
  .nav-right { gap: 4px; }
  .nav .brand { font-size: 16px; gap: 6px; }
  .theme-btn, .nav-right .nav-login, .burger { width: 36px; min-width: 36px; height: 36px; }
  .nav .lang-picker-trigger, .acct-btn { height: 36px; }
  .burger { padding: 6px; }
}
@media (max-width: 360px) {
  .nav .brand span { display: none; }
}
