/* Copyright Elias Bentz - elias@bentz.dev
 Christine Steinmann 2025 */

/* --- Main Header Styling --- */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  background-color: var(--color-background-content);
  box-shadow: 0 4px 15px
    rgba(var(--color-shadow-rgb), var(--opacity-shadow-medium));
  position: relative;
  z-index: 100;
  gap: 1rem;
}

.header-section {
  display: flex;
  align-items: center;
}

.header-logo {
  flex-shrink: 0;
}

.header-logo a {
  display: inline-block;
  line-height: 0;
}

.header-logo img,
.header-logo svg {
  height: 50px;
  width: auto;
  display: block;
}

.header-title {
  flex-grow: 1;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

.header-title h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  display: block;
}

.header-menu {
  flex-shrink: 0;
  justify-content: flex-end;
}

.menu-toggle-button {
  background: none;
  border: none;
  padding: 0.5rem;
  margin: -0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  color: var(--color-icon-close);
}

.menu-toggle-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--color-icon-close-hover);
}

.menu-toggle-button img,
.menu-toggle-button svg {
  height: 30px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .main-header {
    padding: 0.6rem 1rem;
    gap: 0.8rem;
  }

  .header-logo img,
  .header-logo svg {
    height: 35px;
  }

  .header-title h1 {
    font-size: 1.2rem;
  }

  .menu-toggle-button img,
  .menu-toggle-button svg {
    height: 24px;
  }
}

@media (max-width: 480px) {
  .header-title h1 {
    font-size: 1.1rem;
  }
}

#cookieBanner {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 9999;
  padding: 15px;
  text-align: center;
  background-color: var(--color-background-content);
  color: var(--color-text-primary);
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--color-border-medium);
  max-width: 45vw;
  min-width: 300px !important;
}

#cookieBanner button {
  background-color: var(--color-accent-primary);
  color: var(--color-text-inverted);
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}

#cookieBanner button:hover {
  background-color: var(--color-accent-primary-hover);
}