.mtrst-sub {
	max-width: 720px;
	color: #555;
	margin-bottom: 16px;
}

.mtrst-notice {
	max-width: 900px;
	margin-bottom: 16px !important;
}

.mtrst-card {
	max-width: 900px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 22px 24px;
	box-shadow: 0 8px 26px rgba(0, 0, 0, .04);
}

.mtrst-section-title {
	font-size: 12px;
	font-weight: 700;
	color: #888;
	text-transform: uppercase;
	letter-spacing: .06em;
	margin-bottom: 12px;
}

.mtrst-divider {
	border: none;
	border-top: 1px solid #f0f0f0;
	margin: 20px 0;
}

.mtrst-row {
	margin-bottom: 14px;
}

.mtrst-fieldlabel {
	display: block;
	font-size: 12px;
	color: #666;
	margin-bottom: 6px;
}

.mtrst-hint {
	font-size: 11px;
	color: #aaa;
	font-weight: 400;
	margin-left: 4px;
}

.mtrst-input,
.mtrst-select {
	width: 100% !important;
	max-width: 100% !important;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	padding: 9px 12px;
	background: #fff;
	font-size: 13px;
	box-sizing: border-box;
	color: #111;
}

.mtrst-input:focus,
.mtrst-select:focus {
	border-color: #BD1854;
	outline: none;
	box-shadow: 0 0 0 2px rgba(189, 24, 84, .15);
}

.mtrst-grid {
	display: grid;
	gap: 14px;
}

.mtrst-grid-1 { grid-template-columns: 1fr; }
.mtrst-grid-2 { grid-template-columns: 1fr 1fr; }
.mtrst-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.mtrst-grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

@media (max-width: 900px) {
	.mtrst-grid-3,
	.mtrst-grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
	.mtrst-grid-2,
	.mtrst-grid-3,
	.mtrst-grid-4 { grid-template-columns: 1fr; }
}

.mtrst-actions {
	margin-top: 20px;
	text-align: left;
}

.mtrst-radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mtrst-radio-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #111;
	cursor: pointer;
}

.mtrst-radio-label input[type="radio"] {
	margin: 0;
}

/* ── Underline Tab Bar ── */

#wpcontent .mtrst-tabs {
	display: flex;
	align-items: flex-end;
	max-width: 900px;
	background: transparent;
	border: none;
	border-bottom: 1px solid #e5e7eb;
	border-radius: 0;
	padding: 0;
	gap: 0;
	box-sizing: border-box;
	margin-bottom: 0;
}

#wpcontent .mtrst-tabs .mtrst-tab {
	flex: none;
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: 0;
	font-size: 13px;
	font-weight: 500;
	text-align: center;
	text-decoration: none !important;
	color: #374151 !important;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s;
	line-height: 1.4;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	box-shadow: none;
}

#wpcontent .mtrst-tabs .mtrst-tab:hover {
	color: #374151 !important;
	background: transparent;
	text-decoration: none !important;
}

#wpcontent .mtrst-tabs .mtrst-tab-active,
#wpcontent .mtrst-tabs .mtrst-tab-active:hover,
#wpcontent .mtrst-tabs .mtrst-tab-active:focus {
	background: transparent !important;
	color: #BD1854 !important;
	font-weight: 600;
	border-bottom: 2px solid #BD1854 !important;
	box-shadow: none !important;
	text-decoration: none !important;
	outline: none;
}

/* ── Tab card ── */

.mtrst-card-tab {
	margin-top: 8px;
}

/* ── Multiselect dropdown ── */

.mtrst-ms {
	position: relative;
	width: 100%;
}

.mtrst-ms-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 42px;
	padding: 6px 12px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.mtrst-ms-trigger:hover,
.mtrst-ms-open .mtrst-ms-trigger {
	border-color: #BD1854;
	box-shadow: 0 0 0 2px rgba(189, 24, 84, .15);
}

.mtrst-ms-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	flex: 1;
}

.mtrst-ms-placeholder {
	font-size: 13px;
	color: #aaa;
}

.mtrst-ms-chevron {
	font-size: 10px;
	color: #888;
	flex-shrink: 0;
	transition: transform 0.2s;
}

