/* =====================================================================
   HEADER.CSS
   Fejlec szerkezet (nem gomb stilusok).
   Hasznalat: minden oldal, ahol topbar/nav szerepel.
   ===================================================================== */

.topbar,
.header-menu-grid,
.profile-meta {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.header-actions-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
}

.topbar {
  justify-content: space-between;
  gap: 4px;
  padding: 10px 0px 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
}

.brand-text {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.brand-title {
  display: block;
}

.brand-tagline {
  display: block;
  font-size: 0.68em;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.header-user-email {
  max-width: min(100%, 320px);
  font-size: var(--ui-font-xs);
  line-height: 1.2;
  text-align: right;
  overflow-wrap: anywhere;
  opacity: 0.82;
}

.screen-resolution {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  transform: none;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 4px 12px;
  background: rgba(34, 23, 18, 0.92);
  color: #fff7ed;
  font-size: var(--ui-font-xs);
  line-height: 1.1;
  opacity: 1;
  text-align: center;
  pointer-events: none;
}

.header-menu-grid {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: nowrap;
}

.admin-message-notice-stack {
  display: grid;
  gap: 6px;
  margin: 0 auto 30px;
  width: min(100%, 1180px);
}

.admin-message-notice-stack:not(:has(.admin-message-notice:not(.is-hidden))) {
  display: none;
  margin: 0;
}

.admin-message-notice {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 14px);
  width: 100%;
  margin: 0;
  padding: 6px clamp(10px, 2vw, 14px);
  cursor: pointer;
  text-decoration: none;
}

.warning-message.admin-message-notice {
  display: flex;
}

.admin-message-notice.is-static {
  cursor: default;
}

.admin-message-notice-icon {
  display: block;
  width: clamp(20px, 3vw, 28px);
  height: clamp(20px, 3vw, 28px);
  flex: 0 0 auto;
  object-fit: contain;
  filter: none !important;
  margin-right: 4px;
}

.admin-message-notice-icon.is-profile-approval-pending-icon {
  animation: admin-notice-profile-approval-spin 3.2s linear infinite reverse;
}

@keyframes admin-notice-profile-approval-spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-message-notice-text {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.admin-message-notice-arrow {
  display: block;
  flex: 0 0 auto;
  width: clamp(20px, 3vw, 28px);
  height: clamp(16px, 2.45vw, 23px);
  object-fit: contain;
  filter: none !important;
}

@media (max-width: 680px) {
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    padding-bottom: 21px;
  }

  .brand-wrap {
    order: 1;
  }

  .header-menu-grid {
    display: flex !important;
    order: 2;
    flex: 0 0 100%;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    opacity: 1;
    visibility: visible;
  }

  .header-actions-wrap {
    order: 2;
    flex: 0 0 100%;
    width: 100%;
    margin-left: 0;
    align-items: flex-end;
  }

  .header-user-email {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .header-menu-grid .header-menu-button,
  .header-menu-grid .action-button {
    padding: 8px 12px;
    border-radius: 11px;
  }

  .admin-message-notice {
    align-items: center;
    flex-wrap: nowrap;
  }

  .admin-message-notice-arrow {
    margin-left: auto;
  }
}
