/**
 * Doctor Modal — shell & overlay (profile content styled in doctor-profile.css)
 */

.dap-doctor-modal-trigger {
	cursor: pointer;
}

a.dap-doctor-modal-link {
	cursor: pointer;
}

body.dap-modal-open {
	overflow: hidden;
	padding-right: 15px;
}

.dap-doctor-modal {
	visibility: hidden;
	opacity: 0;
	position: fixed;
	inset: 0;
	z-index: 999999;
	transition: visibility 0.35s, opacity 0.35s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.dap-doctor-modal.active {
	visibility: visible;
	opacity: 1;
}

.dap-doctor-modal ul {
	margin: 0 !important;
	padding: 0 !important;
}

.dap-doctor-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(12, 35, 64, 0.45);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.dap-doctor-modal-content {
	position: relative;
	width: 100%;
	max-width: 720px;
	background: #ffffff;
	padding: clamp(1.25rem, 4vw, 2rem);
	border-radius: 22px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 32px 64px rgba(12, 35, 64, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.08);
	transform: scale(0.97) translateY(12px);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
	opacity: 0;
}

.dap-doctor-modal.active .dap-doctor-modal-content {
	transform: scale(1) translateY(0);
	opacity: 1;
}

.dap-doctor-modal-content::-webkit-scrollbar {
	width: 6px;
}

.dap-doctor-modal-content::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 99px;
}

.dap-doctor-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f1f5f9;
	color: #0c2340;
	font-size: 22px;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
	line-height: 1;
	padding: 0;
	z-index: 2;
}

.dap-doctor-modal-close:hover {
	background: #0ea5e9;
	color: #fff;
	transform: rotate(90deg);
}

.dap-modal-loader {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 100px 0;
}

.dap-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(14, 165, 233, 0.15);
	border-top-color: #0ea5e9;
	border-radius: 50%;
	animation: dap-spin 0.8s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
}

@keyframes dap-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
	.dap-doctor-modal {
		padding: 0;
		align-items: flex-end;
	}

	.dap-doctor-modal-content {
		max-width: 100%;
		max-height: 92vh;
		border-radius: 22px 22px 0 0;
		padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
	}

	.dap-modal-profile-top {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.dap-modal-photo-wrap {
		width: 88px;
		height: 88px;
	}

	.dap-modal-profile-meta {
		justify-content: center;
	}
}