.mtrst-ms-open .mtrst-ms-chevron {
	transform: rotate(180deg);
}

.mtrst-ms-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #fde8f1;
	color: #BD1854;
	font-size: 12px;
	padding: 2px 6px 2px 8px;
	border-radius: 20px;
	white-space: nowrap;
}

.mtrst-ms-tag button {
	background: none;
	border: none;
	cursor: pointer;
	color: #BD1854;
	font-size: 14px;
	line-height: 1;
	padding: 0;
	opacity: 0.6;
}

.mtrst-ms-tag button:hover {
	opacity: 1;
}

.mtrst-ms-panel {
	display: none;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 99;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
	overflow: hidden;
}

.mtrst-ms-actions {
	display: flex;
	justify-content: space-between;
	padding: 8px 12px;
	border-bottom: 1px solid #f0f0f0;
}

.mtrst-ms-btn-clear,
.mtrst-ms-btn-all {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 12px;
	color: #BD1854;
	padding: 0;
	text-decoration: underline;
}

.mtrst-ms-btn-clear:hover,
.mtrst-ms-btn-all:hover {
	color: #9a1444;
}

.mtrst-page-list {
	display: block;
	max-height: 260px;
	overflow-y: auto;
	padding: 6px;
	background: #fff;
	box-sizing: border-box;
}

.mtrst-page-item {
	display: flex !important;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 10px;
	border-radius: 7px;
	cursor: pointer;
	font-size: 13px;
	color: #111;
	transition: background 0.15s;
	user-select: none;
	box-sizing: border-box;
}

.mtrst-page-item:hover {
	background: #fdf0f5;
}

.mtrst-page-item input[type="checkbox"] {
	margin: 0;
	width: 16px;
	height: 16px;
	accent-color: #BD1854;
	cursor: pointer;
	flex-shrink: 0;
}

.mtrst-page-group-label {
	font-size: 10px;
	font-weight: 700;
	color: #aaa;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 10px 10px 4px;
}

/* ── Inline Badge slot cards ── */

.mtrst-inline-slot {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	margin-bottom: 10px;
	overflow: hidden;
}

.mtrst-slot-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	background: #f8fafc;
	border-bottom: 1px solid #e5e7eb;
}

.mtrst-slot-title {
	font-size: 12px;
	font-weight: 700;
	color: #666;
	white-space: nowrap;
	flex-shrink: 0;
}

.mtrst-slot-sc-wrap {
	flex: 1;
	min-width: 0;
}

.mtrst-slot-sc-input {
	font-family: monospace;
	font-size: 12px;
	background: #fff !important;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 5px 10px;
	width: 100%;
	box-sizing: border-box;
	color: #333;
	cursor: text;
}

.mtrst-slot-remove {
	background: none;
	border: none;
	cursor: pointer;
	color: #c0c4cc;
	font-size: 18px;
	line-height: 1;
	padding: 0 2px;
	flex-shrink: 0;
	transition: color 0.15s;
}

.mtrst-slot-remove:hover {
	color: #e53e3e;
}

.mtrst-slot-body {
	padding: 16px;
}

/* ── Add slot button ── */

.mtrst-add-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 11px;
	border: 2px dashed #d1d5db;
	border-radius: 10px;
	background: none;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: #BD1854;
	box-sizing: border-box;
	margin-top: 4px;
	transition: border-color 0.15s, background 0.15s;
}

.mtrst-add-slot:hover:not(:disabled) {
	border-color: #BD1854;
	background: #fdf0f5;
}

.mtrst-add-slot:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ── Tab preview GIF ── */

.mtrst-tab-preview-wrap {
	width: 100%;
	margin: 0 0 20px 0;
}

.mtrst-tab-preview-gif {
	width: 100%;
	height: auto;
	max-height: 120px;
	object-fit: contain;
	border-radius: 10px;
	border: 1px solid #e5e7eb;
	display: block;
	background: #000;
}

.mtrst-preview-caption {
	text-align: right;
	font-size: 12px;
	color: #666;
	margin: 6px 0 0 0;
}

