/* Wspolna warstwa navbara dla strony glownej i stron ofertowych. */

.account-actions {
  min-width: 0;
}

.account-link--user {
  width: clamp(138px, 15vw, 210px);
  max-width: min(210px, 100%);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.account-link--user:hover {
  transform: translateY(-1px);
}

.account-menu {
  width: clamp(138px, 15vw, 210px);
  max-width: 100%;
  min-width: 0;
  z-index: 10030;
}

.account-menu .account-link--user {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.account-menu-panel {
  left: 0;
  right: auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-align: left;
}

.account-link--admin {
  border-color: rgba(255, 31, 31, 0.58);
  background: linear-gradient(135deg, rgba(255, 31, 31, 0.18), rgba(13, 13, 13, 0.96));
  box-shadow: inset 0 0 0 1px rgba(255, 31, 31, 0.1);
}

.account-link--admin span {
  color: #ff8f93;
}

.dropdown-content .account-menu-logout {
  margin: 0;
  border-top: 1px solid #202020;
}

.dropdown-content .account-menu-logout[hidden] {
  display: none;
}

.dropdown-content .account-menu-logout button {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  line-height: 1.2;
  text-align: left;
}

.dropdown-content .account-menu-logout button:hover {
  background: var(--red);
}

@media (max-width: 1180px) {
  .account-link--user {
    width: 100%;
    max-width: 100%;
  }

  .account-menu {
    width: min(34vw, 190px);
    max-width: 190px;
  }
}

@media (max-width: 820px) {
  .client-authenticated .account-actions {
    display: none;
  }

  .client-authenticated .nav-right--account-only .account-actions {
    display: inline-flex;
  }
}

@media (max-width: 620px) {
  .nav-container {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nav-right {
    min-width: 0;
  }

  .menu-btn {
    white-space: nowrap;
  }
}
