/* Tool popup modals (homepage showcase, etc.) */

.sat-tool-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.sat-tool-modal[hidden] {
	display: none !important;
}

.sat-tool-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 10, 24, 0.72);
}

.sat-tool-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(720px, 100%);
	max-height: min(90vh, 900px);
	overflow: auto;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
	padding: 1.25rem 1.5rem 1.5rem;
	box-sizing: border-box;
}

.sat-tool-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 2;
	width: 2.5rem;
	height: 2.5rem;
	border: none;
	border-radius: 4px;
	background: transparent;
	color: #14213d;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.sat-tool-modal__close:hover {
	background: #f1f5f9;
}

/* Loudness table is wide — do not cap tool width inside the modal */
.sat-tool-modal__body .sat-loudness-calculator {
	max-width: none;
}

.sat-tool-modal__body .sat-tool {
	max-width: none;
	margin: 0;
	padding: 0.5rem 0 0;
}

.sat-tool-modal__body .sat-tool__title {
	display: none;
}

body.sat-tool-modal-open {
	overflow: hidden;
}

/* Hide tool markup in footer until moved into the open dialog */
.sat-tool-modal__placeholder .sat-tool-modal__source,
.sat-tool-modal__source[hidden] {
	display: none !important;
}

.sat-tool-modal__body .sat-tool-modal__source,
.sat-tool-modal__source--active {
	display: block !important;
}
