/* UI6 Country / region selector for the Contact page and inquiry modal. */
#morgen-v6-root [data-morgen-country-label],
.mg-inquiry-modal--v6 [data-morgen-country-label] {
  min-width: 0;
}

#morgen-v6-root .morgen-country-control,
.mg-inquiry-modal--v6 .morgen-country-control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

/* Native fallback remains fully usable if either CDN is unavailable. */
#morgen-v6-root .morgen-country-control > select,
.mg-inquiry-modal--v6 .morgen-country-control > select {
  width: 100%;
  min-width: 0;
  padding-left: 56px !important;
  text-overflow: ellipsis;
  cursor: pointer;
}

#morgen-v6-root .morgen-country-flag,
.mg-inquiry-modal--v6 .morgen-country-flag {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  width: 32px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background-color: #f2f6f8;
  background-image: none;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(6, 43, 68, 0.12), 0 1px 4px rgba(4, 20, 30, 0.08);
  pointer-events: none;
  transform: translateY(-50%);
}

#morgen-v6-root .morgen-country-control:not(.has-country) .morgen-country-flag::before,
.mg-inquiry-modal--v6 .morgen-country-control:not(.has-country) .morgen-country-flag::before {
  position: absolute;
  inset: 5px 7px;
  border: 1.5px solid rgba(6, 43, 68, 0.46);
  border-radius: 50%;
  content: "";
}

#morgen-v6-root .morgen-country-control:not(.has-country) .morgen-country-flag::after,
.mg-inquiry-modal--v6 .morgen-country-control:not(.has-country) .morgen-country-flag::after {
  position: absolute;
  top: 11px;
  right: 7px;
  left: 7px;
  height: 1.5px;
  background: rgba(6, 43, 68, 0.46);
  content: "";
}

#morgen-v6-root .morgen-country-control.has-country .morgen-country-flag,
.mg-inquiry-modal--v6 .morgen-country-control.has-country .morgen-country-flag {
  background-image: url("../img/country-flags.png");
  background-position: var(--morgen-flag-x, 0) var(--morgen-flag-y, 0);
  background-size: 512px 384px;
}

#morgen-v6-root .morgen-country-control > select:disabled,
.mg-inquiry-modal--v6 .morgen-country-control > select:disabled {
  cursor: not-allowed;
}

/* Choices.js enhanced combobox. */
#morgen-v6-root .morgen-country-control.is-enhanced > .morgen-country-flag,
.mg-inquiry-modal--v6 .morgen-country-control.is-enhanced > .morgen-country-flag {
  display: none;
}

#morgen-v6-root .morgen-country-control .choices,
.mg-inquiry-modal--v6 .morgen-country-control .choices {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  color: inherit;
  font: inherit;
}

#morgen-v6-root .morgen-country-control .choices.is-open,
.mg-inquiry-modal--v6 .morgen-country-control .choices.is-open {
  z-index: 10040;
}

#morgen-v6-root .morgen-country-control .choices__inner,
.mg-inquiry-modal--v6 .morgen-country-control .choices__inner {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 47px;
  padding: 0 44px 0 14px;
  border: 1px solid #c8d7df;
  border-radius: 8px;
  background: #fff;
  color: #10212b;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

#morgen-v6-root .morgen-country-control .choices[data-type*="select-one"] .choices__inner,
.mg-inquiry-modal--v6 .morgen-country-control .choices[data-type*="select-one"] .choices__inner {
  padding-bottom: 0;
}

#morgen-v6-root .morgen-country-control .choices.is-focused .choices__inner,
#morgen-v6-root .morgen-country-control .choices.is-open .choices__inner,
.mg-inquiry-modal--v6 .morgen-country-control .choices.is-focused .choices__inner,
.mg-inquiry-modal--v6 .morgen-country-control .choices.is-open .choices__inner {
  border-color: #287fa5;
  box-shadow: 0 0 0 3px rgba(40, 127, 165, 0.14);
}

#morgen-v6-root .morgen-country-control.is-invalid .choices__inner,
.mg-inquiry-modal--v6 .morgen-country-control.is-invalid .choices__inner {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12);
}

