/* 載入順序：msgbox.css → msgbox_style4.css（擇一使用延伸樣式）。 */
.public-msg-box {
	--msgbox-primary-bg: #d6e3ef;
	--msgbox-primary-hover: #c6d8e8;
	--msgbox-primary-active: #b8cfe2;
	--msgbox-primary-border: #bfcfdf;
	--msgbox-primary-text: #344f6b;
	--bs-modal-bg: #fff;
	--bs-modal-border-color: #edf0f4;
	--bs-modal-border-radius: 20px;
}
.public-msg-box .modal-content,
.public-msg-box.modal_Short > .modal-dialog > .modal-content {
	background: #fff;
	border: 1px solid #edf0f4;
	border-radius: 20px;
	box-shadow: 0 20px 48px -16px rgb(32 45 64 / 20%);
}
.public-msg-box .modal-header,
.public-msg-box.modal_danger .modal-header,
.public-msg-box.modal_warning .modal-header,
.public-msg-box.modal_success .modal-header,
.public-msg-box.modal_s1 .modal-header {
	background: #fff!important;
	border-bottom: 0;
	border-radius: 20px 20px 0 0;
	padding: 28px 28px 16px;
	min-height: 72px;
	text-align: left;
	gap: 16px;
}
.public-msg-box .modal-header > .modal-title {
	color: #29313a;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.5;
	width: auto;
	min-width: 0;
	flex: 1;
	overflow-wrap: anywhere;
}
.public-msg-box .modal-funTools {
	position: static;
	display: flex;
	align-items: center;
	align-self: flex-start;
	flex-shrink: 0;
	gap: 8px;
}
.public-msg-box .modal-funTools > * + * {
	margin-left: 0!important;
}
.public-msg-box .modal-close,
.public-msg-box .modal-btn-fullscreen {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 8px;
	background-color: transparent;
	transition: background-color .15s ease, border-color .15s ease;
}
.public-msg-box .closeBtn {
	width: 16px;
	height: 16px;
}
.public-msg-box .closeBtn::before,
.public-msg-box .closeBtn::after {
	top: 50%;
	left: 50%;
	width: 16px;
	height: 1.5px;
	margin: 0;
	background-color: #515b67;
	transition: none;
}
.public-msg-box .closeBtn::before,
.public-msg-box .closeBtn:hover::before {
	transform: translate(-50%, -50%) rotate(-45deg);
}
.public-msg-box .closeBtn::after,
.public-msg-box .closeBtn:hover::after {
	transform: translate(-50%, -50%) rotate(45deg);
}
.public-msg-box .modal-btn-fullscreen {
	background-size: 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23515b67' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4H4v4m12-4h4v4M4 16v4h4m12-4v4h-4'/%3E%3C/svg%3E");
}
.public-msg-box .modal-close:hover,
.public-msg-box .modal-btn-fullscreen:hover {
	background-color: #f1f3f6;
	border-color: transparent;
	animation: none;
}
.public-msg-box .modal-body {
	padding: 12px 28px 28px;
	scrollbar-width: thin;
	scrollbar-color: #bfcfdf #f5f7fa;
}
.public-msg-box .modal-footer {
	justify-content: flex-end;
	gap: 10px;
	padding: 0 28px 28px;
	border-top: 0;
	border-radius: 0 0 20px 20px;
	background: #fff;
}
.public-msg-box .modal-footer > .btn {
	margin: 0;
	min-height: 42px;
	padding: 9px 20px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: transparent;
	color: #3d526b;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	box-shadow: none;
	transition: background-color .15s ease, border-color .15s ease;
}
.public-msg-box .modal-footer > .btn:hover {
	background: #f1f5f9;
	border-color: transparent;
}
.public-msg-box .modal-footer > .btn:active {
	background: #e6edf4;
}
.public-msg-box .modal-footer > .modalRunFun {
	order: 1;
	color: var(--msgbox-primary-text);
	background: var(--msgbox-primary-bg);
	border-color: var(--msgbox-primary-border);
}
.public-msg-box .modal-footer > .modalRunFun:hover {
	background: var(--msgbox-primary-hover);
	border-color: var(--msgbox-primary-border);
}
.public-msg-box .modal-footer > .modalRunFun:active {
	background: var(--msgbox-primary-active);
}
.public-msg-box .modal-footer > .btn:focus-visible,
.public-msg-box .modal-btn-fullscreen:focus-visible,
.public-msg-box .modal-close:focus-visible {
	outline: 3px solid #91adc7;
	outline-offset: 3px;
	box-shadow: none;
}
.public-msg-box .modal-dialog.modal-fullscreen > .modal-content,
.public-msg-box .modal-dialog.modal-fullscreen .modal-header,
.public-msg-box .modal-dialog.modal-fullscreen .modal-footer {
	border-radius: 0;
}
.public-msg-box.modal.fade .modal-dialog {
	transform: translateY(8px);
	transition: transform .18s ease-out;
}
.public-msg-box.modal.show .modal-dialog {
	transform: none;
}
@media (max-width: 575.98px) {
	.public-msg-box {
		--bs-modal-margin: 12px;
	}
	.public-msg-box .modal-header {
		padding: 24px 24px 12px;
	}
	.public-msg-box .modal-body {
		padding: 12px 24px 24px;
	}
	.public-msg-box .modal-footer {
		padding: 0 24px 24px;
		gap: 8px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.public-msg-box.modal.fade .modal-dialog,
	.public-msg-box .modal-close,
	.public-msg-box .modal-btn-fullscreen,
	.public-msg-box .modal-footer > .btn {
		transition: none;
	}
}
