
/**
 * [mtb_neighborhood_scores] shortcode styles.
 */

.mtb-scores {
	display: flex;
    align-items: center;
    padding: 40px 0;
    justify-content: space-around;
    gap: 0px 20px;
}

.mtb-score {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 6px 24px;
}

.mtb-score + .mtb-score {
	border-left: 1px solid #8a8a8a;
}

/* Score ring */
.mtb-score__ring {
	position: relative;
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
}

.mtb-score__ring svg {
	display: block;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.mtb-score__ring circle {
	fill: none;
	stroke-width: 2;
}

.mtb-score__track {
	stroke: #e6e6e6;
}

.mtb-score__bar {
	stroke: #111;
}

.mtb-score__value {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 20px;
	line-height: 1;
	color: #111;
}

/* Title + label */
.mtb-score__title {
	font-size: 19px;
	line-height: 1.3;
	color: #111;
	margin-bottom: 6px;
}

.mtb-score__label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b6b6b;
}

/* Info button */
.mtb-score__help {
	position: relative;
	display: inline-flex;
}

.mtb-scores button.mtb-score__info {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #7a7a7a;
	line-height: 0;
	cursor: pointer;
	box-shadow: none;
	outline: none;
	transition: color 0.2s ease;
}

.mtb-scores button.mtb-score__info svg {
	display: block;
	width: 14px;
	height: 14px;
}

/* Tooltip */
.mtb-score__tip {
	--mtb-arrow: 10px;
	position: absolute;
	bottom: calc(100% + 12px);
	left: -8px;
	z-index: 100;
	width: 350px;
	max-width: calc(100vw - 32px);
	padding: 14px 16px;
	background: #c8c8c8;
	color: #000;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 2;
	text-transform: none;
	text-align: left;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mtb-score__tip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: var(--mtb-arrow);
	border: 7px solid transparent;
	border-top-color: #c8c8c8;
}

.mtb-score__help.mtb-is-open .mtb-score__tip {
	opacity: 1;
	visibility: visible;
}

.mtb-score__tip-title {
	display: block;
	font-weight: 700;
	line-height: 1.6;
	margin-bottom: 4px;
}

.mtb-score__tip a {
	color: #000 !important;
	font-weight: 700;
	text-decoration: none;
}

.mtb-score__tip a:hover,
.mtb-score__tip a:focus {
	color: #000 !important;
	text-decoration: underline;
}

/* .mtb-scores-section:not(:has(.mtb-scores)) {
	display: none;
} */

body:not(.elementor-editor-active) .mtb-scores-section:not(:has(.mtb-scores)) {
	display: none;
}

/* Mobile: stack blocks */
@media (max-width: 767px) {

	.mtb-scores {
		flex-direction: column;
		align-items: stretch;
		padding: 10px 0;
	}

	.mtb-score {
		justify-content: flex-start;
		padding: 18px 16px;
	}

	.mtb-score + .mtb-score {
		border-left: 0;
		border-top: 1px solid #e0e0e0;
	}
}

@media (max-width: 575px) {
	.mtb-score__tip {
		left: -155px !important;
		width: 250px !important;
	}

	.mtb-score__tip:after {
		left: 155px !important;
	}
}