#morgen-v6-root .morgen-country-control .choices.is-disabled .choices__inner,
.mg-inquiry-modal--v6 .morgen-country-control .choices.is-disabled .choices__inner {
  background: #eef2f4;
  cursor: not-allowed;
  opacity: 0.72;
}

#morgen-v6-root .morgen-country-control .choices__list--single,
.mg-inquiry-modal--v6 .morgen-country-control .choices__list--single {
  width: 100%;
  padding: 0;
}

#morgen-v6-root .morgen-country-control .choices__list--single .choices__item,
.mg-inquiry-modal--v6 .morgen-country-control .choices__list--single .choices__item {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 45px;
  gap: 10px;
  overflow: hidden;
  color: #10212b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#morgen-v6-root .morgen-country-control .choices__placeholder,
.mg-inquiry-modal--v6 .morgen-country-control .choices__placeholder {
  color: #7a8891;
  opacity: 1;
}

#morgen-v6-root .morgen-country-control .choices[data-type*="select-one"]::after,
.mg-inquiry-modal--v6 .morgen-country-control .choices[data-type*="select-one"]::after {
  right: 17px;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-width: 0 2px 2px 0;
  border-color: #315665;
  transform: rotate(45deg);
}

#morgen-v6-root .morgen-country-control .choices[data-type*="select-one"].is-open::after,
.mg-inquiry-modal--v6 .morgen-country-control .choices[data-type*="select-one"].is-open::after {
  margin-top: -1px;
  transform: rotate(225deg);
}

#morgen-v6-root .morgen-country-control .choices__list--dropdown,
#morgen-v6-root .morgen-country-control .choices__list[aria-expanded],
.mg-inquiry-modal--v6 .morgen-country-control .choices__list--dropdown,
.mg-inquiry-modal--v6 .morgen-country-control .choices__list[aria-expanded] {
  z-index: 10041;
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid #c8d7df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(5, 31, 45, 0.18);
}

#morgen-v6-root .morgen-country-control .choices__list--dropdown.is-flipped,
#morgen-v6-root .morgen-country-control .choices__list[aria-expanded].is-flipped,
.mg-inquiry-modal--v6 .morgen-country-control .choices__list--dropdown.is-flipped,
.mg-inquiry-modal--v6 .morgen-country-control .choices__list[aria-expanded].is-flipped {
  margin-top: 0;
  margin-bottom: 7px;
}

#morgen-v6-root .morgen-country-control .choices__input,
.mg-inquiry-modal--v6 .morgen-country-control .choices__input {
  box-sizing: border-box;
  width: calc(100% - 20px);
  margin: 10px;
  padding: 10px 12px;
  border: 1px solid #c8d7df;
  border-radius: 7px;
  background: #f8fbfc;
  color: #10212b;
  font: inherit;
}

#morgen-v6-root .morgen-country-control .choices__input:focus,
.mg-inquiry-modal--v6 .morgen-country-control .choices__input:focus {
  border-color: #287fa5;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(40, 127, 165, 0.12);
}

#morgen-v6-root .morgen-country-control .choices__list--dropdown .choices__list,
#morgen-v6-root .morgen-country-control .choices__list[aria-expanded] .choices__list,
.mg-inquiry-modal--v6 .morgen-country-control .choices__list--dropdown .choices__list,
.mg-inquiry-modal--v6 .morgen-country-control .choices__list[aria-expanded] .choices__list {
  max-height: min(310px, 48vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#morgen-v6-root .morgen-country-control .choices__item--choice,
.mg-inquiry-modal--v6 .morgen-country-control .choices__item--choice {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  padding: 10px 52px 10px 14px;
  color: #10212b;
  line-height: 1.25;
}

#morgen-v6-root .morgen-country-control .choices__item--choice.is-highlighted,
.mg-inquiry-modal--v6 .morgen-country-control .choices__item--choice.is-highlighted {
  background: #edf6fa;
  color: #0a4057;
}

#morgen-v6-root .morgen-country-control .choices__item--choice.is-selected,
.mg-inquiry-modal--v6 .morgen-country-control .choices__item--choice.is-selected {
  font-weight: 650;
}

#morgen-v6-root .morgen-country-control .choices__notice,
.mg-inquiry-modal--v6 .morgen-country-control .choices__notice {
  padding: 16px;
  color: #5f6f78;
}

#morgen-v6-root .morgen-country-choice__visual,
.mg-inquiry-modal--v6 .morgen-country-choice__visual {
  position: relative;
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 21px;
  overflow: hidden;
  border-radius: 3px;
  background: #eef3f5;
  box-shadow: inset 0 0 0 1px rgba(6, 43, 68, 0.12);
}

#morgen-v6-root .morgen-country-choice__svg,
.mg-inquiry-modal--v6 .morgen-country-choice__svg {
  display: none;
  width: 28px;
  height: 21px;
  background-size: cover;
  background-position: center;
}

#morgen-v6-root .morgen-country-choice__sprite,
.mg-inquiry-modal--v6 .morgen-country-choice__sprite {
  display: none;
  width: 28px;
  min-width: 28px;
  height: 21px;
  background-image: url("../img/country-flags.png");
  background-position: var(--morgen-choice-flag-x, 0) var(--morgen-choice-flag-y, 0);
  background-repeat: no-repeat;
  background-size: 448px 336px;
}

#morgen-v6-root .morgen-country-choice__visual.has-sprite .morgen-country-choice__sprite,
.mg-inquiry-modal--v6 .morgen-country-choice__visual.has-sprite .morgen-country-choice__sprite {
  display: inline-block;
}

#morgen-v6-root .morgen-country-choice__visual.has-sprite .morgen-country-choice__emoji,
.mg-inquiry-modal--v6 .morgen-country-choice__visual.has-sprite .morgen-country-choice__emoji {
  display: none;
}

#morgen-v6-root .morgen-country-choice__emoji,
.mg-inquiry-modal--v6 .morgen-country-choice__emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 21px;
  overflow: hidden;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

html.morgen-country-flags-svg #morgen-v6-root .morgen-country-choice__svg,
html.morgen-country-flags-svg .mg-inquiry-modal--v6 .morgen-country-choice__svg {
  display: inline-block;
}

html.morgen-country-flags-svg #morgen-v6-root .morgen-country-choice__sprite,
html.morgen-country-flags-svg .mg-inquiry-modal--v6 .morgen-country-choice__sprite,
html.morgen-country-flags-svg #morgen-v6-root .morgen-country-choice__emoji,
html.morgen-country-flags-svg .mg-inquiry-modal--v6 .morgen-country-choice__emoji {
  display: none;
}

#morgen-v6-root .morgen-country-choice__code,
.mg-inquiry-modal--v6 .morgen-country-choice__code {
  position: absolute;
  right: 14px;
  color: #6b7c85;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

@media (max-width: 760px) {
  #morgen-v6-root .morgen-country-control > select,
  .mg-inquiry-modal--v6 .morgen-country-control > select {
    padding-left: 54px !important;
  }

  #morgen-v6-root .morgen-country-control .choices__list--dropdown .choices__list,
  #morgen-v6-root .morgen-country-control .choices__list[aria-expanded] .choices__list,
  .mg-inquiry-modal--v6 .morgen-country-control .choices__list--dropdown .choices__list,
  .mg-inquiry-modal--v6 .morgen-country-control .choices__list[aria-expanded] .choices__list {
    max-height: min(280px, 42vh);
  }
}
