/* NovaByteForge Challenges — konto i znajomi na stronie głównej (js/platform/site-account.js). Mobile-first, cele ≥ 44 px. */

/* przycisk konta w nagłówku: zawsze widoczny (także na telefonie, gdy menu jest zwinięte) */
.site-acc-slot { display: flex; margin-left: auto; }
.site-acc__nav {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; max-width: 11rem; padding: 0.35rem 0.75rem;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(14, 22, 40, 0.6); color: var(--text);
  font: 600 0.82rem var(--font); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-acc__nav:hover, .site-acc__nav:focus-visible { border-color: rgba(61, 255, 240, 0.5); }
.site-acc__ico { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.site-acc__label { overflow: hidden; text-overflow: ellipsis; }
.site-acc__dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--muted); }
.site-acc__dot.is-on { background: var(--ok); box-shadow: 0 0 0 3px rgba(93, 255, 159, 0.18); }
.site-acc__badge {
  display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem; border-radius: 999px;
  background: var(--neon-3); color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 1;
}

/* pasek konta pod przyciskami hero */
.hero__account { margin-top: 1.1rem; }
.site-acc { display: grid; justify-items: center; gap: 0.55rem; }
.site-acc__who { margin: 0; max-width: 30rem; color: var(--muted); font-size: 0.95rem; }
.site-acc__who strong { color: var(--text); }
.site-acc__btns { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.site-acc__btn { min-height: 44px; }

/* panel znajomych */
.site-fr-open, .site-fr-open body { overflow: hidden; }
.site-fr {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-end; justify-content: center;
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  background: rgba(3, 6, 14, 0.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: site-fr-in 0.16s ease-out;
}
@keyframes site-fr-in { from { opacity: 0; } }
.site-fr__card {
  width: 100%; max-width: 30rem; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column;
  padding: 0.9rem 1rem calc(1rem + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 20px 20px 0 0; background: var(--bg-2); box-shadow: var(--shadow); color: var(--text); outline: none;
}
.site-fr__head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.site-fr__title { flex: 1; margin: 0; font-family: var(--display); font-size: 1.15rem; letter-spacing: 0.03em; }
.site-fr__x, .site-fr__icon {
  min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: transparent;
  color: var(--text); font-size: 1rem; cursor: pointer;
}
.site-fr__body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding-right: 6px; }
.site-fr__body > p { margin: 0.5rem 0; }
.site-fr__form { display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.site-fr__input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(6, 9, 16, 0.7); color: var(--text); font: 1rem var(--font);
}
.site-fr__input:focus { outline: 2px solid var(--neon); outline-offset: 1px; }
.site-fr__add { min-height: 44px; }
.site-fr__msg { min-height: 1.3em; margin: 0.35rem 0 0 !important; font-size: 0.85rem; color: var(--ok); }
.site-fr__msg.is-err { color: #ff8a8a; }
.site-fr__h { margin: 1rem 0 0.35rem; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.site-fr__row { display: flex; align-items: center; gap: 0.5rem; min-height: 52px; border-bottom: 1px dashed var(--line); }
.site-fr__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.site-fr__name small { color: var(--muted); }
.site-fr__dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #4b5670; }
.site-fr__row.is-on .site-fr__dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(93, 255, 159, 0.18); }
.site-fr__sm { min-height: 44px; padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.site-fr__sm.is-danger { border-color: #ff6b8a; color: #ffb3c2; }
.site-fr__muted { color: var(--muted); font-size: 0.85rem; }
.site-fr__foot { margin-top: 1rem !important; }

@media (min-width: 721px) {
  /* komputer: przycisk konta za menu, panel na środku */
  .site-header__inner .site-acc-slot { order: 3; margin-left: 0; }
  .site-fr { align-items: center; padding: 1rem; }
  .site-fr__card { border-bottom: 1px solid var(--line); border-radius: 20px; max-height: 80vh; }
}

@media (max-width: 720px) {
  /* telefon: logo, konto i „Menu” w jednym wierszu (rozwinięte menu i tak schodzi niżej) */
  .site-header__inner { column-gap: 0.5rem; }
}

@media (max-width: 359px) {
  .site-acc__nav { min-width: 44px; padding: 0.35rem 0.6rem; }
  .site-acc__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .site-fr { animation: none; }
}
