/* Phone entry — separate from global lm-select (dial code only) */
.lm-phone-field {
  margin-bottom: 1rem;
}
.lm-phone-field > label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}
.lm-phone-hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted, #6b7280);
  font-size: 0.8rem;
}

.lm-phone-input {
  position: relative;
}

.lm-phone-control {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--card, #fff);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lm-phone-input.is-focused .lm-phone-control,
.lm-phone-control:focus-within {
  border-color: var(--accent, #10b981);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.lm-phone-dial-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.65rem;
  border: none;
  border-right: 1px solid var(--border, #e5e7eb);
  background: #f8fafc;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text, #1f2937);
  flex-shrink: 0;
  min-width: 96px;
}
.lm-phone-dial-btn:hover {
  background: #f1f5f9;
}

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

.lm-phone-dial {
  font-weight: 600;
  white-space: nowrap;
}

.lm-phone-chevron {
  display: inline-flex;
  align-items: center;
  margin-left: 0.15rem;
  color: var(--muted, #6b7280);
  transition: transform 0.2s;
}
.lm-phone-input.is-open .lm-phone-chevron {
  transform: rotate(180deg);
}

.lm-phone-national {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  outline: none;
}
.lm-phone-national::placeholder {
  color: #9ca3af;
}

/* Compact dial-code menu (not full-width country selector) */
.lm-phone-dial-menu {
  position: absolute;
  z-index: 150;
  top: calc(100% + 4px);
  left: 0;
  width: min(100%, 280px);
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  max-height: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lm-phone-dial-menu[hidden] {
  display: none !important;
}

.lm-phone-dial-search {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
}

.lm-phone-dial-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  overflow-y: auto;
  flex: 1;
}

.lm-phone-dial-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  font-size: 0.8rem;
}
.lm-phone-dial-list li:hover,
.lm-phone-dial-list li.is-selected {
  background: #f3f4f6;
}
.lm-phone-dial-list .lm-phone-dial-code {
  margin-left: auto;
  color: var(--muted, #6b7280);
  font-weight: 600;
  font-size: 0.75rem;
}

.lm-phone-input.is-invalid .lm-phone-control {
  border-color: var(--danger, #ef4444);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
