/*
 * EMD 3D viewer stilleri.
 * Asama 2: sabit ornek 3D panel.
 */

.emd_3d_toggle {
	position: fixed;
	right: 10px;
	bottom: 14px;
	z-index: 9998;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 42px;
	height: 34px;
	padding: 0 11px;
	border: 1px solid #176d8f;
	border-radius: 8px;
	background: #0d83ad;
	color: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
}

.emd_3d_toggle:hover {
	background: #109bc9;
}

.emd_3d_overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	background: #000;
	opacity: .2;
}

.emd_3d_overlay.open {
	display: block;
}

.emd_3d_panel {
	position: fixed;
	left: 50%;
	top: 50%;
	z-index: 10000;
	display: none;
	width: min(1320px, calc(100vw - 18px));
	height: min(840px, calc(100vh - 18px));
	transform: translate(-50%, -50%);
	border: 1px solid #cdd8df;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 18px 60px rgba(0, 0, 0, .32);
	overscroll-behavior: contain;
	overflow: hidden;
}

.emd_3d_panel.open {
	display: flex;
	flex-direction: column;
}

.emd_3d_toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 42px;
	padding: 6px 8px 6px 12px;
	border-bottom: 1px solid #dbe4ea;
	background: #f7fafc;
}

.emd_3d_baslik {
	flex: 1 1 auto;
	color: #22313a;
	font-size: 14px;
	font-weight: 700;
}

.emd_3d_toolbar_actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.emd_3d_help,
.emd_3d_reset,
.emd_3d_close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 6px;
	background: #dfe8ee;
	color: #23313a;
	cursor: pointer;
}

.emd_3d_help {
	width: 30px;
	height: 30px;
	font-size: 14px;
	font-weight: 800;
}

.emd_3d_reset {
	min-width: 48px;
	height: 30px;
	padding: 0 9px;
	font-size: 12px;
	font-weight: 700;
}

.emd_3d_close {
	width: 30px;
	height: 30px;
	font-size: 18px;
	line-height: 1;
}

.emd_3d_help_popover {
	position: absolute;
	right: 46px;
	top: 48px;
	z-index: 2;
	display: none;
	width: min(280px, calc(100% - 24px));
	padding: 11px 13px;
	border: 1px solid #cdd8df;
	border-radius: 8px;
	background: #fff;
	color: #22313a;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
	font-size: 13px;
	line-height: 1.35;
}

.emd_3d_help_popover.open {
	display: block;
}

.emd_3d_help_popover strong {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
}

.emd_3d_help_popover ul {
	margin: 0;
	padding-left: 17px;
}

.emd_3d_help_popover li + li {
	margin-top: 4px;
}

.emd_3d_reset:hover,
.emd_3d_help:hover,
.emd_3d_close:hover {
	background: #cbd9e1;
}

.emd_3d_viewer {
	position: relative;
	flex: 1 1 auto;
	min-height: 260px;
	background-color: #eef4f7;
	background-image: radial-gradient(circle, rgba(38, 73, 91, .22) 1.2px, transparent 1.4px);
	background-position: 0 0;
	background-size: 40px 40px;
}

.emd_3d_viewer canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.emd_3d_mesaj {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(360px, calc(100% - 32px));
	transform: translate(-50%, -50%);
	padding: 12px 14px;
	border: 1px solid #d8e3e9;
	border-radius: 8px;
	background: #fff;
	color: #34434c;
	text-align: center;
	font-size: 13px;
	line-height: 1.4;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.emd_3d_hata {
	border-color: #f0b9bd;
	background: #fff7f7;
	color: #9f2931;
}

@media (max-width: 640px) {
	.emd_3d_toggle {
		right: 8px;
		bottom: 10px;
		padding: 0 9px;
	}

	.emd_3d_panel {
		width: calc(100vw - 12px);
		height: calc(100vh - 12px);
		border-radius: 6px;
	}

	.emd_3d_help_popover {
		right: 8px;
		top: 48px;
	}
}
