.gn-phone {
  position: relative;
}

.gn-phone-row {
  display: flex;
  align-items: stretch;
  min-height: 2.5rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--background));
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gn-spar-checkout .gn-phone-row {
  min-height: 3rem;
  border-radius: 0.75rem;
}

.gn-phone-row:focus-within {
  border-color: hsl(var(--primary) / 0.45);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}

.gn-phone-dial {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  min-width: 6.5rem;
  padding: 0 0.7rem;
  border: 0;
  border-right: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.45);
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.gn-phone-select {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
  border: 0;
  background: transparent;
}

.gn-phone.is-enhanced .gn-phone-select {
  pointer-events: none;
}

.gn-phone-dial:hover,
.gn-phone.is-open .gn-phone-dial {
  background: hsl(var(--muted) / 0.8);
}

.gn-phone-flag {
  font-size: 1.05rem;
  line-height: 1;
}

.gn-phone-caret {
  width: 0.9rem;
  height: 0.9rem;
  color: hsl(var(--muted-foreground));
}

.gn-phone-local {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: 0;
  background: transparent;
  color: hsl(var(--foreground));
  padding: 0 0.8rem;
  font-size: 0.875rem;
  outline: none;
}

.gn-phone-hint {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: hsl(var(--muted-foreground));
}

.gn-phone-menu {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.85rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  z-index: 10050;
  pointer-events: auto;
}

.gn-phone-search-wrap {
  padding: 0.6rem 0.6rem 0.4rem;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}

.gn-phone-search {
  width: 100%;
  height: 2.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: 0 0.7rem;
  font-size: 0.875rem;
  outline: none;
}

.gn-phone-search:focus {
  border-color: hsl(var(--primary) / 0.45);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}

.gn-phone-options {
  overflow-y: auto;
  max-height: 16rem;
  padding: 0.3rem;
}

.gn-phone-group {
  margin: 0.35rem 0.45rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.gn-phone-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: hsl(var(--foreground));
  text-align: left;
  cursor: pointer;
}

.gn-phone-option:hover,
.gn-phone-option.is-selected {
  background: hsl(var(--primary) / 0.08);
}

.gn-phone-option-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.gn-phone-option-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.gn-phone-option-dial {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.gn-phone-empty {
  margin: 0;
  padding: 1rem 0.75rem;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  text-align: center;
}

input.gn-field-invalid,
.gn-phone.is-invalid .gn-phone-row {
  border-color: rgb(239 68 68) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.gn-phone.is-invalid .gn-phone-row:focus-within {
  border-color: rgb(239 68 68);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
}

.gn-field-error {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgb(185 28 28);
}
