/* modal.css */
/* WebOne 2026 */
/* This file contains styles for the modal component, including the backdrop, dialog, inline spinner, and transitions. */

.app-modal[hidden] {
	display: none !important;
}

.app-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.app-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 14, 20, 0.58);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity 0.18s ease;
}

.app-modal__dialog {
	position: relative;
	z-index: 2;
	/* width: min(500px, 100%); */
	width: min-content;
	min-width: 500px;
	max-height: min(85vh, 900px);
	overflow: auto;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 24px;
	box-shadow:
		0 24px 80px rgba(0, 0, 0, 0.22),
		0 8px 24px rgba(0, 0, 0, 0.10);
	padding: 32px;
	opacity: 0;
	transform: translateY(20px) scale(0.98);
	transition:
		opacity 0.18s ease,
		transform 0.18s ease;
}

.app-modal__dialog::-webkit-scrollbar {
	width: 8px;
	/* Width of the scrollbar */
}

.app-modal__dialog::-webkit-scrollbar-track {
	background: #f1f1f1;
	/* Color of the track */
	border-radius: 40px;
	margin: 100px;
	/* Adds space between track and container edge */
}

.app-modal__dialog::-webkit-scrollbar-thumb {
	background: #888;
	/* Color of the handle */
	border-radius: 40px;
	/* Rounded handle */
	border: 1px solid #f1f1f1;
	/* Creates padding around the handle */
}

.app-modal__dialog::-webkit-scrollbar-thumb:hover {
	background: #555;
	/* Darker on hover */
}

.app-modal__dialog textarea {
	border-radius: 8px;
	overflow: auto;
}

.app-modal__dialog textarea::-webkit-scrollbar {
	width: 8px;
}

.app-modal__dialog textarea::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 8px;
}

.app-modal__dialog textarea::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 10px;
	border: 1px solid #f1f1f1;
}

.app-modal__dialog textarea::-webkit-scrollbar-thumb:hover {
	background: #555;
}

.app-modal.is-open .app-modal__backdrop {
	opacity: 1;
}

.app-modal.is-open .app-modal__dialog {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.app-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	background: #f3f5f7;
	color: #111;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition:
		transform 0.15s ease,
		background 0.15s ease;
}

.app-modal__close:hover {
	background: #e8edf2;
	transform: scale(1.04);
}

.app-modal__content {
	color: #1a1a1a;
	display: flex;
	flex-direction: column;
}

.modal-content-box {
	display: flex;
	flex-direction: column;
}

.modal-content-box h2 {
	padding-bottom: 1rem;
}

.modal-panel__title {
	display: flex;
	justify-content: center;
	margin: 0 0 12px;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 700;
	color: #101828;
}

.modal-panel__text {
	font-size: 16px;
	line-height: 1.65;
	color: #475467;
	margin-bottom: 20px;
	text-align: center;
	text-wrap: balance;
	/* Fallback for browsers that do not support 'text-wrap: balance' */
	overflow-wrap: break-word;
}

.modal-panel__actions {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 24px;
}

.modal-panel__actions .btn {
	min-width: 12rem;
}

.modal-panel .input {
	margin-top: 16px;
}

.modal-panel .input label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #344054;
}

.modal-panel .input input {
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border: 1px solid #d0d5dd;
	border-radius: 14px;
	outline: none;
	font-size: 15px;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
	box-sizing: border-box;
}

.modal-panel .input input:focus {
	border-color: #da6201;
	box-shadow: 0 0 0 4px rgba(218, 98, 1, 0.12);
}

.modal-input {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	width: 100%;
}

.modal-action-group {
	width: 100%;
	display: flex;
	justify-content: space-evenly;
	gap: 0.75rem;
	flex-wrap: nowrap;
	align-items: stretch;
}

.modal-action-group .btn {
	flex: 1 1 0;
	flex-basis: auto;
}

.modal-redirect-status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 72px;
	width: 100%;
	font-size: 18px;
	font-weight: 600;
	color: #101828;
}

.modal-redirect-status__text {
	display: inline-block;
}

.modal-inline-loader {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.lds-roller--small {
	transform: scale(0.5);
	transform-origin: center center;
	margin: 0;
}

.app-modal__dialog--wizard {
	width: min(1240px, 96vw);
	min-width: 1100px;
	max-width: 1240px;
	max-height: 94vh;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	overflow: visible;
}

.app-modal__dialog--wizard .app-modal__close {
	top: 16px;
	right: 16px;
	background: transparent;
	color: #9ab8bd;
	font-size: 42px;
	z-index: 5;
}

.app-modal__dialog--wizard .app-modal__close:hover {
	background: transparent;
	transform: none;
	color: #7ea4aa;
}

@media (max-width: 1180px) {
	.app-modal__dialog--wizard {
		min-width: 0;
		width: min(96vw, 96vw);
		max-height: 96vh;
	}
}


@media (max-width: 640px) {
	.app-modal {
		padding: 14px;
	}

	.app-modal__dialog {
		padding: 22px;
		border-radius: 18px;
	}

	.modal-panel__title {
		font-size: 22px;
	}

	.modal-action-group {
		flex-wrap: wrap;
	}
}
