/* Phone teaser (ui/phone-teaser): blurred number, real numbers open as pills */
.phone-teaser {
	position: relative;
	display: flex;
	align-items: center;
}

/* Phone icon (the svg is drawn upside down, as in the Figma file) */
.phone-teaser__icon {
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

.phone-teaser__icon img {
	display: block;
	width: 100%;
	height: 100%;
	transform: scaleY(-1);
}

.phone-teaser__toggle,
.phone-teaser__pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px 0 12px;
	border-radius: 20px;
	color: var(--color-blue);
	font-family: var(--font-numbers);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Collapsed teaser: one number, the code readable and the rest always blurred; the real numbers are the pills */
.phone-teaser__toggle {
	min-height: 44px;
	margin-right: -6px;
	padding: 2px 14px 2px 12px;
	border: 0;
	background: transparent;
}

.phone-teaser__number {
	font-weight: 500;
	letter-spacing: 0.03em;
	line-height: 1.25;
}

.phone-teaser__tail {
	display: inline-block;
	filter: blur(4px);
	opacity: 0.8;
	user-select: none;
}

.phone-teaser__toggle:hover,
.phone-teaser__toggle[aria-expanded="true"] {
	background: var(--color-soft-blue);
}

.phone-teaser__toggle:active,
.phone-teaser__pill:active {
	transform: scale(0.97);
}

/* Separate pills, one per number, above (or below) the teaser */
.phone-teaser__list {
	position: absolute;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

.phone-teaser--end .phone-teaser__list {
	right: 0;
}

.phone-teaser--start .phone-teaser__list {
	left: 0;
}

.phone-teaser--top .phone-teaser__list {
	bottom: calc(100% + 8px);
	transform: translateY(8px);
}

.phone-teaser--bottom .phone-teaser__list {
	top: calc(100% + 8px);
	transform: translateY(-8px);
}

/* Keeps the pointer inside the hover zone while it crosses the 8px gap to the teaser */
.phone-teaser__list::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 8px;
}

.phone-teaser--top .phone-teaser__list::after {
	top: 100%;
}

.phone-teaser--bottom .phone-teaser__list::after {
	bottom: 100%;
}

.phone-teaser__list.is-open {
	visibility: visible;
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.phone-teaser__pill {
	border: 1px solid rgba(0, 106, 200, 0.14);
	background: var(--color-white);
	box-shadow: 0 6px 18px rgba(0, 106, 200, 0.16);
}

.phone-teaser__pill:hover {
	background: var(--color-soft-blue);
	box-shadow: 0 8px 22px rgba(0, 106, 200, 0.22);
}

.phone-teaser__toggle:focus-visible,
.phone-teaser__pill:focus-visible {
	outline: 2px solid var(--color-blue);
	outline-offset: 2px;
}

/* Without JS the pills open on hover or keyboard focus */
html:not(.js) .phone-teaser:hover .phone-teaser__list,
html:not(.js) .phone-teaser:focus-within .phone-teaser__list {
	visibility: visible;
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.motion .phone-teaser__list {
	transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1), transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.22s;
}

.motion .phone-teaser__list.is-open {
	transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
	.phone-teaser__list,
	.phone-teaser__toggle,
	.phone-teaser__pill {
		transition: none !important;
	}

	.phone-teaser__list {
		transform: none !important;
	}
}
