/**
 * MS Calculator – placeholder styles.
 *
 */

/* general settings */

.msc-calculator-wrap {
	max-width: 48rem;
	margin-inline: auto;
}

.msc-calculator__title {
	margin-bottom: 0.25em;
}

.msc-calculator__intro {
	margin-bottom: 1.5em;
	opacity: 0.8;
}

/* form */

.msc-calculator {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

.msc-calculator .form-group {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.msc-calculator .form-group__legend {
	display: block;
	line-height: 1;
	font-size: 1.2rem;
	margin-bottom: 0;
	font-weight: 600;
}

.msc-calculator .form-group__options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem;
	align-items: center;
	justify-content: stretch;
}

.msc-calculator .form-group__options label {
	display: flex;
	flex-grow: 1;
	align-items: center;
	justify-content: center;
	padding: 0.5em 1em;
	border: 1px solid currentColor;
	border-radius: 3rem;
	cursor: pointer;
	user-select: none;
}

.msc-calculator .form-group__options input {
	/* Kept in the DOM (not display:none) so keyboard focus/nav still works. */
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.msc-calculator .form-group__options input:checked + span {
	font-weight: 700;
}

.msc-calculator .form-group__options label:has(input:checked) {
	background: currentColor;
}
.msc-calculator .form-group__options label:has(input:checked) span {
	color: Canvas;
}

.msc-calculator .form-group__options input:focus-visible + span {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}



/* results block */

.msc-result {
	margin-top: 1.5em;
	padding: 1.25em;
	border-radius: 4px;
	position: sticky;
    bottom: 0.5rem;
    z-index: 2;
	border: 1px solid #dadada;
    background: #fff;
}

.msc-result__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1em;
	margin: 0;
	padding: 0.4em 0;
}

.msc-result__row + .msc-result__row {
	border-top: 1px solid currentColor;
	border-top-color: color-mix(in srgb, currentColor 15%, transparent);
}

.msc-result__caption {
	opacity: 0.75;
}

.msc-result__value {
	font-weight: 700;
	text-align: right;
}

.msc-result__hint {
	margin: 0.75em 0 0;
	opacity: 0.6;
	font-size: 0.9rem;
	font-style: italic;
}