.mmc-media-widget-wrapper {
	display: flex;
	flex-direction: row;
	width: 100%;
	height: 450px; 
	overflow: hidden; 
	position: relative;
	direction: rtl;
	background: #f9f9f9; 
}

.mmc-viewer-hidden .mmc-media-viewer-column {
	display: none;
}
.mmc-viewer-hidden .mmc-media-list-column {
	flex-basis: 100% !important; 
	border: none !important; 
	height: auto !important; 
	min-height: 200px; 
}
.mmc-viewer-hidden.mmc-list-display-vertical_scroll .mmc-media-list {
	overflow-y: visible; 
}
.mmc-viewer-hidden .mmc-media-list li {
	cursor: pointer; 
}

.mmc-media-list-column {
	flex-basis: 35%; 
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden; 
	background: #ffffff; 
	height: 100%; 
	position: relative; 
}

.mmc-media-viewer-column {
	flex-basis: 65%; 
	flex-grow: 1; 
	height: 100%; 
	display: flex; 
	align-items: center;
	justify-content: center;
	position: relative; 
	overflow: hidden; 
}

.mmc-list-pos-left .mmc-media-list-column {
	order: 1;
	border-left: 1px solid #e0e0e0;
}
.mmc-list-pos-left .mmc-media-viewer-column {
	order: 2;
}
.mmc-list-pos-right .mmc-media-list-column {
	order: 2;
	border-right: 1px solid #e0e0e0;
}
.mmc-list-pos-right .mmc-media-viewer-column {
	order: 1;
}


.mmc-list-header {
	padding: 15px 15px 10px 15px;
	border-bottom: 1px solid #e0e0e0;
	flex-shrink: 0;
	position: relative; 
}

.mmc-list-header.mmc-list-header-has-search,
.mmc-list-header:has(.mmc-list-search-wrap) {
	padding-bottom: 0;
	border-bottom: none;
}

.mmc-list-header-main {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 5px;
	gap: 10px; 
	position: relative; 
}

.mmc-list-back-button {
	display: none; 
	font-size: 16px;
	color: #555;
	text-decoration: none;
	padding: 5px;
	margin-left: 8px;
	line-height: 1;
	transition: color 0.2s ease;
	flex-shrink: 0;
}
.mmc-list-is-hierarchical .mmc-list-back-button.mmc-active {
	display: block; 
}

.mmc-list-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0;
	color: #333;
	flex-grow: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: all 0.3s ease; 
	margin-right: 0; 
}


.mmc-list-subtitle {
	font-size: 13px;
	color: #777;
	margin: 0;
	font-weight: 400;
}

.mmc-list-search-wrap {
	margin: 0 -15px;
	padding: 0;
	border-top: 1px solid #e0e0e0;
	background: #fff;
}

.mmc-list-search {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	border: 0;
	border-radius: 0;
	padding: 11px 15px;
	font-size: 13px;
	line-height: 1.4;
	color: #333;
	background: transparent;
	outline: none;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
}

.mmc-list-search::placeholder {
	color: #9aa3ad;
}

.mmc-list-search:focus {
	background: #f7fafc;
	box-shadow: none;
}

.mmc-list-search::-webkit-search-decoration,
.mmc-list-search::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.mmc-list-item-text-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	min-width: 0;
	flex-grow: 1;
	gap: 2px;
}

