/* Typsnitt */
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400&display=swap");

header {
  border-bottom: 1px solid var(--2-grey-dark-grey-grey-100, #eaeaea);
  background: var(--1-base-black-white-white, #fafafa);

  position: sticky;
  top: 0;

  z-index: 9999;
}

.navbar-navigation-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-navigation {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  align-self: stretch;
}

.mobile-navbar-profile-container {
  position: absolute;
  right: 0;
}

.navbar-logo {
  display: flex;
  padding-bottom: 0.125rem;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.625rem;
  align-self: stretch;

  font-size: 1.5rem;
  visibility: visible;
  transition: 0.2s ease-in;
}

.navbar-logo.active {
  visibility: hidden;
}

.navbar-frame {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-avatar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-avatar-image {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  border-radius: 12.5rem;
  background: var(--avatar-user-square-orlando-diggs-color-background,
      url(<path-to-image>) lightgray 50% / cover no-repeat,
      #f3ddaa);
}

.navbar-container {
  display: flex;
  min-width: 55rem;
  min-height: 3.125rem;
  padding: 0.5rem 2rem;
  justify-content: space-between;
  align-items: center;

  color: var(--2-grey-dark-grey-grey-600, #696e75);

  /* Button/md */
  font-family: "Source Sans Pro";
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.5rem;
  /* 150% */
}

.navbar-container a {
  text-decoration: none;
}

/* Knappen för hamburgermenyn, visas endast i mobilvyn */
.navbar-toggle {
  position: absolute;
  display: none;
  font-size: 1.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.3s ease-in;
}

.navbar-toggle::before {
  content: "☰";
  /* X icon */
}

.navbar-toggle.active::before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 13 12'%3E%3Cpath d='M11.375 1.125L1.625 10.875M1.625 1.125L11.375 10.875' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  /* X icon */
}

.navbar-toggle::after {
  content: "";
}

.navbar-toggle.active::after {
  padding-left: 1rem;
  font-family: "Source Sans Pro";
  color: var(--2-grey-dark-grey-grey-600, #696e75);
  font-weight: 600;
  font-size: 1.5rem;
  content: "Ungdomsförmedlingen";
  opacity: 1;
}

.navbar-frame2 {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background: var(--1-base-black-white-white, #fafafa);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  transform: translateX(-100%);

  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  min-width: 330px;
}

/* glid in när den är aktiv */
.navbar-frame2.active {
  transform: translateX(0);
  transition: transform 0.3s ease;
}

.navbar-icon {
  display: none;
}

.sub-navbar {
  height: 100%;
  width: 16.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  background: var(--1-base-black-white-white, #fafafa);
  position: fixed;
  top: 10;
  /* This makes it stick to the top of the viewport */
  z-index: 2;
}

.sub-navbar-item {
  display: flex;
  padding: 0.5rem 0.75rem;
  align-items: center;
  gap: 0.5rem;
  align-self: stretch;
  border-radius: 6px;
  background: var(--1-base-black-white-white, #fafafa);
  border-style: none;
  margin-bottom: 0.25rem;
}

.sub-navbar-item:hover {
  background: var(--2-grey-dark-grey-grey-100, #f3f3f3);
  transition: ease-in 0.3s;
}

.sub-navbar-item.active {
  background: var(--2-grey-dark-grey-grey-100, #eaeaea);
  color: var(--2-grey-dark-grey-grey-900, #1b242f);
}

.sub-navbar-div {
  visibility: visible;
}

.sub-navbar-div.active {
  visibility: hidden;
}

.profile-icon {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 200px;
}

.profile-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  min-width: 150px;
  width: 100%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: none;
  flex-direction: column;
}

.dropdown-menu a {
  padding: 10px;
  box-sizing: border-box;

  text-decoration: none;
}

.dropdown-menu button {
  padding: 10px;
  box-sizing: border-box;

  background: none;
  border: none;
  text-align: left;
}

.dropdown-menu a:hover {
  background-color: #f1f1f1;
}

.dropdown-menu button:hover {
  background-color: #f1f1f1;
}

.dropdown-menu.show {
  display: flex;
}

/* sidomenyn reset vid bredare skärm*/
@media (min-width: 901px) {
  .navbar-frame2 {
    position: static;
    transform: none !important;
    display: flex !important;
    flex-direction: row;
    height: auto;
    box-shadow: none;
    padding: 0;
  }
}

/* Touch screen CSS */
@media screen and (max-width: 900px) {
  .navbar-icon {
    display: inline-flex;
  }
}

@media (max-width: 960px) {
  .navbar-icon {
    display: none !important;
  }
}

/* Mobilanpassning vid mindre skärmar */
@media screen and (max-width: 900px) {
  .navbar-container {
    flex-wrap: wrap;
    padding: 0.5rem 1rem;
    min-width: 100%;
  }

  .navbar-toggle {
    display: block;
    z-index: 50;
  }

  .navbar-frame {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    display: flex;
    padding-top: 0.5rem;
  }

  .navbar-frame2 {
    width: 100%;
    max-width: 300px;
    padding: 4rem;
  }

  .navbar-frame.active {
    display: flex;
    transform: translateX(0);
    transition: transform 0.3s ease-in;
  }

  .navbar-navigation,
  .navbar-navigation-actions {
    margin-top: 2rem;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.75rem;
  }

  .navbar-navigation a,
  .navbar-navigation-actions button {
    width: 100%;
    text-align: left;
  }

  .navbar-logo {
    margin-left: auto;
    margin-right: auto;
  }
}