/* ============================================================
   biz-phone-input.css  —  Standalone component styles
   Import this wherever you use <biz-phone-input>.
   Depends only on Material Icons being loaded.
   ============================================================ */

@keyframes bizPhoneDropdownIn {
  from { opacity: 0; transform: translateY(-6px) scaleY(0.97); }
  to   { opacity: 1; transform: translateY(0)    scaleY(1);    }
}

biz-phone-input { display: block; }

/* ── Field wrapper ─────────────────────────────────────────── */
.biz-phone-field {
  margin: 6px 0 14px;
  position: relative;
}

/* ── Label row ─────────────────────────────────────────────── */
.biz-phone-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.biz-phone-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #4a5568;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1.3;
}

.biz-phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, rgba(102,126,234,0.10) 0%, rgba(118,75,162,0.10) 100%);
  color: #667eea;
  border: 1px solid rgba(102,126,234,0.22);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.biz-phone-badge-icon {
  font-size: 11px !important;
  width: 11px !important;
  height: 11px !important;
  line-height: 11px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ── Input row ─────────────────────────────────────────────── */
.biz-phone-input-row {
  display: flex;
  align-items: stretch;
  border: 1.5px solid rgba(102,126,234,0.22);
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: visible;
}

.biz-phone-input-row.focused {
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.11);
}

.biz-phone-input-row.has-error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229,62,62,0.10);
}

/* ── Country trigger ───────────────────────────────────────── */
.biz-phone-country-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 7px 0 0 7px;
  transition: background 0.15s ease;
  flex-shrink: 0;
  outline: none;
  min-height: 38px;
}

.biz-phone-country-btn:hover {
  background: rgba(102,126,234,0.07);
}

.biz-phone-flag {
  font-size: 20px;
  line-height: 1;
  display: block;
  font-variant-emoji: emoji;
}

.biz-phone-dialcode {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  white-space: nowrap;
  min-width: 28px;
  font-family: 'Roboto', sans-serif;
}

.biz-phone-caret {
  font-size: 18px !important;
  color: #a0aec0;
  transition: transform 0.2s ease;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  line-height: 1 !important;
}

.biz-phone-caret.open { transform: rotate(180deg); }

/* ── Divider ───────────────────────────────────────────────── */
.biz-phone-divider {
  width: 1px;
  background: rgba(102,126,234,0.18);
  margin: 8px 0;
  flex-shrink: 0;
}

/* ── Number input ──────────────────────────────────────────── */
.biz-phone-number {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  color: #1a202c !important;
  font-family: 'Roboto', sans-serif !important;
  min-width: 0;
  box-shadow: none !important;
  border-radius: 0 7px 7px 0;
}

.biz-phone-number::placeholder { color: #b0bec5 !important; }

/* ── Dropdown ──────────────────────────────────────────────── */
.biz-phone-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 320px;
  max-width: 98vw;
  background: white;
  border: 1.5px solid rgba(102,126,234,0.22);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(102,126,234,0.16), 0 4px 12px rgba(0,0,0,0.08);
  z-index: 9999;
  overflow: hidden;
  animation: bizPhoneDropdownIn 0.18s ease-out;
}

/* Search bar */
.biz-phone-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(102,126,234,0.10);
}

.biz-phone-search-icon {
  font-size: 17px !important;
  color: #a0aec0;
  flex-shrink: 0;
  display: flex !important;
  align-items: center !important;
}

.biz-phone-search {
  flex: 1;
  border: none !important;
  outline: none !important;
  font-size: 13px !important;
  color: #1a202c !important;
  background: transparent !important;
  padding: 0 !important;
  font-family: 'Roboto', sans-serif !important;
}

.biz-phone-search::placeholder { color: #b0bec5 !important; }

/* List */
.biz-phone-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 0;
}

.biz-phone-list::-webkit-scrollbar { width: 5px; }
.biz-phone-list::-webkit-scrollbar-thumb { background: #d0d5e8; border-radius: 3px; }

.biz-phone-list-divider {
  height: 1px;
  background: rgba(102,126,234,0.10);
  margin: 4px 0;
}

/* Country option row */
.biz-phone-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.biz-phone-option:hover     { background: rgba(102,126,234,0.07); }
.biz-phone-option.active    { background: rgba(102,126,234,0.10); }
.biz-phone-option.active .biz-phone-opt-name { color: #667eea; font-weight: 600; }

.biz-phone-opt-flag {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  font-variant-emoji: emoji;
  width: 24px;
  text-align: center;
}

.biz-phone-opt-name {
  flex: 1;
  font-size: 13px;
  color: #2d3748;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.biz-phone-opt-dial {
  font-size: 12px;
  color: #a0aec0;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
  flex-shrink: 0;
}

.biz-phone-no-results {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 14px;
  font-size: 13px;
  color: #a0aec0;
  font-style: italic;
}

.biz-phone-no-results .material-icons {
  font-size: 16px;
  color: #cbd5e0;
}

/* ── Status row ────────────────────────────────────────────── */
.biz-phone-status {
  margin-top: 5px;
  min-height: 20px;
}

.biz-phone-hint,
.biz-phone-valid,
.biz-phone-invalid {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
}

.biz-phone-hint .material-icons,
.biz-phone-valid .material-icons,
.biz-phone-invalid .material-icons {
  font-size: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.biz-phone-hint    { color: #a0aec0; }
.biz-phone-hint    .material-icons { color: #a0aec0; }
.biz-phone-valid   { color: #059669; }
.biz-phone-valid   .material-icons { color: #059669; }
.biz-phone-invalid { color: #dc2626; }
.biz-phone-invalid .material-icons { color: #dc2626; }