:root {
  --catalog-name-max-width: 180px;
  --user-email-max-width: 150px;
}

* {
  font-family: 'Roboto', 'sans-serif'
}
body {
  margin: 0px 10px;
}
.content_block {
  max-width: 500px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 10px;
}


.catalog_list {
  padding: 0px;
  margin: 0px;
}

.main_header a {
  color: black;
}
.header a:visited {
  color: black;
}
.main_header, a:visited {
  color: black;
}
.catalog_item {
  margin: 10px 10px;
  display: inline-block;
}
.catalog_error {
  color: red;
  padding: 10px;
}

.header {
  /* Use your existing styles */
  display: flex;
  padding: 10px 0px;
  margin: 0px 0px 16px;
  border-bottom: 1px solid rgb(204, 204, 204);
  /* Add new styles for alignment */
  justify-content: space-between;
  align-items: center;
  position: relative; /* For positioning the mobile nav */
}

/* Remove old header div margins */
.header div {
  margin: 0;
}


/* New Burger Menu Styles */
.burger-menu {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.burger-menu span {
  width: 2rem;
  height: 0.25rem;
  background: #333;
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

/* Mobile Navigation Styles */
.header-nav {
  display: none; /* Hidden by default */
  z-index: 100;
  flex-direction: column;
  align-items: flex-start; /* Aligns items to the left */
  background: white;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
}
.header-nav a {
  padding: 10px 0px;
  width: 100%;
}

.header-nav a:last-of-type {
  border-bottom: 1px solid rgb(204, 204, 204);
}

.header-nav.is-active {
  border-top: 1px solid rgb(204, 204, 204);
  display: flex; /* Show when active */
  border-bottom: 1px solid rgb(204, 204, 204);
}

/* Text Truncation Styles */
.catalog-name {
  display: inline-block;
  max-width: var(--catalog-name-max-width);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  display: inline-block;
  max-width: var(--user-email-max-width);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

@media only screen and (min-width: 900px) {
  .content_block {
    max-width: 100%;
  }
}
@media only screen and (max-width: 768px) {
  .user-menu {
    padding: 10px 0px
  }
}

@media (min-width: 768px) {
  .burger-menu {
    display: none; /* Hide burger on large screens */
  }

  .header-nav {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    border: none;
    width: auto;
    gap: 1.5rem;
    padding: 0;
    align-items: center;
  }
  .header-nav.is-active {
    border: none;
  }

  .header-nav a[id] {
    padding: 0px;
    border: none;
  }
}

.add_form option {
  padding: 10px 5px;
}
.add_form select {
  margin: 10px 0px;
  width: 100%;
  box-sizing: border-box;
  font-size: 19px;
}

.add_form input {
  margin: 10px 0px;
  padding: 10px 5px;
  width: 100%;
  box-sizing: border-box;
  font-size: 19px;
}
.add_form label {
  display: block;
}

.header div:last-child { 
  margin-left: auto;
}

.catalog_actions, .catalog_list {
  margin: 0px -10px;
}
.catalog_actions .catalog_item_button_small {
  margin: 10px;
}

.catalog_item_button {
  cursor: pointer;
  font-size: 20px;
  border: 1px solid #111;
  background: #eee;
  text-decoration: none;
  padding: 5px 10px;
  color: black;
}

.catalog_item_button_small {
  cursor: pointer;
  font-size: 15px;
  border: 1px solid #111;
  background: #eee;
  text-decoration: none;
  padding: 3px 5px;
  color: black;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Reduced gap for better fit */
}

.user-menu span {
    color: #333;
}
