/* Common app modal */

#modalContainer
{
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10000;
}

#modalContainer.show
{
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-overlay
{
	position: absolute;
	inset: 0;
	background: rgba(20, 24, 32, 0.42);
}

.modal-box
{
	position: relative;
	width: min(460px, calc(100vw - 32px));
	background: #f8f5ee;
	border: 1px solid #c9c1b4;
	border-radius: 10px;
	box-shadow: 0 18px 40px rgba(33, 37, 45, 0.24);
	color: #2c2d30;
	transform: translateY(10px) scale(0.98);
	opacity: 0;
	transition: transform 0.16s ease, opacity 0.16s ease;
}

.modal-box.show
{
	transform: translateY(0) scale(1);
	opacity: 1;
}

.modal-box.is-loading
{
	cursor: progress;
}

.modal-box.is-loading .modal-btn
{
	pointer-events: none;
	opacity: 0.65;
}

.modal-header
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px 12px;
	border-bottom: 1px solid rgba(80, 73, 61, 0.12);
}

.modal-title
{
	font-size: 17px;
	line-height: 1.3;
	font-weight: 600;
	color: #2a2622;
}

.modal-close
{
	width: 28px;
	height: 28px;
	padding: 0;
	border: none;
	background: transparent;
	color: #6e655a;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.modal-close:hover
{
	color: #27231f;
}

.modal-body
{
	padding: 20px 18px 16px;
	text-align: center;
}

.modal-icon
{
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
}

.modal-text
{
	font-size: 14px;
	line-height: 1.6;
	color: #4d4b47;
	word-break: keep-all;
	white-space: pre-line;
}

.modal-input
{
	width: 100%;
	height: 38px;
	margin-top: 14px;
	padding: 0 12px;
	border: 1px solid #c8c0b3;
	border-radius: 6px;
	background: #ffffff;
	color: #2f2d29;
	font-size: 14px;
	box-sizing: border-box;
}

.modal-input:focus
{
	outline: none;
	border-color: #4d81c6;
	box-shadow: 0 0 0 3px rgba(77, 129, 198, 0.18);
}

.modal-error
{
	margin-top: 10px;
	padding: 9px 10px;
	border-radius: 6px;
	background: #f6d9d3;
	color: #8d3229;
	font-size: 13px;
	line-height: 1.4;
	text-align: left;
}

.modal-footer
{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 18px 18px;
}

.modal-footer.is-hidden
{
	display: none;
}

.modal-btn
{
	min-width: 96px;
	height: 36px;
	padding: 0 16px;
	border: 1px solid transparent;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.modal-btn-confirm
{
	background: #2f6db3;
	border-color: #275f9f;
	color: #ffffff;
}

.modal-btn-confirm:hover
{
	background: #285f9c;
}

.modal-btn-cancel
{
	background: #ece7dd;
	border-color: #c6bcab;
	color: #50493f;
}

.modal-btn-cancel:hover
{
	background: #e1dbce;
}

.modal-box[data-type="success"] .modal-btn-confirm
{
	background: #2f8b57;
	border-color: #267047;
}

.modal-box[data-type="success"] .modal-btn-confirm:hover
{
	background: #286f47;
}

.modal-box[data-type="warning"] .modal-btn-confirm
{
	background: #c98217;
	border-color: #aa6d12;
}

.modal-box[data-type="warning"] .modal-btn-confirm:hover
{
	background: #af7114;
}

.modal-box[data-type="error"] .modal-btn-confirm
{
	background: #b3473d;
	border-color: #983a31;
}

.modal-box[data-type="error"] .modal-btn-confirm:hover
{
	background: #973a31;
}

.modal-box[data-type="confirm"] .modal-btn-confirm
{
	background: #6c5a9c;
	border-color: #594988;
}

.modal-box[data-type="confirm"] .modal-btn-confirm:hover
{
	background: #594988;
}

.modal-box[data-type="prompt"] .modal-btn-confirm
{
	background: #1f8c85;
	border-color: #18716b;
}

.modal-box[data-type="prompt"] .modal-btn-confirm:hover
{
	background: #18716b;
}
