/* Combined phone field: [ flag +code ▾ | number ] — one row, one height */

.et-phone-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  height: 2.75rem;
  min-height: 2.75rem;
  max-height: 2.75rem;
  border: 1px solid var(--et-border, #e2e8f0);
  border-radius: 999px;
  background: var(--et-surface, #fff);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.et-phone-row--panel {
  height: 2.75rem;
  min-height: 2.75rem;
  max-height: 2.75rem;
  border-radius: 0.75rem;
}

.et-phone-row:focus-within {
  border-color: var(--et-accent, #0f766e);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--et-accent, #0f766e) 22%, transparent);
}

.et-phone-row.is-invalid,
.et-field.is-invalid .et-phone-row,
.ca-field.is-invalid .et-phone-row,
.profile-field.is-invalid .et-phone-row {
  border-color: #dc2626;
}

.et-phone-row select.et-phone-row__dial {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}

.et-phone-row .ts-wrapper,
.et-phone-row .ts-wrapper.single {
  flex: 0 0 5.75rem !important;
  width: 5.75rem !important;
  min-width: 5.75rem !important;
  max-width: 5.75rem !important;
  height: 100% !important;
  margin: 0 !important;
  border-right: 1px solid var(--et-border, #e2e8f0);
}

.et-phone-row .ts-wrapper .ts-control,
.et-phone-row .ts-wrapper.single .ts-control,
.et-phone-row .ts-wrapper.focus .ts-control,
.et-phone-row .ts-wrapper.single.input-active .ts-control,
.et-phone-row .ts-wrapper.single.dropdown-active .ts-control {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.3rem;
  width: 100%;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #f1f5f9 !important;
  padding: 0 1.35rem 0 0.5rem !important;
  overflow: hidden;
}

.et-phone-row .ts-wrapper.single .ts-control::after {
  right: 0.4rem !important;
  margin-top: -2px;
}

.et-phone-row .ts-control > input {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  flex: 0 0 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.et-phone-row .ts-control > .item,
.et-phone-row .ts-control .item {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: inherit !important;
  max-width: none !important;
}

.et-phone-row .et-cc-item {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.35rem;
  white-space: nowrap;
  line-height: 1;
}

.et-phone-row .et-cc-flag {
  display: block !important;
  width: 18px;
  height: 12px;
  flex: 0 0 18px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(15 23 42 / 0.08);
}

.et-phone-row .et-cc-item span {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.et-cc-opt {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.et-cc-dial {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.et-cc-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 0.85em;
}

.et-phone-row__number,
.et-field .et-phone-row input.et-phone-row__number,
.et-form .et-phone-row input.et-phone-row__number,
.ca-field .et-phone-row input.et-phone-row__number,
.profile-field .et-phone-row input.et-phone-row__number,
.et-phone-row input.panel-input,
.et-phone-row input.et-phone-row__number {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 0 0.9rem !important;
  appearance: none;
  line-height: 1;
}

.et-field .et-phone-row input.et-phone-row__number:focus,
.et-form .et-phone-row input.et-phone-row__number:focus,
.ca-field .et-phone-row input.et-phone-row__number:focus,
.profile-field .et-phone-row input.et-phone-row__number:focus,
.et-phone-row input.et-phone-row__number:focus {
  border: 0 !important;
  box-shadow: none !important;
}

.ts-dropdown .et-cc-opt {
  padding: 0.2rem 0;
}

.ts-dropdown.plugin-dropdown_input {
  min-width: 18rem;
  z-index: 80;
}

html.dark .et-phone-row,
[data-theme="dark"] .et-phone-row {
  border-color: #334155;
  background: #0f172a;
}

html.dark .et-phone-row .ts-wrapper,
[data-theme="dark"] .et-phone-row .ts-wrapper {
  border-right-color: #334155;
}

html.dark .et-phone-row .ts-wrapper .ts-control,
html.dark .et-phone-row .ts-wrapper.single .ts-control,
[data-theme="dark"] .et-phone-row .ts-wrapper .ts-control {
  background: #1e293b !important;
  color: #e2e8f0;
}

html.dark .et-phone-row:focus-within,
[data-theme="dark"] .et-phone-row:focus-within {
  border-color: #2dd4bf;
}
