/**
 * Shared international phone field.
 */

.shuf-phone-field {
  --shuf-orange: #FF5300;
  --shuf-blue: #0B81FF;
  --shuf-navy: #1E1B4B;
  --shuf-body: #4B5563;
  --shuf-border: #D1D5DB;
  --shuf-error: #DC2626;
  --shuf-success: #15803D;
  --shuf-header: #000130;
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--shuf-border);
  border-radius: 0;
  background: #fff;
  box-sizing: border-box;
  overflow: visible;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shuf-phone-field:hover {
  border-color: var(--shuf-blue);
}

.shuf-phone-field.is-open {
  border-color: var(--shuf-blue);
  box-shadow: 0 0 0 3px rgba(11, 129, 255, 0.14);
  z-index: 5;
}

/* Country selector button — light grey/white so the flag stays visible */
.shuf-phone-field__country {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0 10px;
  height: 36px;
  border: 0;
  border-right: 1px solid var(--shuf-border);
  background: #FFFFFF !important;
  color: #6B7280 !important;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.shuf-phone-field__country:hover {
  background: #FFFFFF !important;
}

/* Flag emoji */
.shuf-phone-field__flag {
  font-size: 16px;
  line-height: 1;
}

.shuf-phone-field__dial {
  white-space: nowrap;
  color: #6B7280 !important;
}

/* Caret — muted grey to match light phone block */
.shuf-phone-field__caret {
  font-size: 10px;
  color: #6B7280 !important;
}

.shuf-phone-field__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--shuf-navy) !important;
  background: #fff !important;
  box-shadow: none !important;
}

.shuf-phone-field__input::placeholder {
  color: #9CA3AF !important;
  font-weight: 400 !important;
}

.shuf-phone-field__input:focus {
  outline: none !important;
}

.shuf-phone-field__input.shuf-field-error {
  box-shadow: inset 0 0 0 1px var(--shuf-error) !important;
}

/* Dropdown — opens below, list only (search hidden by default) */
.shuf-phone-field__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 220px;
  background: #fff;
  border: 1px solid var(--shuf-border);
  border-radius: 0;
  box-shadow: 0 10px 28px rgba(15, 23, 41, 0.14);
  z-index: 9999;
  max-height: 240px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shuf-phone-field__dropdown[hidden] {
  display: none !important;
}

/* Search input — present but less prominent */
.shuf-phone-field__search {
  height: 34px !important;
  margin: 6px 6px 0 !important;
  padding: 0 10px !important;
  border: 1px solid var(--shuf-border) !important;
  border-radius: 0 !important;
  width: calc(100% - 12px) !important;
  font-size: 13px !important;
  box-sizing: border-box !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.shuf-phone-field__search:focus {
  outline: none !important;
  border-color: var(--shuf-blue) !important;
}

.shuf-phone-field__list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  flex: 1 1 auto;
}

.shuf-phone-field__list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  color: var(--shuf-navy);
}

.shuf-phone-field__list li:hover,
.shuf-phone-field__list li:focus,
.shuf-phone-field__list li.is-selected {
  background: #EEF4FF;
}

.shuf-phone-field__list li.is-empty {
  cursor: default;
  color: var(--shuf-body);
}

.shuf-phone-field__opt-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shuf-phone-field__opt-dial {
  color: var(--shuf-body);
  font-weight: 700;
  font-size: 12px;
}
