/*
 * Find optiker – tooltips on the Google map (google.maps.InfoWindow).
 * Content is built by buildTooltip() in includes/shortcodes/opticians_map/shortcode.php:
 * .optician_iw_title sits in the info window header, .optician_iw in the body.
 */

/* Box */
.acf-map .gm-style .gm-style-iw-c {
	padding: 0 !important;
	border-radius: 8px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
}

/*
 * Google caps the box height from its own estimate of the free space, which
 * cuts a few pixels off and adds a scrollbar. The map is 400px high and the
 * tooltip around 260px, so lift the cap. Padding lives on .optician_iw.
 */
.acf-map .gm-style .gm-style-iw-c {
	max-height: none !important;
}

.acf-map .gm-style .gm-style-iw-d {
	max-height: none !important;
	overflow: visible !important;
	padding: 0 !important;
}

/* Header row: name + close button */
.acf-map .gm-style .gm-style-iw-chr {
	align-items: flex-start;
}

.acf-map .gm-style .gm-style-iw-ch {
	padding: 14px 0 0 18px;
}

.acf-map .gm-style .gm-style-iw-chr .gm-ui-hover-effect {
	width: 40px !important;
	height: 40px !important;
	margin: 4px 4px -10px 0 !important; /* negative bottom: the button must not push the address down */
	border-radius: 50%;
}

.acf-map .gm-style .gm-style-iw-chr .gm-ui-hover-effect span {
	margin: 10px !important;
	width: 20px !important;
	height: 20px !important;
}

.optician_iw_title {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	color: #344c77;
}

/* Body */
.optician_iw {
	min-width: 240px;
	padding: 0 18px 10px;
	font-size: .875rem;
	line-height: 1.45;
	color: #3a3a3a;
}

.optician_iw .optician_iw_address {
	margin: 4px 0 0;
	color: #6b7280;
}

/* Phone and email as text */
.optician_iw_contact {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-top: 6px;
}

.optician_iw_contact a {
	color: #005bab;
	text-decoration: none;
	word-break: break-word;
}

.optician_iw_contact a:hover {
	text-decoration: underline;
}

/* Badges: distance, low vision optics */
.optician_iw_chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.optician_iw_chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 9px;
	border-radius: 999px;
	background: #eef3fa;
	color: #344c77;
	font-size: .75rem;
	font-weight: 600;
}

.optician_iw_chip_ok {
	background: #e7f4ec;
	color: #2e7d4f;
}

.optician_iw .icon {
	margin: 0;
}

.optician_iw_chip .icon svg {
	width: .85em;
	height: .85em;
}

/* Action buttons: Ring, Mail, Web, Rute */
.optician_iw_actions {
	display: flex;
	gap: 6px;
	margin: 12px -18px -10px; /* full width footer: cancels the padding of .optician_iw */
	padding: 6px 12px;
	background: #f4f7fb;
	border-top: 1px solid #e6e9ef;
	border-radius: 0 0 8px 8px;
}

.optician_iw_action {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 6px 4px;
	border-radius: 6px;
	color: #344c77;
	font-size: .72rem;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s ease-in-out;
}

.optician_iw_action:hover,
.optician_iw_action:focus {
	background: #fff;
	color: #344c77;
	text-decoration: none;
}

.optician_iw_action .icon svg {
	width: 18px;
	height: 18px;
}
