/* Wspólny wygląd belki aplikacji i wszystkich stron statycznych. */

:root {
  --public-header-height: 57px;
}

.chat-header.public-site-header {
  z-index: 60;
  font-family: "Avenir Next", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.public-site-header a {
  text-decoration: none;
}

.public-site-header summary {
  cursor: pointer;
  list-style: none;
}

.public-site-header summary::-webkit-details-marker {
  display: none;
}

.public-site-header .brand-menu {
  max-height: calc(100dvh - var(--public-header-height) - 24px);
  overflow-y: auto;
}

.public-site-header [open] .brand-mark {
  box-shadow: 0 0 0 2px rgba(95, 106, 87, 0.18);
}

.public-site-header a:focus-visible,
.public-site-header summary:focus-visible {
  outline: 2px solid #1f6d3e;
  outline-offset: 4px;
}

body:has(> .public-site-header) [id] {
  scroll-margin-top: calc(var(--public-header-height) + 24px);
}

@media (min-width: 761px) {
  :root {
    --public-header-height: 65px;
  }
}

.chat-header {
  --header-main-row-height: 56px;
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  gap: 8px;
  padding: 0 14px;
  background: rgba(244, 244, 240, 0.9);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(14px);
}

.header-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: var(--header-main-row-height);
}

.header-side {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-side-right {
  justify-content: flex-end;
  gap: 8px;
}

.brand-lockup {
  position: relative;
  justify-self: start;
  min-width: 0;
}

.brand-lockup-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #fafbf5;
  flex: 0 0 auto;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-lockup-button.is-open .brand-mark {
  box-shadow: 0 0 0 2px rgba(95, 106, 87, 0.18);
}

.brand-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  display: grid;
  gap: 8px;
  width: min(300px, calc(100vw - 28px));
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 244, 236, 0.98)),
    #ffffff;
  box-shadow: 0 24px 54px rgba(17, 24, 39, 0.18);
}

.brand-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  color: #111827;
  text-align: left;
}

.brand-menu-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.brand-menu-link > span {
  min-width: 0;
}

.brand-menu-link.is-active {
  border-color: rgba(38, 132, 75, 0.2);
  background: rgba(244, 251, 246, 0.98);
}

.brand-menu-link small {
  color: #6b7280;
  font-size: 0.76rem;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  row-gap: 0;
}

.brand-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  margin: 0;
  color: #68707a;
  font-size: 0.76rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-version {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(32, 34, 35, 0.08);
  color: #202223;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.header-button {
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  color: #111827;
  font-size: 0.92rem;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  -webkit-tap-highlight-color: transparent;
}

.header-button:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.header-news-button {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  gap: 8px;
  white-space: nowrap;
}

.header-news-button img {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.header-news-label {
  display: none;
}

.header-news-button:focus-visible {
  outline: 2px solid #1f6d3e;
  outline-offset: 3px;
}

.header-login-button {
  min-height: 40px;
  padding-inline: 14px;
  white-space: nowrap;
}

.login-label-full {
  display: none;
}

.header-button.primary {
  background: #1f2937;
  border-color: #1f2937;
  color: #ffffff;
}

@media (min-width: 761px) {
  .chat-header {
    --header-main-row-height: 64px;
    padding: 0 24px;
  }

  .header-news-button {
    width: auto;
    padding-inline: 16px;
  }

  .header-news-label {
    display: inline;
  }

  .header-main-row {
    gap: 16px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-subtitle {
    font-size: 0.8rem;
  }

  .login-label-short {
    display: none;
  }

  .login-label-full {
    display: inline;
  }
}
