/* Buttons */
.btndrop,
.btndrop2 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  column-gap: var(--gap);
  padding: 0.7rem;
  cursor: pointer;
  border: none;
  position: relative;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  -webkit-tap-highlight-color: transparent;
}

.top-dropdowns {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0;
  margin-top: -40px;
  margin-right: 20px;
}

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

.bxmenu,
.bxmenu2 {
  font-size: 1.1rem;
}

/* Dropdown containers */
.dropdownmenu,
.dropdownmenu2 {
  position: absolute;
  margin-top: 0.3rem;
  border-radius: 5px;
  background-color: #fff;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition:
    opacity 0.1s cubic-bezier(0.16, 1, 0.5, 1),
    visibility 0.1s cubic-bezier(0.16, 1, 0.5, 1),
    transform 0.1s cubic-bezier(0.16, 1, 0.5, 1);
  box-shadow: 0 15px 15px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  text-align: left;
  overflow: hidden;
}

.dropdownmenu {
  width: 220px;
}

.dropdownmenu2 {
  width: 300px;
}

/* Show dropdown */
.dropdownmenu.showmenu,
.dropdownmenu2.showmenu2 {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Dropdown items */
.dropdownmenu a,
.dropdownmenu p,
.dropdownmenu2 a,
.dropdownmenu2 p {
  display: block;
  padding: 0.8rem 1.2rem;
  color: #333;
  background-color: #fff;
  font-size: 16px;
  text-decoration: none;
  box-sizing: border-box;
}

/* Dropdown links */
.dropdownmenu a,
.dropdownmenu2 a {
  position: relative;
  padding-left: 1.4rem;
  font-weight: normal !important;
  transition:
    background-color 0.2s ease-in-out,
    color 0.2s ease-in-out,
    text-indent 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out;
}

/* Section titles */
.dropdownmenu p,
.dropdownmenu2 p {
  margin-bottom: 0;
  padding-top: 15px;
  padding-bottom: 5px;
  font-weight: 600;
  border-top: 1px solid #e0e0e0;
}

/* Left animated bar */
.dropdownmenu a::before,
.dropdownmenu2 a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: #0056b3;
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.2s ease-in-out;
}

/* Hover / focus */
.dropdownmenu a:hover,
.dropdownmenu a:focus,
.dropdownmenu2 a:hover,
.dropdownmenu2 a:focus {
  background-color: #f0f0f0;
  color: #0056b3;
  text-indent: 4px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.dropdownmenu a:hover::before,
.dropdownmenu a:focus::before,
.dropdownmenu2 a:hover::before,
.dropdownmenu2 a:focus::before {
  transform: scaleY(1);
}

/* Arrow rotation */
.arrowmenu,
.arrowmenu2 {
  transform: rotate(180deg);
  transition: 0.2s ease;
}

/* Toggle variables */
#mode + .track,
#mode2 + .track2 {
  --es-w: 300px;
  --es-h: 24px;
  --es-pad: 3px;
  --es-font: 12.5px;
  --es-radius: 999px;

  --es-track: #e5e7eb;
  --es-accent: #008aff;
  --es-muted: #6b7280;
}

/* Toggle track */
#mode + .track,
#mode2 + .track2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative;
  width: var(--es-w);
  height: var(--es-h);
  padding: var(--es-pad);
  background: var(--es-track);
  border-radius: var(--es-radius);
  user-select: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Hidden checkbox */
#mode,
#mode2 {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* Toggle labels */
#mode + .track .option,
#mode2 + .track2 .option2 {
  z-index: 1;
  padding: 0 0.5rem;
  color: var(--es-muted);
  font-size: var(--es-font);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

/* Active label colors */
#mode:not(:checked) + .track .option.left,
#mode2:not(:checked) + .track2 .option2.left2 {
  color: #fff;
}

#mode:checked + .track .option.right,
#mode2:checked + .track2 .option2.right2 {
  color: #fff;
}

/* Toggle thumb */
#mode + .track .thumb,
#mode2 + .track2 .thumb2 {
  position: absolute;
  inset: var(--es-pad);
  width: calc(50% - var(--es-pad));
  background: var(--es-accent);
  border-radius: var(--es-radius);
  transform: translateX(0);
  transition: transform 0.2s ease;
}

#mode:checked + .track .thumb,
#mode2:checked + .track2 .thumb2 {
  transform: translateX(100%);
}

/* Focus ring */
#mode:focus + .track,
#mode2:focus + .track2 {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* Mobile */
@media (max-width: 767px) {
  .top-dropdowns {
    margin-top: 0;
    margin-right: 0;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }

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

  .btndrop,
  .btndrop2 {
    font-size: 13px;
    padding: 0.6rem;
  }

  .dropdownmenu,
  .dropdownmenu2 {
    left: 0;
    right: auto;
    margin-left: 0;
    max-width: calc(100vw - 20px);
  }

  .dropdownmenu {
    width: 220px;
  }

  .dropdownmenu2 {
    width: 280px;
  }

  #mode + .track,
  #mode2 + .track2 {
    --es-w: 260px;
    --es-font: 11.5px;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .dropdownmenu,
  .dropdownmenu2 {
    width: calc(100vw - 20px);
  }

  #mode + .track,
  #mode2 + .track2 {
    --es-w: 240px;
    --es-font: 11px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dropdownmenu,
  .dropdownmenu2,
  .dropdownmenu a,
  .dropdownmenu2 a,
  .dropdownmenu a::before,
  .dropdownmenu2 a::before,
  .arrowmenu,
  .arrowmenu2,
  #mode + .track .thumb,
  #mode2 + .track2 .thumb2 {
    transition: none;
  }
}