/* Wyjedzone — pigułka profilu w nagłówku.
   MOBILE FIRST: na telefonie widać TYLKO inicjał (bez punktów i imienia),
   od 720px dochodzi saldo. Wszystko scope'owane w .wyj-profil.
   Motyw stylizuje każdy <button> na własną pigułkę — stąd !important na
   własnościach wizualnych (tak jak w dokumentach). */

a.wyj-profil__zaloguj,
.wyj-profil {
  --wp-fiolet: #2e1a54;
  --wp-fiolet-jasny: #6b46c1;
  --wp-lawenda: #ede9fe;
  --wp-bialy: #fff;
  --wp-linia: #e8e5dd;
  --wp-szary: #7a7a86;

  position: relative;
  display: inline-block;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.3;
}
.wyj-profil *, .wyj-profil *::before, .wyj-profil *::after { box-sizing: border-box; }

/* ── Pigułka ───────────────────────────────────────────────── */
.wyj-profil button.wyj-profil__pigulka {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 4px !important;                 /* telefon: sam inicjał, ciasno */
  background: transparent !important;
  background-image: none !important;
  border: 1px solid transparent !important;
  border-radius: 9999px !important;
  box-shadow: none !important;
  font: inherit !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  min-height: 40px !important;             /* telefon: nadal wygodny cel dotyku */
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.wyj-profil button.wyj-profil__pigulka:hover { background: var(--wp-lawenda) !important; }
.wyj-profil button.wyj-profil__pigulka[aria-expanded="true"] {
  background: var(--wp-lawenda) !important;
  border-color: #d9d3ea !important;
}
.wyj-profil button.wyj-profil__pigulka:focus { outline: none !important; }
body.wyj-klawiatura .wyj-profil button.wyj-profil__pigulka:focus-visible {
  box-shadow: 0 0 0 2px var(--wp-fiolet-jasny) !important;
}

/* Inicjał — jedyna rzecz widoczna na telefonie */
.wyj-profil__awatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wp-lawenda);
  color: var(--wp-fiolet);
  font-family: Fraunces, Georgia, serif;
  font-size: 14px;
  font-weight: 600;
}

/* Imię + punkty: na TELEFONIE ukryte (zostaje sam inicjał), od 720px widoczne. */
.wyj-profil__tekst {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}
.wyj-profil__imie-pigulka {
  font-size: 13px;
  font-weight: 700;
  color: #1f2430;
  line-height: 1.15;
  max-width: 12ch;                          /* długie imię nie rozpycha nagłówka */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Punkty — NASZ FIOLET, nie róż */
.wyj-profil__pkt {
  color: var(--wp-fiolet) !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}
.wyj-profil__strzalka {
  display: none;                            /* telefon: ukryte */
  width: 6px; height: 6px;
  border-right: 2px solid var(--wp-szary);
  border-bottom: 2px solid var(--wp-szary);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.18s ease;
}
.wyj-profil button.wyj-profil__pigulka[aria-expanded="true"] .wyj-profil__strzalka {
  transform: rotate(-135deg) translate(-3px, -3px);
}

/* ── Rozwijane menu ────────────────────────────────────────── */
.wyj-profil__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 9999;
  min-width: 232px;
  background: var(--wp-bialy);
  border: 1px solid var(--wp-linia);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(46, 26, 84, 0.16);
  overflow: hidden;
}
.wyj-profil__menu[hidden] { display: none; }

.wyj-profil__naglowek {
  padding: 14px 16px;
  background: var(--wp-lawenda);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wyj-profil__imie {
  font-weight: 700;
  font-size: 15px;
  color: var(--wp-fiolet);
}
.wyj-profil__saldo {
  font-size: 13px;
  font-weight: 700;
  color: var(--wp-fiolet-jasny) !important;
  text-decoration: none !important;
}
.wyj-profil__saldo:hover { text-decoration: underline !important; }

.wyj-profil__lista { list-style: none; margin: 0; padding: 6px 0; }
.wyj-profil__lista li { margin: 0; }
.wyj-profil__link {
  display: block;
  padding: 11px 16px;
  min-height: 44px;
  font-size: 14px;
  color: #3a3a42 !important;
  text-decoration: none !important;
}
.wyj-profil__link:hover { background: #f7f6f2; color: var(--wp-fiolet) !important; }
.wyj-profil__link--wyloguj {
  border-top: 1px solid var(--wp-linia);
  margin-top: 6px;
  color: #b3261e !important;
  font-weight: 600;
}

/* „Zaloguj się” — fioletowy przycisk marki. Bez tego motyw rysował go swoim
   stylem (żółta pigułka) albo zwykłym linkiem. */
a.wyj-profil__zaloguj {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 7px 15px !important;
  min-height: 33px;
  border-radius: 9999px !important;
  background: var(--wp-fiolet) !important;
  background-image: none !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
  white-space: nowrap;
}
a.wyj-profil__zaloguj:hover { background: #43266f !important; color: #fff !important; }
a.wyj-profil__zaloguj:focus { outline: none !important; }
body.wyj-klawiatura a.wyj-profil__zaloguj:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--wp-fiolet-jasny) !important;
}

/* ── Od tabletu w górę: pokazujemy saldo i strzałkę ────────── */
@media (min-width: 720px) {
  .wyj-profil button.wyj-profil__pigulka {
    padding: 4px 12px 4px 4px !important;
    min-height: 36px !important;           /* desktop: kursor, nie palec — może być niżej */
    gap: 7px;
  }
  .wyj-profil__tekst { display: inline-flex; }
  .wyj-profil__strzalka { display: inline-block; }
}

@media (prefers-reduced-motion: reduce) {
  .wyj-profil button.wyj-profil__pigulka,
  .wyj-profil__strzalka { transition: none; }
}