.mtrst-gif-fallback {
	width: 180px;
	height: 140px;
	background: linear-gradient(135deg, #fde8f1 0%, #fdf0f5 100%);
	border-radius: 10px;
	border: 1px solid #dde8f5;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 12px;
	font-weight: 600;
	color: #BD1854;
}

.mtrst-gif-fallback::before {
	content: '';
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #BD1854;
	opacity: 0.18;
	animation: mtrst-pulse 1.8s ease-in-out infinite;
}

@keyframes mtrst-pulse {
	0%, 100% { transform: scale(1);   opacity: 0.18; }
	50%       { transform: scale(1.25); opacity: 0.3;  }
}

.mtrst-card-tab::after {
	content: '';
	display: table;
	clear: both;
}

/* ── URL exclusion rows ── */

.mtrst-url-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.mtrst-url-row .mtrst-input {
	flex: 1;
}

.mtrst-url-remove {
	background: none;
	border: none;
	cursor: pointer;
	color: #c0c4cc;
	font-size: 16px;
	line-height: 1;
	padding: 0 2px;
	flex-shrink: 0;
	transition: color 0.15s;
}

.mtrst-url-remove:hover {
	color: #e53e3e;
}

.mtrst-add-url-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	padding: 7px 14px;
	border: 1.5px dashed #d1d5db;
	border-radius: 8px;
	background: none;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	color: #BD1854;
	transition: border-color 0.15s, background 0.15s;
}

.mtrst-add-url-btn:hover:not(:disabled) {
	border-color: #BD1854;
	background: #fdf0f5;
}

.mtrst-add-url-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ── Widget enable/disable toggle ── */

.mtrst-widget-toggle-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
	padding-bottom: 16px;
	border-bottom: 1px solid #f0f0f0;
	direction: ltr;
	justify-content: flex-start;
}

.mtrst-toggle {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
	gap: 0;
}

.mtrst-toggle input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.mtrst-toggle-track {
	position: relative;
	width: 40px;
	height: 22px;
	background: #d1d5db;
	border-radius: 11px;
	transition: background 0.2s;
	flex-shrink: 0;
}

.mtrst-toggle input:checked ~ .mtrst-toggle-track,
.mtrst-toggle input:checked + .mtrst-toggle-track {
	background: #BD1854;
}

.mtrst-toggle-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0,0,0,.2);
	transition: transform 0.2s;
}

.mtrst-toggle input:checked ~ .mtrst-toggle-track .mtrst-toggle-thumb,
.mtrst-toggle input:checked + .mtrst-toggle-track .mtrst-toggle-thumb {
	transform: translateX(18px);
}

.mtrst-toggle-status {
	font-size: 13px;
	font-weight: 600;
	color: #6b7280;
}

.mtrst-slot-toggle {
	flex-shrink: 0;
	margin: 0 4px;
}

/* ── Radio accent color ── */

.mtrst-card input[type="radio"] {
	accent-color: #BD1854;
}

/* ── Secondary / default buttons brand color ── */

.mtrst-actions .button:not(.button-primary),
.mtrst-copy-btn {
	border-color: #BD1854 !important;
	color: #BD1854 !important;
}

.mtrst-actions .button:not(.button-primary):hover,
.mtrst-actions .button:not(.button-primary):focus,
.mtrst-copy-btn:hover,
.mtrst-copy-btn:focus {
	border-color: #9a1444 !important;
	color: #9a1444 !important;
	background: #fdf0f5 !important;
}

/* ── Primary button brand color ── */

.mtrst-card .button-primary,
.mtrst-actions .button-primary,
.mtrst-card input[type="submit"].button-primary {
	background: #BD1854 !important;
	border-color: #9a1444 !important;
	color: #fff !important;
	text-shadow: none !important;
	box-shadow: inset 0 -1px 0 rgba(0,0,0,.08) !important;
}

.mtrst-card .button-primary:hover,
.mtrst-card .button-primary:focus,
.mtrst-actions .button-primary:hover,
.mtrst-actions .button-primary:focus,
.mtrst-card input[type="submit"].button-primary:hover,
.mtrst-card input[type="submit"].button-primary:focus {
	background: #9a1444 !important;
	border-color: #7d1038 !important;
	color: #fff !important;
	box-shadow: inset 0 -1px 0 rgba(0,0,0,.1) !important;
}

