.country-phone-picker {
  position: relative;
}

.country-selector {
  position: relative;
}

.country-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #1f2937;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.country-trigger:hover,
.country-trigger:focus-visible {
  border-color: rgba(79, 140, 255, 0.5);
  box-shadow: 0 14px 30px rgba(79, 140, 255, 0.14);
  outline: none;
}

.country-trigger-main {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.country-trigger-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.country-trigger-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-trigger-code {
  flex-shrink: 0;
  padding: 0.26rem 0.65rem;
  border-radius: 999px;
  background: #e8f0ff;
  color: #23408f;
  font-size: 0.9rem;
}

.country-panel {
  position: static;
  margin-top: 0.6rem;
  z-index: 50;
  padding: 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
}

.country-code-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(36, 64, 143, 0.08), rgba(79, 140, 255, 0.12));
  color: #21325d;
  font-size: 0.88rem;
  font-weight: 600;
}

.country-code-preview-value {
  color: #23408f;
  font-weight: 800;
}

.country-search {
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
}

.country-options {
  margin-top: 0.8rem;
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 0.45rem;
}

.country-empty {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: #f7faff;
  border: 1px dashed rgba(35, 64, 143, 0.2);
  color: #475569;
  font-size: 0.92rem;
}

.country-jump-row {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding: 0.1rem 0 0.55rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.88) 70%, rgba(255, 255, 255, 0) 100%);
  backdrop-filter: blur(12px);
}

.country-jump {
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 0.45rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #f4f7ff 100%);
  color: #23408f;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.country-jump:hover,
.country-jump:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(79, 140, 255, 0.38);
  box-shadow: 0 8px 18px rgba(79, 140, 255, 0.12);
  outline: none;
}

.country-group {
  display: grid;
  gap: 0.45rem;
}

.country-group-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #eaf1ff;
  color: #23408f;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.country-group-items {
  display: grid;
  gap: 0.45rem;
  padding-left: 0.1rem;
}

.country-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f7faff 100%);
  color: #1f2937;
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.country-option:hover,
.country-option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(79, 140, 255, 0.38);
  box-shadow: 0 10px 22px rgba(79, 140, 255, 0.12);
  outline: none;
}

.country-option-main {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.country-option-flag {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.country-option-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.country-option-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-option-meta {
  color: #5b6475;
  font-size: 0.86rem;
}

.country-option-code {
  flex-shrink: 0;
  font-weight: 700;
  color: #23408f;
}

.country-match {
  padding: 0 0.08rem;
  border-radius: 0.25rem;
  background: rgba(79, 140, 255, 0.2);
  color: #17306f;
  font-weight: 800;
}

@media (max-width: 576px) {
  .country-trigger,
  .country-option {
    padding: 0.85rem 0.9rem;
  }

  .country-panel {
    padding: 0.8rem;
  }
}
