.country-dropdown-enhanced {
  position: relative;
  display: block;
  width: max-content;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.country-dropdown-enhanced > span {
  display: none;
}

.country-dropdown-enhanced > select.country-dropdown-native {
  position: absolute;
  inset: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.country-dropdown-trigger {
  display: flex;
  width: 100%;
  min-width: 7.7rem;
  height: 36px;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(15, 32, 36, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  cursor: pointer;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: left;
}

.country-dropdown--sector .country-dropdown-trigger {
  min-width: 15rem;
  gap: 12px;
}

.country-dropdown-trigger:hover,
.country-dropdown-trigger:focus-visible,
.country-dropdown-trigger[aria-expanded="true"] {
  border-color: rgba(0, 65, 79, 0.28);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
}

.country-dropdown-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.country-dropdown-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-dropdown-chevron {
  flex: none;
  color: var(--heading);
  font-size: 13px;
  opacity: 0.82;
  transform: translateY(-1px);
  transition: transform 120ms ease;
}

.country-dropdown-trigger[aria-expanded="true"] .country-dropdown-chevron {
  transform: translateY(1px) rotate(180deg);
}

.country-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  display: grid;
  width: 100%;
  min-width: 7rem;
  max-height: 28rem;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid rgba(15, 32, 36, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 35px rgba(15, 32, 36, 0.16);
  scrollbar-color: rgba(0, 65, 79, 0.38) transparent;
  scrollbar-width: thin;
}

.country-dropdown--sector .country-dropdown-menu {
  width: max(100%, 20rem);
}

.country-dropdown-menu[hidden] {
  display: none;
}

.country-dropdown-option {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
}

.country-dropdown-option:hover,
.country-dropdown-option:focus-visible {
  background: rgba(255, 104, 77, 0.1);
  color: var(--heading);
  outline: none;
}

.country-dropdown-option[aria-selected="true"] {
  background: rgba(255, 104, 77, 0.14);
  color: var(--heading);
  font-weight: 700;
}

.country-dropdown-option:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.panel:has(.country-dropdown-trigger[aria-expanded="true"]) {
  position: relative;
  z-index: 50;
  overflow: visible;
}

@media (max-width: 560px) {
  .country-dropdown-enhanced,
  .country-dropdown--sector .country-dropdown-trigger {
    max-width: 100%;
  }

  .country-dropdown--sector .country-dropdown-menu {
    width: min(20rem, calc(100vw - 44px));
  }

  .country-dropdown-menu {
    max-height: 22rem;
  }
}

@media (max-width: 700px), (pointer: coarse) {
  .country-dropdown-trigger,
  .country-dropdown-option {
    min-height: 44px;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .country-dropdown-chevron {
    transition: none;
  }
}