/* ── Submit button dirty state ── */

.mtrst-submit-clean {
	opacity: 0.45 !important;
	cursor: not-allowed !important;
}

/* ── Unsaved changes modal ── */

.mtrst-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mtrst-modal-box {
	background: #fff;
	border-radius: 16px;
	padding: 36px 32px 28px;
	max-width: 400px;
	width: calc(100% - 40px);
	box-shadow: 0 24px 64px rgba(0, 0, 0, .18);
	text-align: center;
}

.mtrst-modal-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #fff3cd;
	border: 2px solid #f59e0b;
	color: #b45309;
	font-size: 22px;
	font-weight: 800;
	line-height: 44px;
	margin: 0 auto 16px;
}

.mtrst-modal-title {
	font-size: 17px;
	font-weight: 700;
	color: #111;
	margin: 0 0 8px;
}

.mtrst-modal-desc {
	font-size: 13px;
	color: #6b7280;
	margin: 0 0 24px;
}

.mtrst-modal-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mtrst-modal-actions .button-primary {
	justify-content: center;
	height: 38px;
	font-size: 14px;
}

.mtrst-modal-actions .button:not(.button-primary) {
	height: 38px;
	font-size: 14px;
	border-color: #d1d5db;
	color: #374151;
}

.mtrst-modal-cancel-link {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 13px;
	color: #9ca3af;
	text-decoration: underline;
	padding: 4px;
}

.mtrst-modal-cancel-link:hover {
	color: #6b7280;
}

/* ── Inline Badge info box ── */

.mtrst-inline-info {
	background: #fdf4f7;
	border: 1px solid #f5c0d5;
	border-radius: 10px;
	padding: 14px 18px;
	margin-bottom: 18px;
	font-size: 13px;
	color: #374151;
	line-height: 1.6;
	text-align: right;
}

.mtrst-inline-info p {
	margin: 0 0 8px;
}

.mtrst-inline-info p:last-child {
	margin-bottom: 0;
}

/* ── About tab ── */

.mtrst-about-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin-bottom: 4px;
}

.mtrst-about-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mtrst-about-label {
	font-size: 12px;
	color: #888;
}

.mtrst-about-value {
	font-size: 13px;
	font-weight: 600;
	color: #111;
}

.mtrst-support-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 4px;
}

.mtrst-support-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 1;
	min-width: 120px;
	padding: 18px 16px;
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	text-decoration: none !important;
	color: inherit;
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
	text-align: center;
}

.mtrst-support-card:hover {
	border-color: #BD1854;
	background: #fdf0f5;
	box-shadow: 0 2px 8px rgba(189, 24, 84, .1);
	color: inherit;
	text-decoration: none !important;
}

.mtrst-support-label {
	font-size: 11px;
	font-weight: 700;
	color: #888;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.mtrst-support-value {
	font-size: 13px;
	font-weight: 600;
	color: #BD1854;
	word-break: break-all;
}

/* ── FAQ accordion ── */

.mtrst-faq {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mtrst-faq-item {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.15s;
}

.mtrst-faq-item.is-open {
	border-color: #BD1854;
}

.mtrst-faq-q {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 18px;
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #1e1e1e;
	text-align: right;
	direction: rtl;
	line-height: 1.4;
	transition: background 0.15s, color 0.15s;
	font-family: inherit;
}

.mtrst-faq-q:hover {
	background: #fdf4f7;
}

.mtrst-faq-item.is-open .mtrst-faq-q {
	color: #BD1854;
	background: #fdf0f5;
}

.mtrst-faq-chevron {
	flex-shrink: 0;
	margin-right: 10px;
	width: 16px;
	height: 16px;
	position: relative;
}

.mtrst-faq-chevron::before,
.mtrst-faq-chevron::after {
	content: '';
	position: absolute;
	top: 50%;
	width: 7px;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
	transition: transform 0.2s;
}

.mtrst-faq-chevron::before {
	right: 2px;
	transform: translateY(-50%) rotate(-45deg);
}

.mtrst-faq-chevron::after {
	left: 2px;
	transform: translateY(-50%) rotate(45deg);
}

.mtrst-faq-item.is-open .mtrst-faq-chevron::before {
	transform: translateY(-50%) rotate(45deg);
}

.mtrst-faq-item.is-open .mtrst-faq-chevron::after {
	transform: translateY(-50%) rotate(-45deg);
}

.mtrst-faq-a {
	padding: 14px 18px 16px;
	font-size: 14px;
	color: #555;
	line-height: 1.7;
	direction: rtl;
	border-top: 1px solid #f0f0f0;
}

/* ── Join tab ── */

#mtrst-join-form .mtrst-actions {
	direction: ltr;
	text-align: left;
}

