.jgo-rate-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  margin: 3px 0;
}
.jgo-rate-badge {
  display: inline-block;
  position: relative;
  isolation: isolate;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.jgo-rate-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: currentColor;
  opacity: 0.12;
  pointer-events: none;
}
.jgo-rate-badge.is-cheapest {
  color: var(--wc-green);
}
.jgo-rate-badge.is-fastest {
  color: var(--wc-red);
}

:root {
  --jgo-color-primary: #3858e9;
  --jgo-color-border: #949494;
  --jgo-color-text: #1e1e1e;
  --jgo-color-muted: #646970;
  --jgo-color-background: #fff;
  --jgo-color-disabled-background: #f6f7f7;
  --jgo-spinner-track-color: #dcdcde;
}

@keyframes jgo-loading-spin {
  to {
    transform: rotate(360deg);
  }
}
.jgo-location-status--loading::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid var(--jgo-spinner-track-color);
  border-top-color: var(--jgo-color-primary);
  border-radius: 50%;
  animation: jgo-loading-spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .jgo-location-status--loading::before {
    animation: none;
  }
}

.jgo-is-hidden-field {
  display: none !important;
}

/* The hidden provider IDs accompany the visible SelectWoo Location control. */
.jgo-location-field select.jgo-location-value {
  display: none !important;
}
.jgo-location-field .jgo-autocomplete {
  width: 100%;
}
.jgo-location-field .select2-container {
  width: 100% !important;
}
.jgo-location-field .select2-container--default .select2-selection--single {
  min-height: 40px;
  border: 1px solid var(--jgo-color-border);
  border-radius: 2px;
  background: var(--jgo-color-background);
}
.jgo-location-field .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 12px;
  padding-right: 32px;
  line-height: 38px;
  color: var(--jgo-color-text);
}
.jgo-location-field .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px;
  right: 4px;
}
.jgo-location-field .select2-container--default.select2-container--disabled .select2-selection--single {
  background: var(--jgo-color-disabled-background);
}
.jgo-location-field .select2-container--focus .select2-selection--single, .jgo-location-field .select2-container--open .select2-selection--single {
  border-color: var(--jgo-color-primary);
  box-shadow: 0 0 0 1px var(--jgo-color-primary);
}

.jgo-location-group .jgo-location-status {
  color: var(--jgo-color-muted);
  font-size: 13px;
}
.jgo-location-group--single > .jgo-admin-field:nth-of-type(2),
.jgo-location-group--single > .jgo-admin-field:nth-of-type(3) {
  display: none;
}
.jgo-location-group select.jgo-location-value {
  display: none !important;
}

.jgo-location-dropdown {
  border-color: var(--jgo-color-border);
  border-radius: 2px;
}
.jgo-location-dropdown .select2-search--dropdown .select2-search__field {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--jgo-color-border);
  border-radius: 2px;
}
.jgo-location-dropdown .loading-results::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid var(--jgo-spinner-track-color);
  border-top-color: var(--jgo-color-primary);
  border-radius: 50%;
  animation: jgo-loading-spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .jgo-location-dropdown .loading-results::before {
    animation: none;
  }
}
.jgo-location-dropdown .select2-results__option {
  padding: 8px 12px;
}

/* Keep provider delivery timing readable below the courier and rate. */
.jgo-shipping-estimate {
  display: block;
  margin-top: 3px;
  color: var(--jgo-color-muted);
  font-size: 12px;
  line-height: 1.4;
}