.body-overlayed embed, .body-overlayed object, .body-overlayed select
{
	visibility:				hidden;
}

#sbox-window embed, #sbox-window object, #sbox-window select
{
	visibility:				visible;
}

#sbox-overlay
{
	position:				absolute;
	background-color:		#000;
}

#sbox-window
{
	position:				absolute;
	background-color:		#fff;
	text-align:				left;
	overflow:				visible;
	padding:					4px;
	-moz-border-radius:		3px;
}

/* Адаптация модальных окон для мобильных устройств */
@media screen and (max-width: 768px) {
	#sbox-window {
		width: 98% !important;
		max-width: 98% !important;
		left: 50% !important;
		top: 50% !important;
		transform: translate(-50%, -50%) !important;
		margin-left: 0 !important;
		margin-top: 0 !important;
		padding: 5px !important;
		max-height: 95vh !important;
		height: auto !important;
		overflow-y: auto !important;
		position: fixed !important;
	}
	
	#sbox-content {
		width: 100% !important;
		max-height: calc(95vh - 40px) !important;
		height: auto !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch !important;
		box-sizing: border-box !important;
		padding: 0 !important;
	}
	
	#sbox-btn-close {
		width: 40px !important;
		height: 40px !important;
		right: 5px !important;
		top: 5px !important;
		background-size: contain !important;
		z-index: 10001 !important;
		cursor: pointer !important;
	}
	
	#sbox-overlay {
		opacity: 0.8 !important;
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		width: 100% !important;
		height: 100% !important;
	}
	
	/* Адаптация iframe внутри модального окна */
	#sbox-content iframe {
		width: 100% !important;
		max-width: 100% !important;
		height: calc(95vh - 40px) !important;
		min-height: calc(95vh - 40px) !important;
		max-height: calc(95vh - 40px) !important;
		border: none !important;
		display: block !important;
		box-sizing: border-box !important;
	}
	
	/* Адаптация таблиц внутри модального окна */
	#sbox-content table {
		width: 100% !important;
		max-width: 100% !important;
		font-size: 12px !important;
		table-layout: auto !important;
	}
	
	/* Улучшение читаемости текста */
	#sbox-content {
		font-size: 14px !important;
		line-height: 1.5 !important;
		padding: 5px !important;
		box-sizing: border-box !important;
	}
	
	/* Адаптация всех элементов внутри модального окна */
	#sbox-content * {
		max-width: 100% !important;
		box-sizing: border-box !important;
	}
}

@media screen and (max-width: 480px) {
	#sbox-window {
		width: 98% !important;
		padding: 5px !important;
		max-height: 95vh !important;
	}
	
	#sbox-content {
		max-height: calc(95vh - 40px) !important;
	}
	
	#sbox-content iframe {
		min-height: 300px !important;
		max-height: calc(95vh - 40px) !important;
	}
}

#sbox-btn-close
{
	position:				absolute;
	width:					30px;
	height:					30px;
	right:					-15px;
	top:					-15px;
	background:				url(../images/closebox.png) no-repeat center;
	border:					none;
}

.sbox-window-ie6 #sbox-btn-close
{
	background-image:		url(../images/closebox.gif);
}

.sbox-loading #sbox-content
{
	background-image:		url(../images/spinner.gif);
	background-repeat:		no-repeat;
	background-position:	center;
}

#sbox-content
{
	clear:					both;
	overflow:				auto;
	background-color:		#fff;
	height:					100%;
	width:					100%;
}

.sbox-content-image#sbox-content
{
	overflow:				visible;
}

#sbox-image
{
	display:				block;
}

.sbox-content-image img
{
	display:				block;
}

.sbox-content-iframe#sbox-content
{
	overflow:				visible;
}

/* ОПТИМИЗАЦИЯ: Удалены устаревшие свойства для старых браузеров */
.footer
{
	font-family: Verdana, sans-serif;
	font-size: 12px;
	background-color: #EEEEEE;
	border: 1px solid #DDDDDD;
	opacity: 0.85;
	text-align: center;
}

.mfooter
{
	font-family: Verdana, sans-serif;
	font-size: 12px;
	background-color: #EEEEEE;
	border: 1px solid #DDDDDD;
	opacity: 0.85;
	text-align: center;
	width: 200px;
}


a.Main 
{
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid #eee;
	border-right-color: #ddd;
	border-bottom-color: #ddd;
	text-align: center;
	font-family: "Trebuchet MS",Verdana, Geneva, Arial, Helvetica, sans-serif;
	z-index: 50;
	font-size: 12px;
	text-decoration: none;
}
a.Main:hover
{
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid #eee;
	border-right-color: #ddd;
	border-bottom-color: #ddd;
	text-align: center;
	font-family: "Trebuchet MS",Verdana, Geneva, Arial, Helvetica, sans-serif;
	z-index: 50;
	font-size: 12px;
	color: #FFFFFF;
	text-decoration: none;
}

.wTitle
{
	border-style: none;
	background-color: transparent;
	font-family: Verdana, Arial, Tahoma;
	FONT-SIZE: 14px;
	COLOR: #FFF;
	font-weight: bold;
}

.sTitle
{
	border-style: none;
	background-color: transparent;
	font-family: Verdana, Arial, Tahoma;
	FONT-SIZE: 12px;
	COLOR: #FFF;
}