.mtrst-join-success {
	text-align: center;
	padding: 32px 16px;
}

.mtrst-join-success-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: #22c55e;
	color: #fff;
	font-size: 26px;
	line-height: 52px;
	margin: 0 auto 14px;
}

.mtrst-join-success-title {
	font-size: 18px;
	font-weight: 700;
	color: #111;
	margin-bottom: 6px;
}

.mtrst-join-err {
	display: block;
	min-height: 16px;
	margin-top: 3px;
}

/* ── Preview modal ── */

body.mtrst-preview-open { overflow: hidden; }

.mtrst-preview-modal[hidden] { display: none; }

.mtrst-preview-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
}

.mtrst-preview-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .42);
	backdrop-filter: blur(2px);
}

.mtrst-preview-modal__dialog {
	position: absolute;
	inset: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
}

.mtrst-preview-stage {
	position: relative;
	width: min(1260px, calc(100vw - 64px));
	height: min(820px, calc(100vh - 64px));
	display: grid;
	grid-template-rows: 1fr auto;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 28px 70px rgba(15, 23, 42, .2);
	border: 1px solid rgba(148, 163, 184, .38);
	overflow: visible;
}

.mtrst-preview-panels {
	display: grid;
	grid-template-columns: minmax(0, 2.05fr) minmax(320px, .88fr);
	gap: 18px;
	padding: 22px 22px 12px;
	min-height: 0;
}

.mtrst-preview-panel {
	display: grid;
	grid-template-rows: auto 1fr;
	min-height: 0;
	border: 2px solid #cbd5e1;
	border-radius: 8px;
	overflow: hidden;
	background: #f8fafc;
	box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
}

.mtrst-preview-panel__head {
	padding: 12px 16px;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	background: #fff;
	border-bottom: 1px solid #d9e2ec;
}

.mtrst-preview-canvas {
	position: relative;
	min-height: 0;
	background: #eef2f7;
	overflow: hidden;
}

.mtrst-preview-panel--desktop .mtrst-preview-canvas,
.mtrst-preview-panel--mobile .mtrst-preview-canvas {
	min-height: 520px;
}

.mtrst-preview-iframe {
	width: 100%;
	height: 100%;
	border: 0;
	background: #f8fafc;
	display: block;
}

.mtrst-preview-close {
	position: absolute;
	top: 0;
	right: 0;
	transform: translate(50%, -50%);
	z-index: 10;
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 999px;
	background: rgba(255,255,255,.96);
	color: #475569;
	font-size: 24px;
	line-height: 1;
	box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
	cursor: pointer;
}
.mtrst-preview-close span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	transform: translateY(-1px);
}
.mtrst-preview-close:hover,
.mtrst-preview-close:focus-visible {
	color: #111827;
	border-color: rgba(189, 24, 84, .25);
	outline: none;
}

.mtrst-preview-pad {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 4;
	width: 124px;
	height: 124px;
	background: rgba(255,255,255,.98);
	border-radius: 18px;
	box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}

.mtrst-preview-arrow {
	position: absolute;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	background: #eef1f5;
	border-radius: 12px;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 2px 6px rgba(15,23,42,.06);
	cursor: pointer;
	color: #111827;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color .15s ease, box-shadow .15s ease;
}
.mtrst-preview-arrow span {
	display: block;
	width: 14px;
	height: 14px;
	border-top: 3px solid currentColor;
	border-right: 3px solid currentColor;
	opacity: .96;
}
.mtrst-preview-arrow:hover,
.mtrst-preview-arrow:focus-visible,
.mtrst-preview-arrow:active {
	background: #e5e7eb;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 2px 8px rgba(15,23,42,.08);
	outline: none;
}

