body.site-modal-open {
	overflow: hidden;
	padding-right: var(--scrollbar-width, 0);
}

/* Overlay */
.site-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	z-index: 999999;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.3s ease;
	overscroll-behavior: contain;
	pointer-events: none;
}

.site-modal-overlay.site-modal-active {
	display: flex;
	opacity: 1;
	pointer-events: auto;
}

/* Modal */
.site-modal {
	position: relative;
	max-width: 640px;
	width: 100%;
	max-height: 85vh;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 1000000;
	animation: site_modal_slide_up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform, opacity;
	margin: auto;
}

@keyframes site_modal_slide_up {
	from {
		transform: translateY(60px) scale(0.95);
		opacity: 0;
	}
	to {
		transform: translateY(0) scale(1);
		opacity: 1;
	}
}

/* Header */
.site-modal .site-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 24px 28px;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.site-modal .site-modal-title {
	font-size: 24px;
	font-weight: 600;
	color: #111827;
	margin: 0;
	line-height: 1.3;
}

.site-modal .site-modal-close {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 8px;
	font-size: 18px;
	cursor: pointer;
	transition: all 0.2s;
	flex-shrink: 0;
	outline: none !important;
	padding: 10px;
	color: #180A32;
	background-color: #FFFFFF;
	border-style: solid;
	border-width: 0px;
}

.site-modal .site-modal-close:hover {
	background: #666666;
	color: #fff;
	border-radius: 40px;
}

/* Body */
.site-modal .site-modal-body {
	padding: 24px 28px;
	overflow-y: auto;
	overflow-x: hidden;
	flex: 1;
	min-height: 0;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: #d1d5db #f3f4f6;
}

.site-modal .site-modal-body::-webkit-scrollbar {
	width: 8px;
}

.site-modal .site-modal-body::-webkit-scrollbar-track {
	background: #f3f4f6;
}

.site-modal .site-modal-body::-webkit-scrollbar-thumb {
	background: #d1d5db;
	border-radius: 4px;
}

.site-modal .site-modal-body::-webkit-scrollbar-thumb:hover {
	background: #9ca3af;
}

/* Mobile adjustments */
@media (max-width: 768px) {
	.site-modal-overlay {
		padding: 80px 0 0 0;
		align-items: flex-start;
	}

	.site-modal {
		border-radius: 16px;
		margin: 0;
		max-height: calc(100vh - 80px);
		height: auto;
		min-height: 300px;
	}

	.site-modal .site-modal-header {
		padding: 20px;
	}

	.site-modal .site-modal-body {
		padding: 20px;
		flex: 1 1 auto;
		min-height: 200px;
		max-height: calc(100vh - 160px);
		overflow-y: scroll !important;
	}

	.site-modal .site-modal-title {
		font-size: 20px;
	}
}

@media (max-width: 768px) and (max-height: 600px) {
	.site-modal-overlay {
		padding: 60px 0 0 0;
	}

	.site-modal {
		max-height: calc(100vh - 60px);
		border-radius: 12px;
	}

	.site-modal .site-modal-body {
		max-height: calc(100vh - 140px);
	}
}

@media (max-width: 768px) and (min-height: 800px) {
	.site-modal-overlay {
		padding: 100px 0 0 0;
	}

	.site-modal {
		max-height: calc(100vh - 100px);
	}

	.site-modal .site-modal-body {
		max-height: calc(100vh - 180px);
	}
}

.site-modal .site-modal-input {
	width: 100%;
	padding: 5px 15px;
	border-radius: 5px;
	border: 1px solid #ced4da;
}

.site-modal .site-modal-input:focus {
	border: 1px solid #a4a4a4 !important;
}
