/* ============================================================
   NAV ACCOUNT COMPONENT
   Shared by templates/header.php and the blog's standalone navs,
   and by both mayluku.com and mydreams.app.

   Themes itself from each site's existing palette variables
   (--ocean / --turquoise) and falls back to literals so it also
   works inside the blog pages, which declare their own :root.

   color-mix lines are progressive enhancement: the plain rgba()
   declaration above each one is the fallback.
   ============================================================ */

.mlk-account {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;          /* never let the nav squeeze this away */
}

/* ─── Avatar + name (links to /account.php) ─── */
.mlk-account__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s;
}
.mlk-account__link:hover { background: rgba(255, 255, 255, 0.08); }
.mlk-account__link:focus-visible {
  outline: 2px solid var(--turquoise, #2bbdb9);
  outline-offset: 2px;
}

.mlk-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ocean, #128fa2), var(--turquoise, #2bbdb9));
  color: #ffffff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.2s, transform 0.2s;
}
.mlk-account__link:hover .mlk-avatar {
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.mlk-account__name {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ─── Sign out (outline pill) ─── */
.mlk-signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid rgba(43, 189, 185, 0.55);
  border: 1px solid color-mix(in srgb, var(--turquoise, #2bbdb9) 55%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--turquoise, #2bbdb9);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.mlk-signout:hover {
  background: rgba(43, 189, 185, 0.16);
  background: color-mix(in srgb, var(--turquoise, #2bbdb9) 16%, transparent);
  border-color: var(--turquoise, #2bbdb9);
  color: #ffffff;
}
.mlk-signout:focus-visible {
  outline: 2px solid var(--turquoise, #2bbdb9);
  outline-offset: 2px;
}
.mlk-signout__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: block;
}

/* ─── Signed-out state ─── */
.mlk-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ocean, #128fa2), var(--turquoise, #2bbdb9));
  color: #ffffff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.2s, transform 0.2s;
}
.mlk-signin:hover { filter: brightness(1.12); transform: translateY(-1px); color: #ffffff; }
.mlk-signin:focus-visible { outline: 2px solid var(--turquoise, #2bbdb9); outline-offset: 2px; }

/* ─── Tablet and below: 44px tap targets ─── */
@media (max-width: 768px) {
  .mlk-account { gap: 8px; }
  .mlk-account__link { min-height: 44px; padding: 3px 8px 3px 3px; }
  .mlk-signout,
  .mlk-signin { min-height: 44px; padding: 8px 16px; }
}

/* ─── Very small: drop the name, sign out becomes icon-only ─── */
@media (max-width: 480px) {
  .mlk-account__name { display: none; }
  .mlk-account__link { padding: 3px; }
  .mlk-signout {
    min-width: 44px;
    padding: 8px;
    gap: 0;
  }
  .mlk-signout__text { display: none; }
  .mlk-signout__icon { width: 18px; height: 18px; }
}
