@import url("../../utils/palette_v2-xqjh14X.css");
@import url("../../utils/breakpoints-fRdcjGc.css");

[data-controller~="back--topbar"] {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--palette_v2-green-1);
  padding: 0 1rem;
  position: relative;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */

  &.dev {
    background-color: #C9A6BB;

    .topbar-center .topbar-nav .topbar-item .topbar-dropdown {
      background-color: #C9A6BB;
    }
  }

  .topbar-center {
    nav {
      display: flex;
    }

    .topbar-nav {
      display: flex;
      list-style-type: none;
      margin: 0;
      padding: 0;

      .topbar-item {
        position: relative;
        font-weight: 500;
        text-transform: capitalize;

        &.active > a {
          font-weight: 600;
          background-color: rgba(255, 255, 255, 0.25);
          color: var(--palette_v2-blue_9);
        }

        a {
          display: block;
          box-sizing: border-box;
          color: var(--palette_v2-blue_9);
          text-decoration: none;
          padding: 0.75rem 0.8rem;
          transition: background-color 0.2s ease, color 0.2s ease;
          border-radius: 4px;

          &.dropdown-toggle::after {
            display: none;
          }

          &:hover {
            background-color: rgba(255, 255, 255, 0.2);
            color: var(--palette_v2-blue_5);
          }
        }

        .topbar-dropdown {
          display: none;
          position: absolute;
          top: 100%;
          left: 0;
          min-width: 180px;
          background-color: var(--palette_v2-green-1);
          padding: 0;
          margin: 0;
          list-style-type: none;
          box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
          border-radius: 4px;

          li {
            margin: 0;
            padding: 0;

            a {
              display: block;
              padding: 0.5rem 1rem;
              color: var(--palette_v2-blue_9);
              border-bottom: 1px solid rgba(0, 0, 0, 0.05);

              &:hover {
                background-color: rgba(255, 255, 255, 0.15);
                color: var(--palette_v2-blue_5);
              }
            }

            &:last-child a {
              border-bottom: none;
            }
          }
        }

        /* Display dropdown on hover (simple CSS approach).
           For an accessible approach, you'd add a JS-based toggle, aria attributes, etc. */

        &:hover {
          .topbar-dropdown {
            display: block;
          }
        }
      }
    }
  }

  .topbar-right {
    display: flex;
    align-items: center;

    .topbar-user-link {
      color: var(--palette_v2-blue_9);
      text-decoration: none;
      font-weight: 500;
      padding: 0.5rem 0.75rem;
      border-radius: 4px;
      transition: background-color 0.2s ease, color 0.2s ease;

      &:hover {
        background-color: rgba(255, 255, 255, 0.2);
        color: var(--palette_v2-blue_5);
      }
    }
  }
}
