*,
*::before,
*::after {
	box-sizing: border-box;
}

.dialog {
	width: 100%;
	padding: 0;
	max-width: 1200px;
	background: var(--g-color-background-default);
	border-style: solid;
	border-width: var(--g-border-width-sm);
	border-color: var(--g-color-border-default);
	border-radius: var(--g-border-radius-md);
	overflow: hidden;
}

.dialog::backdrop {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(6px);
}

.dialog__dismiss {
	display: block;
	position: absolute;
	border: none;
	line-height: 1;
	font-size: var(--g-typography-h4-font-size);
	cursor: pointer;
	background: transparent;
	inset-block-start: var(--g-spacing-md);
	inset-inline-end: var(--g-spacing-md);
	margin-block-start: -0.25rem;
	margin-inline-end: -0.25rem;
	border-radius: 50%;
	width: 2rem;
	height: 2rem;
	padding: var(--g-spacing-xs);
	justify-content: center;
	align-items: center;
}

.dialog__content {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: var(--g-spacing-md);
	padding: var(--g-spacing-md);
}

.dialog__header,
.dialog__footer {
	&:empty,
	&:has(slot:empty) {
		display: none;
	}
}

.dialog__header {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	padding: var(--g-spacing-md);
	border-bottom: var(--g-border-width-sm) solid
		var(--g-color-border-default);
}

.dialog__footer ::slotted(grantcodes-button-group) {
	--g-border-radius-md: 0;
}
