.sub-location__btn {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 15px;
  text-indent: -9999em;
  background-image: url(/assets/xmark-solid.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
  width: 30px;
  height: 30px;
  overflow: hidden;
}
.checkbox {
  position: relative;
  background-color: #fff;
}
.checkbox.is-tooltip-open {
  z-index: 3;
}
.checkbox--has-sub-locations {
  position: relative;
  overflow: initial;
}
.faux-selector + .checkboxes-content {
  overflow: initial;
}
.faux-selector.is-open + .checkboxes-content .checkboxes {
	max-height: initial !important;
	overflow: initial !important;
}

.sub-locations .checkbox__label::before,
.checkbox__label::before {
  border-radius: 2px;
}
.checkbox__checkbox:checked ~ .checkbox__label::before {
  background: #fff url(/assets/check-energyblue.svg) no-repeat center / 16px 16px;
  box-shadow: none;
}
.checkbox--semi-checked .checkbox__checkbox ~ .checkbox__label::before {
  background: #fff url(/assets/check-energyblue-outline.svg) no-repeat center / 16px 16px;
  border-color: #3567f6;
  box-shadow: none;
}

.sub-locations-container {
  position: absolute;
  left: 240px;
  bottom: 0;
  width: 100%;
  max-width: 600px;
  opacity: 0;
  pointer-events: none; 
  z-index: 9;
}
.checkbox.is-tooltip-open + .sub-locations-container {
  opacity: 1;
  pointer-events: all;
}

[data-popper-arrow] {
  z-index: 10;
}
.sub-locations-container[data-popper-placement="top"] div[data-popper-arrow] {
  width: 28px;
  height: 24px;
  background: url(/assets/tippy-arrow_down.png) no-repeat center;
  bottom: -23px;
}
.sub-locations-container[data-popper-placement="right"] div[data-popper-arrow] {
  width: 24px;
  height: 28px;
  background: url(/assets/tippy-arrow_left.png) no-repeat center right;
  left: -23px;
}
.sub-locations-container[data-popper-placement="bottom"] div[data-popper-arrow] {
  width: 28px;
  height: 24px;
  background: url(/assets/tippy-arrow_up.png) no-repeat center;
  top: -23px;
}
.sub-locations-container[data-popper-placement="left"] div[data-popper-arrow] {
  width: 24px;
  height: 28px;
  background: url(/assets/tippy-arrow_right.png) no-repeat center left;
  right: -23px;
}

.sub-locations {
  background: #fff; 
  z-index: 2; 
  width: 100%;
  border: 1px solid #e0e0e0; 
  border-radius: 5px;
  padding: 15px;
  transform: translateX(-10px); /* Fix bug with Popper causing modal to be not centered on mobile */
}
.sub-locations ol {
  text-align: left;
}
.sub-locations > ol > li > label {
  display: block;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
  font-size: 18px;
  color: #272727;
}
.sub-locations > ol > li > ol > li {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}
.sub-locations > ol > li > ol > li + li {
  border-top: 1px solid #e0e0e0;
}
.sub-locations > ol > li > ol > li > label {
  width: 340px;
  color: #272727;
  margin-bottom: 4px;
}
.sub-locations > ol > li > ol > li > ol {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.sub-locations > ol > li > ol > li > ol > li {
  width: 49%;
}
.sub-locations .checkbox__label {
  align-items: flex-start;
  font-size: 1.7rem;
}
.checkbox__label--l1::before,
.checkbox__label--l2::before,
.checkbox__label--l3::before {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-right: 8px;
  margin-top: 6px;
}
.checkbox__checkbox:checked ~ .checkbox__label--l1::before,
.checkbox__checkbox:checked ~ .checkbox__label--l2::before,
.checkbox__checkbox:checked ~ .checkbox__label--l3::before {
  background: #fff url(/assets/check-energyblue.svg) no-repeat center / 12px 12px;
  box-shadow: none;
}

.sub-locations .checkbox__label--l1 {
  font-size: 1.8rem;
}
.sub-locations .checkbox__label--l3 {
  color: #777;
  font-size: 1.6rem;
}

.checkbox__selected-vals {
  display: block;
  text-align: left;
  padding-left: 44px;
  color: #777;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #ccc;
}
.checkbox__selected-vals[disabled] {
  color: #ddd;
  text-decoration-color: #ddd;
}
.checkboxes-content::before {
	content: "";
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: rgba(0,0,0,0.6);
	transition: opacity 300ms ease;
	opacity: 0;
	pointer-events: none;
	z-index: 2;
}
.checkboxes-content.is-tooltip-open::before {
  opacity: 1;
  pointer-events: all;
}

@media (min-width: 576px) {
  .sub-locations > ol > li > ol > li {
    flex-direction: row;
  }
  .sub-locations {
    transform: translateX(0);
  }
}