.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: block;
}

.dropdown-toggle:focus {
  outline: 0;
}

.dropdown-menu {
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  background-color: #fff;
  border: 1px solid #ccc;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  display: none;
  float: left;
  font-size: 14px;
  left: 0;
  list-style: none;
  margin: 2px 0 0;
  min-width: 160px;
  padding: 5px 0;
  position: absolute;
  text-align: left;
  top: 100%;
  z-index: 1000;
}

.dropdown-menu.pull-right {
  left: auto;
  right: 0;
}

.dropdown-menu .divider {
  background-color: #e5e5e5;
  height: 1px;
  margin: 9px 0;
  overflow: hidden;
}

.dropdown-menu > li > a {
  clear: both;
  color: #333;
  display: block;
  font-weight: normal;
  line-height: 1.42857143;
  padding: 3px 20px;
  white-space: nowrap;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
  background-color: #f5f5f5;
  color: #262626;
  text-decoration: none;
}

.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
  background-color: #337ab7;
  color: #fff;
  outline: 0;
  text-decoration: none;
}

.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
  color: #777;
}

.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
  background-color: transparent;
  background-image: none;
  cursor: not-allowed;
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  text-decoration: none;
}

.open > .dropdown-menu {
  display: block;
}

.open > a {
  outline: 0;
}

.dropdown-menu-right {
  left: auto;
  right: 0;
}

.dropdown-menu-left {
  left: 0;
  right: auto;
}

.dropdown-header {
  color: #777;
  display: block;
  font-size: 12px;
  line-height: 1.42857143;
  padding: 3px 20px;
  white-space: nowrap;
}

/* .dropdown-backdrop {
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 990;
} */

.pull-right > .dropdown-menu {
  left: auto;
  right: 0;
}

.dropup .dropdown-menu,
.navbar-fixed-bottom .dropdown .dropdown-menu {
  bottom: 100%;
  margin-bottom: 2px;
  top: auto;
}

.dropup .caret,
.navbar-fixed-bottom .dropdown .caret {
  border-bottom: 4px dashed;
  border-bottom: 4px solid \9;
  border-top: 0;
  content: '';
}

.dropup .caret,
.navbar-fixed-bottom .dropdown .caret {
  border-bottom: 4px solid;
  border-top: 0;
}

@media (min-width: 768px) {
  .dropdown .dropdown-toggle {
    display: none !important;
  }

  .navbar-right .dropdown-menu {
    left: auto;
    right: 0;
  }
  .navbar-right .dropdown-menu-left {
    left: 0;
    right: auto;
  }
  .dropdown .dropdown-menu {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: inline-flex !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    width: auto !important;
  }

  .dropdown .dropdown-menu > li {
    display: block;
    margin-right: 10px; /* Add spacing between items */
    margin-top: 0;
  }

  .dropdown .dropdown-menu > li:last-child {
    margin-right: 0;
  }

  .dropdown .dropdown-menu > li > a {
    border-radius: 4px;
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    white-space: nowrap;
  }

  .dropdown .dropdown-menu > li > a:hover {
    background-color: transparent;
    color: #333;
  }

  .dropdown .dropdown-menu > li.disabled > a {
    color: #999;
    cursor: not-allowed;
  }

  .dropdown .dropdown-menu > li.disabled > a:hover {
    background-color: transparent;
    color: #999;
  }
}

/* Mobile - Keep default dropdown behavior */
@media (max-width: 767px) {
  .dropdown .dropdown-menu {
    /* Bootstrap's default dropdown styles remain intact on mobile */
    display: none; /* Hidden by default, shown when .open class is added */
  }

  .open > .dropdown-menu {
    display: block;
  }
}
