/* Poznani User Header Menu */
.puhm-wrap,
.puhm-wrap * {
  box-sizing: border-box;
}

.puhm-wrap {
  --puhm-accent: #552748;
  --puhm-accent-hover: #E84134;
  --puhm-bordo: #552748;
  --puhm-bordo-dark: #3f1d36;
  --puhm-pink: #f5edf1;
  --puhm-border: rgba(85, 39, 72, 0.14);
  --puhm-shadow: 0 16px 34px rgba(45, 28, 41, 0.12);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  min-height: 32px;
  line-height: 1;
  font-family: inherit;
  z-index: 50;
}

.puhm-trigger,
.puhm-account-link {
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  outline: none;
  text-decoration: none;
}

/* Zalogowany - małe koło z inicjałami */
.puhm-trigger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  inline-size: 30px !important;
  block-size: 30px !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  flex: 0 0 30px !important;
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: var(--puhm-accent) !important;
  color: #fff !important;
  cursor: pointer;
  font: inherit;
  line-height: 1 !important;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.puhm-trigger:hover,
.puhm-wrap.is-open .puhm-trigger {
  background: var(--puhm-accent-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(232, 65, 52, 0.24);
}

.puhm-avatar {
  display: inline-block;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .02em;
  line-height: 1 !important;
  color: currentColor !important;
  text-transform: uppercase;
}

/* Niezalogowany - sama ikonka + minimalistyczny tooltip */
.puhm-account-link {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: var(--puhm-bordo) !important;
  transition: color .18s ease, transform .18s ease;
}

.puhm-account-link:hover,
.puhm-account-link:focus-visible {
  color: var(--puhm-accent-hover) !important;
  transform: translateY(-1px);
}

.puhm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.puhm-icon svg {
  display: block;
}

.puhm-tooltip {
  position: absolute;
  top: calc(100% + 11px);
  left: 50%;
  width: max-content;
  max-width: 180px;
  transform: translate(-50%, 6px);
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--puhm-border);
  box-shadow: 0 10px 24px rgba(45, 28, 41, 0.11);
  color: var(--puhm-bordo);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
  z-index: 9999;
}

.puhm-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: #fff;
  border-left: 1px solid var(--puhm-border);
  border-top: 1px solid var(--puhm-border);
}

.puhm-account-link:hover .puhm-tooltip,
.puhm-account-link:focus-visible .puhm-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Dropdown zalogowanego */
.puhm-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: -6px;
  min-width: 210px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--puhm-border);
  box-shadow: var(--puhm-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
  z-index: 9999;
}

.puhm-dropdown::before {
  content: "";
  position: absolute;
  top: -9px;
  right: 12px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-left: 1px solid var(--puhm-border);
  border-top: 1px solid var(--puhm-border);
  transform: rotate(45deg);
}

.puhm-wrap:hover .puhm-dropdown,
.puhm-wrap.is-open .puhm-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.puhm-dropdown-link {
  position: relative;
  z-index: 1;
  display: block;
  padding: 12px 13px;
  border-radius: 11px;
  text-decoration: none;
  color: #2b2023;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  transition: background-color .16s ease, color .16s ease;
}

.puhm-dropdown-link:hover {
  background: var(--puhm-pink);
  color: var(--puhm-bordo);
}

.puhm-dropdown-link.puhm-logout {
  color: var(--puhm-bordo);
  font-weight: 700;
}

.puhm-dropdown-link.puhm-logout:hover {
  background: var(--puhm-accent-hover);
  color: #fff;
}

@media (max-width: 767px) {
  .puhm-trigger {
    inline-size: 28px !important;
    block-size: 28px !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    flex-basis: 28px !important;
  }

  .puhm-avatar {
    font-size: 9px !important;
  }

  .puhm-account-link {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
  }

  .puhm-tooltip {
    display: none;
  }

  .puhm-dropdown {
    min-width: 190px;
    right: -10px;
  }

  .puhm-dropdown-link {
    font-size: 13px;
    padding: 11px 12px;
  }
}