.mmc-search-parent {
	display: block;
	font-size: 11px;
	font-weight: 400;
	color: #8a949e;
	line-height: 1.2;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mmc-thumb-placeholder {
	display: inline-block;
	width: 40px;
	height: 40px;
	border-radius: 6px;
	background: linear-gradient(135deg, #eef2f5 0%, #dde4ea 100%);
	flex-shrink: 0;
}

.mmc-retry-btn {
	display: inline-block;
	margin-right: 8px;
	margin-top: 6px;
	padding: 6px 12px;
	border: 1px solid var(--mmc-main-color, #0079AD);
	border-radius: 6px;
	background: #fff;
	color: var(--mmc-main-color, #0079AD);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.3;
}

.mmc-retry-btn:hover,
.mmc-retry-btn:focus {
	background: var(--mmc-main-color, #0079AD);
	color: #fff;
}

.mmc-error-text {
	display: inline-block;
	max-width: 100%;
}

/* --- شروع تغییرات برای رفع ارور کنتراست --- */
.mmc-view-all-button {
	font-size: 13px;
	font-weight: 700; /* ضخامت فونت افزایش یافت تا خوانایی بهتر شود */
	text-decoration: none;
	padding: 5px 12px;
	border: 2px solid; 
	border-radius: 20px;
	transition: all 0.2s ease;
	flex-shrink: 0;
	white-space: nowrap;
	color: var(--mmc-main-color, #0079AD);
	border-color: var(--mmc-main-color, #0079AD);
	background-color: #ffffff; /* پس‌زمینه سفید خالص برای محاسبه دقیق‌تر کنتراست */
}
/* --- پایان تغییرات --- */

.mmc-view-all-button:hover {
	background-color: var(--mmc-main-color, #0079AD);
	color: #fff;
}


.mmc-media-list {
	list-style: none;
	margin: 0;
	padding: 0; 
	flex-grow: 1; 
}

.mmc-list-display-vertical_scroll .mmc-media-list {
	overflow-y: auto; 
	width: 100%; 
}

.mmc-list-display-multi_column_horizontal_scroll .mmc-media-list {
	display: flex;
	flex-direction: column; 
	flex-wrap: wrap;       
	overflow-x: auto;      
	overflow-y: hidden;    
	align-content: flex-start; 
	max-height: 100%; 
	padding: 0; 
}
.mmc-list-display-multi_column_horizontal_scroll .mmc-media-list li {
	width: auto; 
	flex-shrink: 0;
	padding-top: 10px;
	padding-bottom: 10px;
	padding-right: 10px; 
	padding-left: 10px; 
}


.mmc-media-list li {
	border-bottom: 1px solid #f0f0e0;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	display: flex;
	align-items: center;
	transition: background-color 0.2s ease, color 0.2s ease;
	border-top: 1px solid transparent;
}

.mmc-list-display-vertical_scroll .mmc-media-list li {
	border-bottom-style: solid;
	border-top-color: transparent !important; 
	padding: 10px 15px;
}
.mmc-list-display-vertical_scroll .mmc-media-list li:last-child {
	border-bottom: none;
}


.mmc-list-display-multi_column_horizontal_scroll .mmc-media-list li {
	border-bottom-color: transparent !important; 
	border-top-style: solid;
}
.mmc-list-display-multi_column_horizontal_scroll .mmc-media-list li:first-child {
	border-top: 1px solid transparent; 
}


.mmc-media-list li a.mmc-list-item-text {
	flex-grow: 1;
	transition: color 0.2s ease, font-weight 0.2s ease;
	margin-left: 0; 
	margin-right: 0; 
	text-decoration: none;
	color: inherit; 
}

.mmc-media-list li .mmc-list-item-text-wrap a.mmc-list-item-text {
	flex-grow: 0;
	width: 100%;
}

.mmc-list-item-thumbnail {
	flex-shrink: 0;
	margin-left: 10px;
}
.mmc-list-item-thumbnail img {
	width: 40px; 
	height: 40px;
	object-fit: cover;
	display: block;
	border-radius: 4px; 
}


.mmc-list-icon {
	margin-left: 10px;
	font-size: 14px;
	width: 1.2em; 
	flex-shrink: 0;
	display: flex; 
    align-items: center; 
    justify-content: center; 
}
.mmc-media-widget-wrapper:not(.mmc-list-has-icon) .mmc-list-icon {
	display: none;
}

.mmc-list-icon .mmc-icon-active {
	display: none;
}
.mmc-media-list li.active .mmc-icon-default {
	display: none;
}
.mmc-media-list li.active .mmc-icon-active {
	display: inline-block;
}

.mmc-item-link-icon {
	flex-shrink: 0;
	font-size: 0.9em;
	color: #aaa;
	text-decoration: none;
	transition: color 0.2s ease, fill 0.2s ease, background-color 0.2s ease;
	
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 10px; 
	margin: -8px -5px -8px 0; 
	border-radius: 8px;
	background-color: transparent;
	margin-right: 10px; 
}
.mmc-item-link-icon:hover {
	color: var(--mmc-main-color, #0079AD);
	background-color: var(--mmc-main-color-10, rgba(0, 121, 173, 0.06));
}
.mmc-item-link-icon svg {
	width: 1em;
	height: 1em;
	display: block;
	fill: #aaa;
	transition: fill 0.2s ease;
}
.mmc-item-link-icon:hover svg {
	fill: var(--mmc-main-color, #0079AD);
}

.mmc-item-chevron-icon {
	flex-shrink: 0;
	font-size: 0.9em;
	color: #aaa;
	text-decoration: none;
	transition: color 0.2s ease, fill 0.2s ease, background-color 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 10px;
	margin: -8px -5px -8px 0;
	border-radius: 8px;
	background-color: transparent;
	cursor: pointer; 
	margin-right: 10px; 
}
.mmc-item-chevron-icon:hover {
	color: var(--mmc-main-color, #0079AD);
	background-color: var(--mmc-main-color-10, rgba(0, 121, 173, 0.06));
}
.mmc-item-chevron-icon svg {
	width: 1em;
	height: 1em;
	display: block;
	fill: #aaa;
	transition: fill 0.2s ease;
}
.mmc-item-chevron-icon:hover svg {
	fill: var(--mmc-main-color, #0079AD);
}


.mmc-media-list li.active {
}
.mmc-media-list li.active a.mmc-list-item-text {
	font-weight: 600; 
}
.mmc-list-is-hierarchical li.active .mmc-icon-default {
    display: inline-block;
}
.mmc-list-is-hierarchical li.active .mmc-icon-active {
    display: none;
}
.mmc-list-is-hierarchical li.active[data-has-children="false"] .mmc-icon-default {
    display: none;
}
.mmc-list-is-hierarchical li.active[data-has-children="false"] .mmc-icon-active {
    display: inline-block;
}
.mmc-list-mode-hierarchical li[data-has-children="true"].active .mmc-icon-default {
    display: inline-block;
}


.mmc-media-list li.mmc-no-results {
	cursor: default;
	color: #888;
	padding: 10px 15px; 
}


.mmc-viewer-map-content,
.mmc-viewer-media-content {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.mmc-viewer-map-content {
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 15px; 
	box-sizing: border-box; /* [NEW] Added box-sizing */
}
.mmc-viewer-map-content svg {
	width: 100%;
	height: 100%;
	max-width: 500px; 
	object-fit: contain;
}
.mmc-viewer-media-content {
	z-index: 2; 
}


.mmc-viewer-media-content .mmc-loader {
	border: 4px solid #f3f3f3; 
	border-top: 4px solid var(--mmc-main-color, #0079AD);
	border-radius: 50%;
	width: 40px; 
	height: 40px; 
	animation: mmc-spin 1s linear infinite;
	display: none;
	z-index: 5;
	position: absolute; 
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	margin: 0;
}
.mmc-list-loader {
	display: none;
	z-index: 10;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	margin: 0;
}

.mmc-media-list-column.mmc-is-loading .mmc-list-loader:not(.mmc-list-skeleton) {
	display: block;
	border: 3px solid #f3f3f3;
	border-top: 3px solid var(--mmc-main-color, #0079AD);
	border-radius: 50%;
	width: 30px;
	height: 30px;
	animation: mmc-spin 1s linear infinite;
	background: #fff;
}

.mmc-list-skeleton {
	width: min(88%, 260px);
	padding: 12px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
	flex-direction: column;
	gap: 10px;
}

.mmc-media-list-column.mmc-is-loading .mmc-list-skeleton {
	display: flex;
}

.mmc-list-skeleton span {
	display: block;
	height: 12px;
	border-radius: 6px;
	background: linear-gradient(90deg, #eceff2 0%, #f7f8fa 45%, #eceff2 100%);
	background-size: 200% 100%;
	animation: mmc-skeleton-shimmer 1.1s ease-in-out infinite;
}

.mmc-list-skeleton span:nth-child(1) { width: 92%; }
.mmc-list-skeleton span:nth-child(2) { width: 74%; }
.mmc-list-skeleton span:nth-child(3) { width: 58%; }

@keyframes mmc-skeleton-shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}

.mmc-map-lazy-host {
	width: 100%;
	height: 100%;
	min-height: 180px;
}

.mmc-map-master,
.mmc-map-lazy-host svg {
	width: 100%;
	height: 100%;
}

@keyframes mmc-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.mmc-viewer-media-content .mmc-viewer-placeholder {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	color: #888;
	font-size: 15px;
	padding: 20px;
	z-index: 1;
	width: 90%; 
}

.mmc-viewer-media-content .mmc-viewer-content {
	width: 100%;
	height: 100%;
	z-index: 6; 
	position: relative; 
}

.mmc-viewer-static-image-wrapper {
	width: 100%;
	height: 100%;
}
.mmc-viewer-static-image-wrapper img {
	width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
}


.mmc-viewer-content.mmc-iframe-loaded,
.mmc-viewer-content.mmc-script-loaded {
}

.mmc-viewer-content > iframe,
.mmc-viewer-content > div[id*="aparat"] {
	width: 100%;
	height: 100%;
	border: 0;
}
.mmc-viewer-content > div[id*="aparat"] > div,
.mmc-viewer-content > div[id*="aparat"] > div > div {
	height: 100% !important; 
}

.mmc-viewer-content.mmc-image-loaded {
	cursor: pointer;
}
.mmc-viewer-content .mmc-fallback-image {
	width: 100%;
	height: 100%;
	object-fit: contain; 
	display: block;
	border-radius: 0; 
}

/* [NEW] Styles for new content types */
.mmc-viewer-content.mmc-text-loaded {
	overflow-y: auto;
	padding: 25px;
	background: #fff;
	line-height: 1.7;
	font-size: 15px;
	color: #333;
	box-sizing: border-box;
}
.mmc-viewer-content.mmc-text-loaded > *:first-child {
	margin-top: 0;
}
.mmc-viewer-content.mmc-text-loaded > *:last-child {
	margin-bottom: 0;
}

.mmc-viewer-content.mmc-audio-loaded {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}
.mmc-viewer-content.mmc-audio-loaded audio {
	max-width: 100%;
	width: 100%;
}

.mmc-viewer-content.mmc-video-loaded {
	background: #000;
}
.mmc-viewer-content.mmc-video-loaded video {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
/* End [NEW] */


@media (max-width: 767px) {
	.mmc-media-widget-wrapper {
		flex-direction: column;
		height: auto !important; 
	}

	.mmc-media-viewer-column {
		order: 1 !important; 
		flex-basis: auto !important; 
		width: 100%;
		height: auto; 
		aspect-ratio: 16 / 9;
		flex-grow: 0;
		flex-shrink: 0; 
		padding-bottom: 0; 
	}
	
	.mmc-viewer-media-content.mmc-image-loaded {
		aspect-ratio: unset; 
		height: 250px; 
	}
	.mmc-viewer-static-image-wrapper {
		height: 250px; 
		aspect-ratio: unset;
	}
	/* [NEW] Mobile height for text */
	.mmc-viewer-content.mmc-text-loaded {
		height: 300px;
		aspect-ratio: unset;
	}
	/* [NEW] Mobile height for audio */
	.mmc-viewer-content.mmc-audio-loaded {
		height: 100px;
		aspect-ratio: unset;
	}

	.mmc-viewer-map-content {
		padding: 10px;
	}
	.mmc-viewer-media-content .mmc-viewer-content {
		position: relative; 
		top: auto;
		left: auto;
		transform: none;
		width: 100%;
		height: 100%;
	}
	
	.mmc-viewer-media-content .mmc-viewer-placeholder {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.mmc-viewer-media-content .mmc-loader {
		position: absolute; 
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		margin: 0;
	}

	.mmc-media-list-column {
		order: 2 !important; 
		flex-basis: auto !important; 
		width: 100%;
		height: 300px; 
		max-height: 45vh;
		flex-grow: 0; 
		flex-shrink: 0; 
		border: none;
		border-top: 1px solid #e0e0e0;
	}
	
	.mmc-list-pos-left .mmc-media-list-column,
	.mmc-list-pos-right .mmc-media-list-column {
		border-right: none;
		border-left: none;
	}
	
	.mmc-list-header-main {
		flex-wrap: nowrap; 
	}
	.mmc-list-title {
		flex-basis: auto; 
		margin-bottom: 0;
		white-space: nowrap; 
		flex-shrink: 1; 
	}
	.mmc-view-all-button {
		margin-right: 0; 
		flex-grow: 0; 
		flex-shrink: 0; 
		text-align: center;
	}

	.mmc-viewer-hidden .mmc-media-list-column {
		height: auto !important;
		max-height: none !important; 
	}
	
	.mmc-list-display-multi_column_horizontal_scroll .mmc-media-list {
		display: block;
		overflow-x: hidden;
		overflow-y: auto;
		height: auto;
		max-height: 100%; 
		padding: 0; 
	}
	.mmc-list-display-multi_column_horizontal_scroll .mmc-media-list li {
		width: auto; 
		border-top: none;
		border-bottom: 1px solid #f0f0e0; 
		padding: 10px 15px;
	}
	.mmc-list-display-multi_column_horizontal_scroll .mmc-media-list li:last-child {
		border-bottom: none;
	}
}

.mmc-viewer-map-content .iran-province {
	stroke: #FFFFFF;
	stroke-width: 1.5;
	cursor: pointer;
	transition: fill 0.3s ease, opacity 0.3s ease;
	opacity: 1; 
}
.mmc-viewer-map-content .iran-province:hover {
	fill: var(--mmc-map-main-color, #00A7E1) !important; 
	opacity: 1 !important; 
}
.mmc-viewer-map-content .mmc-islands,
.mmc-viewer-map-content .mmc-lakes,
.mmc-viewer-map-content .mmc-waters {
	pointer-events: none;
}
.mmc-viewer-map-content .mmc-lakes {
	opacity: 0.6;
	fill: #a3d4f5;
}
.mmc-viewer-map-content .mmc-waters {
	fill: #e1f5fe;
	stroke: #a3d4f5;
	stroke-width: 1px;
}

.mmc-map-tooltip {
	position: absolute;
	display: none;
	background: #222;
	color: #fff;
	padding: 5px 12px;
	border-radius: 4px;
	font-size: 14px; 
	font-family: IRANSans, Arial, sans-serif; 
	pointer-events: none; 
	z-index: 999;
	white-space: nowrap; 
}