/* Custom Multiselect Dropdown - CSS Only */
.custom-multiselect {
  position: relative;
  width: 100%;
  height: 50px; /* Match the toggle height */
}

/* Hide the toggle checkbox */
.multiselect-toggle-input {
  display: none;
}

/* Main toggle button styling - match custom-select dimensions */
.multiselect-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 36px 12px 16px;
  border-radius: 68px;
  border: 1px solid rgba(24, 2, 40, .15);
  background: #ffffff;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  color: #180228;
  cursor: pointer;
  transition: color .3s linear, border .3s linear;
  position: relative;
  box-sizing: border-box;
}

.multiselect-toggle:hover {
  border-color: rgba(24, 2, 40, .25);
}

.multiselect-text {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiselect-arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 9px;
  background-image: url(/images/chevron-down.svg);
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform .3s linear;
  pointer-events: none;
}

/* When toggle is checked (dropdown open) */
.multiselect-toggle-input:checked + .multiselect-toggle {
  border-color: rgba(24, 2, 40, .25);
}

.multiselect-toggle-input:checked + .multiselect-toggle .multiselect-arrow {
  transform: translateY(-50%) rotate(-180deg);
}

/* Dropdown styling */
.multiselect-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(24, 2, 40, .15);
  border-radius: 24px;
  margin: 4px 0 0;
  padding: 3px;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all .3s linear;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Show dropdown when toggle is checked */
.multiselect-toggle-input:checked ~ .multiselect-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.multiselect-options {
  display: flex;
  flex-direction: column;
}

.multiselect-option {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  border-radius: 64px;
  cursor: pointer;
  transition: all .3s linear;
  margin: 0;
}

.multiselect-option:hover {
  background: #f2f3f5;
}

/* Hide default checkboxes */
.multiselect-option input[type="checkbox"] {
  display: none;
}

/* Custom checkbox styling */
.checkmark {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(24, 2, 40, .3);
  border-radius: 4px;
  margin-right: 12px;
  transition: all .3s ease;
  flex-shrink: 0;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Checked state */
.multiselect-option input[type="checkbox"]:checked + .checkmark {
  background-color: #9d4edd;
  border-color: #9d4edd;
}

.multiselect-option input[type="checkbox"]:checked + .checkmark:after {
  display: block;
}

/* Focus states for accessibility */
.multiselect-option input[type="checkbox"]:focus + .checkmark {
  border-color: #9d4edd;
  box-shadow: 0 0 0 2px rgba(157, 78, 221, 0.2);
}

@media screen and (min-width: 1400px) {
    
  .custom-multiselect {
    height: 44px;
    width: 200px;
  }
  
  .multiselect-toggle {
    padding: 10px 30px 10px 14px;
    height: 44px;
    min-height: 44px;
    font-size: 14px;
  }
  
  .multiselect-arrow {
    right: 14px;
    width: 10px;
    height: 8px;
  }
  
  .multiselect-option {
    padding: 6px 14px;
    font-size: 14px;
  }
  
  .checkmark {
    width: 16px;
    height: 16px;
    margin-right: 10px;
  }
  
  .checkmark:after {
    left: 4px;
    top: 1px;
    width: 3px;
    height: 7px;
  }
}