/* plg_system_welcomeaudio — dialog sambutan */
.wa-dialog {
	--wa-green: #28a745;
	--wa-green-bright: #4ade80;
	--wa-dark: #07110b;
	position: fixed;
	inset: 0;
	width: min(1100px, calc(100vw - 32px));
	max-width: 1100px;
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 18px;
	overflow: visible;
	background: transparent;
	color: #fff;
	font-family: inherit;
	z-index: 99999;
}
.wa-dialog:focus { outline: none; }
.wa-shell {
	position: relative;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: 18px;
	background: var(--wa-dark);
	box-shadow:
		0 30px 90px rgb(0 0 0 / .6),
		0 0 0 1px rgb(255 255 255 / .12) inset;
	scrollbar-width: thin;
	scrollbar-color: rgb(255 255 255 / .28) transparent;
}
.wa-dialog[open] {
	display: block;
	animation: wa-dialog-in .3s cubic-bezier(.2, .8, .25, 1) both;
}
.wa-dialog[open]::backdrop {
	background: rgb(3 10 6 / .78);
	backdrop-filter: blur(7px);
	-webkit-backdrop-filter: blur(7px);
	animation: wa-backdrop-in .28s ease both;
}
.wa-dialog.is-closing {
	animation: wa-dialog-out .18s ease both;
}
.wa-dialog.is-closing::backdrop {
	animation: wa-backdrop-out .18s ease both;
}
@keyframes wa-dialog-in {
	from { opacity: 0; transform: translateY(14px) scale(.975); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes wa-dialog-out {
	from { opacity: 1; transform: translateY(0) scale(1); }
	to { opacity: 0; transform: translateY(8px) scale(.985); }
}
@keyframes wa-backdrop-in {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes wa-backdrop-out {
	from { opacity: 1; }
	to { opacity: 0; }
}

.wa-media {
	position: relative;
	line-height: 0;
	background: #000;
}
.wa-media img {
	display: block;
	width: 100%;
	height: auto;
}

.wa-close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 2;
	width: 42px;
	height: 42px;
	padding: 0;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / .95);
	color: #10251a;
	cursor: pointer;
	box-shadow: 0 6px 20px rgb(0 0 0 / .3);
	transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.wa-close svg {
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
}
.wa-close:hover {
	background: var(--wa-green);
	color: #fff;
	transform: scale(1.06);
	box-shadow: 0 8px 24px rgb(0 0 0 / .38);
}
.wa-close:active { transform: scale(.97); }
.wa-close:focus-visible,
.wa-sound:focus-visible {
	outline: 3px solid #ffd166;
	outline-offset: 3px;
}

.wa-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px 18px;
	padding: 12px 16px 14px;
	background: linear-gradient(180deg, #0d1c13 0%, #08120c 100%);
	border-top: 1px solid rgb(255 255 255 / .08);
}
.wa-footer--quiet { justify-content: flex-end; }

.wa-sound {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 9px 14px;
	border: 1px solid rgb(40 167 69 / .55);
	border-radius: 999px;
	background: rgb(40 167 69 / .14);
	color: #d9f7e2;
	font: inherit;
	font-size: .84rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.wa-sound__icon {
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
}
.wa-sound svg {
	width: 18px;
	height: 18px;
	overflow: visible;
}
.wa-sound__body {
	fill: currentColor;
	stroke: none;
}
.wa-sound__wave {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.wa-sound:hover {
	background: rgb(40 167 69 / .3);
	border-color: var(--wa-green-bright);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgb(40 167 69 / .22);
}
.wa-sound:active { transform: translateY(0); }
.wa-sound.is-playing {
	background: var(--wa-green);
	border-color: var(--wa-green);
	color: #fff;
}
.wa-sound.is-playing .wa-sound__wave { animation: wa-wave 1.2s ease-in-out infinite; }
.wa-sound.is-attention {
	animation: wa-attention 1.8s ease-in-out infinite;
}
@keyframes wa-wave {
	0%, 100% { opacity: 1; }
	50% { opacity: .35; }
}
@keyframes wa-attention {
	0%, 100% { box-shadow: 0 0 0 0 rgb(74 222 128 / .35); }
	50% { box-shadow: 0 0 0 7px rgb(74 222 128 / 0); }
}

.wa-hint {
	margin: 0;
	color: rgb(255 255 255 / .58);
	font-size: .76rem;
	font-weight: 500;
	line-height: 1.4;
	text-align: right;
}
.wa-audio { display: none; }

html.wa-modal-open,
html.wa-modal-open body {
	overflow: hidden !important;
}

@media (max-width: 640px) {
	.wa-dialog {
		width: calc(100vw - 28px);
	}
	.wa-shell {
		max-height: calc(100vh - 28px);
		max-height: calc(100dvh - 28px);
		border-radius: 14px;
	}
	.wa-close { top: -10px; right: -10px; width: 36px; height: 36px; }
	.wa-close svg { width: 18px; height: 18px; }
	.wa-footer { padding: 10px 12px 12px; gap: 8px 12px; }
	.wa-sound { padding: 8px 12px; font-size: .8rem; gap: 7px; }
	.wa-hint { font-size: .7rem; }
}

@media (max-width: 430px) {
	.wa-footer { justify-content: center; }
	.wa-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.wa-dialog[open],
	.wa-dialog[open]::backdrop,
	.wa-dialog.is-closing,
	.wa-dialog.is-closing::backdrop {
		animation: none;
	}
	.wa-dialog,
	.wa-close,
	.wa-sound {
		transition: none;
	}
	.wa-sound.is-playing .wa-sound__wave,
	.wa-sound.is-attention {
		animation: none;
	}
	.wa-close:hover,
	.wa-sound:hover {
		transform: none;
	}
}

/* Tombol tutup disembunyikan sebentar (klik pertama / 3 detik). Esc dan keyboard tetap bisa menutup dialog. */
.wa-dialog.is-waiting .wa-close {
	opacity: 0;
	pointer-events: none;
}
.wa-dialog .wa-close {
	transition: opacity .35s ease, transform .15s ease;
}
