.hg-country-editor {
  padding: 20px!important;
  margin: 18px 0!important;
  min-width: 0;
  grid-column: 1/-1;
  border: 1px solid #d9e3ef!important;
  border-radius: 14px!important;
}

.hg-country-editor p {
  font-size: 13px;
  line-height: 1.6;
  color: #596d83;
}

.hg-country-editor [hidden] {
  display: none!important;
}

.hg-country-editor [data-hg-country-controls] {
  margin-top: 16px;
}

.hg-continent-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 12px 0 18px;
}

.hg-continent-buttons button {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px!important;
  min-height: 40px!important;
  height: auto!important;
  line-height: 1.4!important;
  border: 1px solid #c7d7eb!important;
  border-radius: 9px!important;
  background: #f1f6fd!important;
  color: #194a83!important;
  cursor: pointer;
}

.hg-country-picker {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 16px;
  margin-top: 12px;
}

.hg-country-picker>div {
  min-width: 0;
}

.hg-country-picker h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.hg-country-checklist {
  height: 240px;
  overflow: auto;
  border: 1px solid #cbd8e8;
  border-radius: 10px;
  padding: 5px;
  background: #fff;
}

.hg-country-checklist label {
  display: flex!important;
  grid-template-columns: none!important;
  align-items: center;
  gap: 10px!important;
  cursor: pointer;
  padding: 10px!important;
  margin: 0!important;
  border-radius: 6px;
  font-size: 13px!important;
  line-height: 1.4!important;
}

.hg-country-checklist label:has(:checked) {
  background: #e5efff;
  color: #164c95;
  font-weight: 650;
}

.hg-country-checklist input {
  width: 17px!important;
  height: 17px!important;
  min-height: 0!important;
  margin: 0!important;
  flex: none;
}

.hg-country-chips {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 7px;
  max-height: 240px;
  overflow: auto;
}

.hg-country-chips button {
  border: 1px solid #bdcfea;
  background: #eaf2ff;
  color: #194c8b;
  border-radius: 18px;
  padding: 7px 10px!important;
  min-height: 34px!important;
  height: auto!important;
  line-height: 1.4!important;
  font-size: 12px;
  cursor: pointer;
}

.hg-country-summary {
  margin-bottom: 10px!important;
  font-weight: 650;
}

.hg-photo-crop {
  touch-action: none;
  cursor: grab;
}

.hg-photo-crop:active {
  cursor: grabbing;
}

.hg-photo-crop img {
  pointer-events: none;
  user-select: none;
}

.hg-crop-hint {
  font-size: 12px;
  color: #60738b;
}

.hg-zoom-control {
  display: grid;
  gap: 6px;
}

.hg-vendor-apply {
  width: min(1100px,calc(100% - 19px));
  margin: 24px auto;
  padding: clamp(16px,4vw,36px);
  background: #fff;
  border: 1px solid #dce4ee;
  border-radius: 20px;
  box-sizing: border-box;
}

.hg-vendor-apply h2 {
  font-size: 28px;
  line-height: 1.2;
}

.hg-vendor-apply input,
.hg-vendor-apply select,
.hg-vendor-apply textarea {
  border: 1px solid #c3cfdd;
  border-radius: 9px;
  padding: 11px 13px;
  min-height: 44px;
  font: inherit;
  line-height: 1.5;
  max-width: 100%;
  box-sizing: border-box;
}

.hg-vendor-apply form>label {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.hg-vendor-apply button,
.hg-vendor-apply .hg-action-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 9px;
  padding: 12px 18px;
  min-height: 44px;
  height: auto;
  background: #1748a5;
  color: #fff;
  font: inherit;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
}

.hg-vendor-apply [type=checkbox],
.hg-vendor-apply [type=radio] {
  min-height: 0;
  padding: 0;
}

.hg-vendor-apply .hg-feedback {
  background: #eef6ff;
  border: 1px solid #c6dcf5;
  color: #214d7c;
  padding: 14px;
  border-radius: 9px;
  margin: 16px 0;
}

.hg-vendor-apply .hg-feedback--error {
  background: #fff4f2;
  border-color: #ecc8c2;
  color: #8b2d23;
}

.hg-template-choice .hg-store-card {
  pointer-events: none;
}

.hg-template-choice .hg-store-card h3 {
  font-size: 13px!important;
}

.hg-template-choice .hg-store-card-copy {
  padding: 7px;
}

.hg-template-choice .hg-store-card-offers {
  gap: 5px;
}

.hg-template-choice .hg-store-card-offers img,
.hg-template-choice .hg-mini-offer-placeholder {
  max-height: 65px;
}

@media(max-width:640px) {
  .hg-country-picker {
    grid-template-columns: 1fr;
  }

  .hg-country-picker>div:last-child {
    grid-row: 1;
  }

  .hg-country-chips {
    max-height: 120px;
  }

  .hg-country-editor {
    padding: 14px!important;
  }

  .hg-continent-buttons {
    gap: 8px;
  }

  .hg-zoom-control {
    display: none!important;
  }

  .hg-vendor-apply .hg-offer-section {
    grid-template-columns: minmax(0,1fr);
  }
}

/* Native radio controls remain keyboard-accessible; the selected card carries the visible state. */

:is(.hg-template-sample,.hg-template-choice) {
  position: relative;
}

:is(.hg-template-sample,.hg-template-choice)>input[type=radio] {
  position: absolute!important;
  inset: 0 auto auto 0!important;
  width: 1px!important;
  height: 1px!important;
  min-height: 0!important;
  margin: 0!important;
  padding: 0!important;
  border: 0!important;
  opacity: 0;
  clip-path: inset(50%);
  overflow: hidden;
}

:is(.hg-template-sample,.hg-template-choice):has(>input:checked) {
  border-color: #1748a5!important;
  box-shadow: 0 0 0 2px #1748a5;
}

:is(.hg-template-sample,.hg-template-choice):focus-within {
  outline: 3px solid #598ce0;
  outline-offset: 3px;
}

.hg-vendor-apply .hg-form-section>label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 12px 0 18px;
}

.hg-vendor-apply .hg-form-section {
  min-width: 0;
  padding: 20px;
  border: 1px solid #d9e3ef;
  border-radius: 12px;
}

/* PATCH036 — country tick on the LEFT, country name on the RIGHT. */
:is(.hg-vendor-apply,.hg-vendor-dashboard,.hg-store-admin) .hg-country-checklist label {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  width: 100%;
  min-width: 0;
  gap: 10px !important;
  text-align: left;
}
:is(.hg-vendor-apply,.hg-vendor-dashboard,.hg-store-admin) .hg-country-checklist label > input[type="checkbox"] {
  display: block;
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  margin: 1px 0 0 !important;
  padding: 0 !important;
}
:is(.hg-vendor-apply,.hg-vendor-dashboard,.hg-store-admin) .hg-country-checklist label > span {
  display: block;
  flex: 1 1 0%;
  min-width: 0;
  overflow-wrap: break-word;
  line-height: 1.45;
}
