/* WhatsApp dial-code field + country picker modal */
.field--whatsapp {
  position: relative;
  flex-wrap: nowrap;
}

.field-ico--whatsapp-img {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  object-fit: contain;
  opacity: 1;
}

.pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.95);
  color: #4a5864;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  flex: 0 0 auto;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

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

.caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(12, 30, 45, 0.5);
  margin-left: 2px;
}

body.country-picker-open {
  overflow: hidden;
}

.country-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(8, 18, 28, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

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

.country-modal {
  width: min(var(--phone-max, 390px), 100%);
  height: min(66vh, 520px);
  max-height: min(66vh, 520px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  flex-shrink: 0;
}

.country-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  flex: 0 0 auto;
}

.country-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: #0a1628;
}

.country-confirm {
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
}

.country-confirm:hover {
  color: var(--accent-hover);
}

.country-search-wrap {
  position: relative;
  display: block;
  margin: 0 18px 14px;
  flex: 0 0 auto;
}

.country-search {
  width: 100%;
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 10px 42px 10px 14px;
  font-size: 16px;
  background: #e9edf1;
  color: #0a1628;
  outline: none;
  font-family: inherit;
}

.country-search::placeholder {
  color: #8d98a4;
}

.country-search-ico {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9aa5b0;
  pointer-events: none;
}

.country-list {
  flex: 1 1 auto;
  min-height: 0;
  height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 16px 16px;
  touch-action: pan-y;
}

.country-row {
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e8ecef;
  background: transparent;
  padding: 14px 2px;
  font-family: inherit;
  font-size: 15px;
  color: #0a1628;
  cursor: pointer;
  border-radius: 0;
  text-align: left;
}

.country-row:last-child {
  border-bottom: 0;
}

.country-row:hover {
  background: #f7f9fa;
}

.country-row.is-selected .country-row-name {
  color: var(--accent, #13b5a2);
}

.country-row.is-selected .country-row-check {
  background: var(--accent, #13b5a2);
  border-color: var(--accent, #13b5a2);
}

.country-row-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  font-size: 16px;
}

.country-row-code {
  flex: 0 0 auto;
  margin-right: 14px;
  color: #0a1628;
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
}

.country-row-check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #8a8a8a;
  position: relative;
  background: #b3b3b3;
}

.country-row-check::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.country-empty {
  margin: 0;
  padding: 24px 8px 32px;
  text-align: center;
  font-size: 14px;
  color: #8d98a4;
}
