.imt-16580-container {
	line-height: 1.6;
	display: inline;
}

.imt-16580-blocks-mode {
	display: block;
}
.imt-16580-blocks-mode .imt-16580-text-segment {
	display: block;
	margin-bottom: 15px;
}
.imt-16580-blocks-mode .imt-16580-trigger-wrapper {
	display: block;
	margin: 15px 0;
	text-align: center;
}
.imt-16580-blocks-mode .imt-16580-trigger {
	display: inline-flex;
	flex-direction: column;
	padding: 20px;
	min-width: 150px;
	min-height: 150px;
}
.imt-16580-blocks-mode .imt-16580-icon {
	margin-right: 0;
	margin-bottom: 10px;
	font-size: 60px;
}
.imt-16580-blocks-mode .imt-16580-icon svg {
	width: 60px;
	height: 60px;
}

/* Inline Mode Styles */
.imt-16580-text-segment {
	display: inline;
}
.imt-16580-text-segment p {
	display: inline;
	margin: 0;
	padding: 0;
}

.imt-16580-trigger-wrapper {
	display: inline-block;
	vertical-align: baseline;
	margin: 0 4px;
}

.imt-16580-trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 8px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	cursor: pointer;
	overflow: hidden;
	background-color: #f7f7f7;
	transition: all 0.3s ease;
	color: #333;
	font-size: 0.95em;
	text-decoration: none;
}

.imt-16580-icon {
	margin-right: 4px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
}
.imt-16580-icon svg {
	width: 1em;
	height: 1em;
}

.imt-16580-trigger-text {
	font-weight: 500;
}

.imt-16580-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	font-size: 0.85em;
	font-weight: bold;
	text-align: center;
	padding: 10px;
	box-sizing: border-box;
}

.imt-16580-trigger:hover .imt-16580-overlay {
	opacity: 1;
}

/* Modal Background Overlay */
.imt-16580-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.6);
	z-index: 99998;
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* Modal Window Base */
.imt-16580-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.2);
	z-index: 99999;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	opacity: 0;
	transition: all 0.3s ease;
}

/* Size Classes */
.imt-16580-size-small { width: 300px; max-width: 90vw; max-height: 80vh; }
.imt-16580-size-medium { width: 500px; max-width: 90vw; max-height: 80vh; }
.imt-16580-size-large { width: 800px; max-width: 95vw; max-height: 90vh; }
.imt-16580-size-full { width: 100vw; height: 100vh; max-height: none; max-width: none; border-radius: 0; }

.imt-16580-modal-inner {
	position: relative;
	padding: 30px 25px 25px;
	overflow-y: auto;
	flex-grow: 1;
}

.imt-16580-close {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	color: #555;
	cursor: pointer;
	padding: 0;
	z-index: 2;
}

.imt-16580-close:hover {
	color: #ff0000;
}

.imt-16580-modal-title {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 22px;
	border-bottom: 1px solid #eee;
	padding-bottom: 10px;
}

/* Visibility classes */
.imt-16580-hidden {
	display: none !important;
}

.imt-16580-modal-overlay.imt-16580-visible {
	display: block !important;
	opacity: 1;
}

.imt-16580-modal.imt-16580-visible {
	display: flex !important;
	opacity: 1;
}