.mtrst-preview-arrow--up    { top: 8px;    left: 50%;   transform: translateX(-50%); }
.mtrst-preview-arrow--up span { transform: rotate(-45deg); }
.mtrst-preview-arrow--right { top: 50%;   right: 8px;  transform: translateY(-50%); }
.mtrst-preview-arrow--right span { transform: rotate(45deg); }
.mtrst-preview-arrow--down  { bottom: 8px; left: 50%;  transform: translateX(-50%); }
.mtrst-preview-arrow--down span { transform: rotate(135deg); }
.mtrst-preview-arrow--left  { top: 50%;   left: 8px;   transform: translateY(-50%); }
.mtrst-preview-arrow--left span { transform: rotate(225deg); }

.mtrst-preview-modal--side .mtrst-preview-pad {
	width: 52px;
	height: 108px;
	border-radius: 16px;
}
.mtrst-preview-modal--side .mtrst-preview-arrow--left,
.mtrst-preview-modal--side .mtrst-preview-arrow--right { display: none; }

.mtrst-preview-footer {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 18px 16px;
	border-top: 1px solid #d9e2ec;
	background: rgba(248, 250, 252, .98);
	border-radius: 0 0 10px 10px;
}

.mtrst-preview-footer__note {
	font-size: 12px;
	color: #475569;
	font-weight: 500;
	white-space: nowrap;
	flex: 1 1 auto;
	min-width: 0;
}

.mtrst-preview-footer__controls {
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: nowrap;
	flex: 0 1 auto;
	min-width: 0;
}

.mtrst-preview-group {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	min-width: 0;
}
.mtrst-preview-group + .mtrst-preview-group {
	padding-inline-start: 10px;
	border-inline-start: 1px solid #e2e8f0;
}
.mtrst-preview-group--shape { padding-bottom: 0; }

.mtrst-preview-group__label {
	font-size: 10px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #64748b;
	padding-inline-start: 2px;
}

.mtrst-preview-group__fields {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.mtrst-preview-select {
	min-width: 102px;
	height: 34px;
	padding: 0 28px 0 10px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: #334155;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}
.mtrst-preview-select:hover,
.mtrst-preview-select:focus-visible {
	border-color: #BD1854;
	box-shadow: 0 0 0 2px rgba(189, 24, 84, .12);
	outline: none;
}
.mtrst-preview-select--type { min-width: 92px; }
.mtrst-preview-select--desktop-size,
.mtrst-preview-select--mobile-size { min-width: 84px; }
.mtrst-preview-select--desktop-position,
.mtrst-preview-select--mobile-position { min-width: 108px; }

.mtrst-preview-save {
	min-width: 118px;
	height: 34px;
	padding: 0 14px !important;
	line-height: 32px !important;
	border-radius: 8px !important;
	white-space: nowrap;
}

@media (max-width: 960px) {
	.mtrst-preview-stage {
		width: calc(100vw - 24px);
		height: calc(100vh - 24px);
	}
	.mtrst-preview-panels {
		grid-template-columns: 1fr;
		overflow: auto;
	}
	.mtrst-preview-panel--desktop .mtrst-preview-canvas,
	.mtrst-preview-panel--mobile .mtrst-preview-canvas { min-height: 380px; }
	.mtrst-preview-footer { flex-wrap: wrap; }
	.mtrst-preview-footer__note { flex: 1 1 100%; }
}

/* ── Embed code blocks (page_embed / carousel tabs) ── */

.mtrst-embed-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.mtrst-embed-row .mtrst-slot-sc-input {
	flex: 1;
	min-width: 0;
}

.mtrst-embed-textarea {
	flex: 1;
	min-width: 0;
	font-family: monospace;
	font-size: 12px;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 5px 10px;
	color: #333;
	resize: none;
	line-height: 1.6;
	box-sizing: border-box;
	cursor: text;
}

.mtrst-copy-btn {
	flex-shrink: 0;
	white-space: nowrap;
}

.mtrst-copy-btn--copied {
	background: #e6f4ea !important;
	border-color: #4caf50 !important;
	color: #2e7d32 !important;
}
