/* Phone input with country selector */

.phone-input {
  position: relative;
}

.phone-input__country,
.phone-input__number {
  font: inherit;
}

.phone-input {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 10px;
  border: 1px solid rgba(8, 5, 23, 0.1);
  background: #faf9f7;
  box-shadow: inset 0 1px 2px rgba(8, 5, 23, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.phone-input:focus-within {
  border-color: var(--color-purple);
  box-shadow: 0 0 0 3px rgba(67, 42, 191, 0.12);
}

.phone-input__country {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.75rem 0.65rem 0.75rem 0.85rem;
  border: 0;
  border-right: 1px solid rgba(8, 5, 23, 0.08);
  background: rgba(67, 42, 191, 0.04);
  color: var(--color-text);
  cursor: pointer;
  border-radius: 10px 0 0 10px;
}

.phone-input__country:hover {
  background: rgba(67, 42, 191, 0.08);
}

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

.phone-input__dial {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-purple);
  white-space: nowrap;
}

.phone-input__number {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 0;
  background: transparent;
  color: var(--color-text);
  border-radius: 0 10px 10px 0;
}

.phone-input__number:focus {
  outline: none;
}

.phone-input__dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(8, 5, 23, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(8, 5, 23, 0.12);
  overflow: hidden;
}

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

.phone-input__search {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-bottom: 1px solid rgba(8, 5, 23, 0.08);
  font: inherit;
  font-size: 0.85rem;
  background: #faf9f7;
}

.phone-input__search:focus {
  outline: none;
  background: #fff;
}

.phone-input__options {
  max-height: 220px;
  overflow-y: auto;
}

.phone-input__option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--color-text);
}

.phone-input__option:hover,
.phone-input__option.is-selected {
  background: rgba(67, 42, 191, 0.06);
}

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

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

.phone-input__option-name {
  flex: 1;
}

.phone-input__option-dial {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.booking-widget .form-group .phone-input {
  width: 100%;
}

.booking-widget .form-group .phone-input__number {
  width: auto;
}
