.mpg-modal-overlay {
	--mpg-primary-bg: #ff9518;
	--mpg-primary-text: #ffffff;
	--mpg-secondary-bg: #ffffff;
	--mpg-secondary-text: #3e4652;
	--mpg-secondary-border: #d8dde4;
}

.mpg-admin-repeater {
	max-width: 1280px;
	margin: 0 auto;
	width: 100%;
}

.mpg-payment-options-row {
	display: block;
	width: 100% !important;
}

.mpg-payment-options-row__title {
	display: none;
}

.mpg-payment-options-row__content {
	display: block;
	width: 100% !important;
	max-width: none !important;
	padding: 0 !important;
}

.woocommerce_page_wc-settings .form-table .mpg-payment-options-row,
.woocommerce_page_wc-settings .form-table .mpg-payment-options-row > td {
	width: 100% !important;
	max-width: none !important;
}

.woocommerce_page_wc-settings .form-table .mpg-payment-options-row > td.forminp.mpg-payment-options-row__content {
	display: block;
	padding: 0 !important;
	margin: 0 auto;
	float: none !important;
}

.woocommerce_page_wc-settings .form-table tr.mpg-payment-options-row td.forminp.mpg-payment-options-row__content,
.woocommerce_page_wc-settings .form-table tr.mpg-payment-options-row .mpg-admin-repeater,
.woocommerce_page_wc-settings .form-table tr.mpg-payment-options-row .mpg-admin-repeater-rows,
.woocommerce_page_wc-settings .form-table tr.mpg-payment-options-row .mpg-admin-option-row {
	width: 100% !important;
	max-width: none !important;
	min-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box !important;
}

.mpg-settings-tabs {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
}

.mpg-settings-tab {
	border: 0;
	background: transparent;
	padding: 0;
	color: #2271b1;
	cursor: pointer;
	font-weight: 600;
}

.mpg-settings-tab.is-active {
	color: #111827;
}

.mpg-media-upload-field {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.mpg-media-upload-field__input[type="hidden"] {
	display: none;
}

.mpg-media-upload-preview {
	margin-top: 12px;
}

.mpg-media-upload-preview.is-hidden {
	display: none;
}

.mpg-media-upload-preview img {
	display: block;
	max-width: 80px;
	max-height: 80px;
	border-radius: 12px;
	border: 1px solid #d8dee8;
	object-fit: contain;
	background: #fff;
	padding: 6px;
}

.woocommerce_page_wc-settings .woocommerce-save-button,
.woocommerce_page_wc-settings button.button-primary {
	border-radius: 10px;
	padding: 6px 18px;
	min-height: 40px;
	font-weight: 700;
}

.mpg-full-reset-button,
.mpg-section-reset-button {
	margin-left: 8px !important;
}

.mpg-admin-option-row {
	background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
	border: 1px solid #d8dee8;
	border-radius: 16px;
	padding: 18px 18px 16px;
	margin: 0 0 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
	overflow: hidden;
	width: 100%;
	box-sizing: border-box;
}

.mpg-admin-option-row__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 0;
	min-height: 28px;
	flex-wrap: wrap;
	padding-bottom: 10px;
	border-bottom: 1px solid #eef2f6;
}

.mpg-admin-option-row__head-left,
.mpg-admin-option-row__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.mpg-drag-handle {
	border: 0;
	background: transparent;
	color: #8c96a5;
	cursor: grab;
	padding: 2px 4px;
	font-size: 16px;
	line-height: 1;
	touch-action: none;
	user-select: none;
}

.mpg-drag-handle:active {
	cursor: grabbing;
}

.mpg-admin-option-title {
	font-size: 15px;
	font-weight: 700;
	color: #18212f;
}

.mpg-toggle-option {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
}

.mpg-toggle-option__icon {
	display: inline-block;
	transition: transform 0.2s ease;
}

.mpg-admin-option-row__body {
	padding-top: 16px;
	width: 100%;
}

.mpg-admin-option-row:not(.is-expanded) .mpg-admin-option-row__body {
	display: none;
}

.mpg-admin-option-row.is-expanded .mpg-toggle-option__icon {
	transform: rotate(180deg);
}

.mpg-admin-option-placeholder {
	height: 64px;
	border: 1px dashed #b9c2cf;
	border-radius: 12px;
	margin-bottom: 16px;
	background: #f8fafc;
}

.ui-sortable-helper {
	box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
	transform: rotate(0.2deg);
}

.mpg-admin-tools-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 14px;
	margin-top: 14px;
}

.mpg-admin-export-block {
	flex: 1 1 420px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 12px;
	padding: 14px;
}

.mpg-admin-export-block__label {
	font-weight: 700;
	margin-bottom: 10px;
}

.mpg-admin-export-block__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
}

.mpg-admin-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 18px;
	width: 100%;
	align-items: start;
}

.mpg-admin-grid label {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mpg-admin-grid span {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: #243042;
}

.mpg-admin-grid input,
.mpg-admin-grid textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	border-radius: 10px;
	border: 1px solid #cfd7e3;
	padding: 10px 12px;
	background: #fff;
}

.mpg-admin-grid__full {
	grid-column: 1 / -1;
}

.mpg-temp-copy-field {
	position: fixed;
	left: -9999px;
	top: 0;
	opacity: 0;
	pointer-events: none;
}

.woocommerce_page_wc-settings .mpg-payment-options-row > td {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.woocommerce_page_wc-settings .mpg-admin-option-row__actions .button-link,
.woocommerce_page_wc-settings .mpg-admin-option-row__actions .button-link-delete {
	line-height: 1.3;
}

.woocommerce_page_wc-settings .mpg-admin-repeater-rows {
	width: 100%;
}

@media (max-width: 900px) {
	.mpg-admin-grid {
		grid-template-columns: 1fr;
	}

	.mpg-admin-option-row {
		padding: 16px 14px;
		border-radius: 14px;
	}

	.mpg-admin-option-row__head {
		gap: 12px;
	}
}

body.mpg-modal-open {
	overflow: hidden;
}

.mpg-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(20, 16, 31, 0.58);
	padding: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(4px);
}

.mpg-modal {
	position: relative;
	background: var(--mpg-window-bg);
	border-radius: 22px;
	width: 100%;
	max-width: 900px;
	max-height: calc(100vh - 12px);
	overflow: auto;
	box-shadow: 0 30px 90px rgba(24, 28, 40, 0.28);
}

.mpg-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--mpg-cancel-color, #e44b2e);
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

.mpg-modal-header {
	padding: 20px 24px 14px;
	border-bottom: 1px solid #ece7df;
	text-align: center;
}

.mpg-modal-brandbar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	padding-right: 42px;
}

.mpg-modal-brandbar__title {
	text-align: left;
	font-size: 13px;
	font-weight: 700;
	color: #1f2937;
	max-width: var(--mpg-header-title-width, 220px);
	min-height: var(--mpg-header-title-height, 24px);
	display: flex;
	align-items: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mpg-modal-brandbar__logo {
	display: flex;
	justify-content: center;
	align-items: center;
}

.mpg-modal-brand-logo {
	width: var(--mpg-header-logo-width, 40px);
	height: var(--mpg-header-logo-height, 40px);
	object-fit: contain;
	border-radius: 10px;
	display: block;
}

.mpg-modal-brand-logo--placeholder {
	display: inline-block;
}

.mpg-modal-header h3,
.mpg-success-title {
	margin: 0;
	color: #202124;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.15;
}

.mpg-modal-order {
	color: #1f2937;
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 4px;
}

.mpg-modal-email {
	color: #5a88cc;
	font-size: 14px;
}

.mpg-modal-body {
	padding: 16px 22px;
}

.mpg-intro-text,
.mpg-description-text,
.mpg-success-text {
	margin: 0;
	color: #555f70;
	font-size: 13px;
	line-height: 1.45;
	text-align: center;
}

.mpg-step-layout {
	margin-top: 24px;
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 22px;
	align-items: start;
}

.mpg-option-tabs {
	display: grid;
	gap: 12px;
}

.mpg-option-tabs--full {
	margin-top: 24px;
}

.mpg-option-tab {
	border: 1px solid #ece7df;
	border-radius: 16px;
	background: #fff8f1;
	padding: 16px 18px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	color: #242a33;
	transition: all 0.2s ease;
}

.mpg-option-tab--large {
	padding-top: 20px;
	padding-bottom: 20px;
}

.mpg-option-tab:hover,
.mpg-option-tab.is-active {
	border-color: #ff9518;
	background: #fff2de;
	box-shadow: 0 12px 22px rgba(255, 149, 24, 0.12);
}

.mpg-option-tab__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	text-align: left;
}

.mpg-option-tab__icon img {
	width: 36px;
	height: 36px;
	object-fit: cover;
	border-radius: 999px;
}

.mpg-option-tab__chevron {
	color: #a5acb8;
	font-size: 24px;
}

.mpg-detail-card {
	border: 1px dashed #d4d8df;
	border-radius: 16px;
	overflow: hidden;
	background: #ffffff;
}

.mpg-detail-box {
	position: relative;
	padding: 8px 72px 8px 14px;
	border-bottom: 1px solid #eceff4;
}

.mpg-detail-box:last-child {
	border-bottom: 0;
}

.mpg-detail-box__label {
	color: #a0a4ab;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 10px;
	font-weight: 700;
	margin-bottom: 4px;
}

.mpg-detail-box__value {
	color: #1f2937;
	font-size: 14px;
	font-weight: 600;
	word-break: break-word;
	line-height: 1.2;
}

.mpg-copy-button {
	position: absolute;
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
	border: 0;
	border-radius: 999px;
	background: #f0f0f0;
	color: #3d4652;
	min-width: 62px;
	height: 30px;
	padding: 0 10px;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	white-space: nowrap;
}

.mpg-copy-button__icon {
	font-size: 12px;
	line-height: 1;
}

.mpg-copy-button__text {
	line-height: 1;
}

.mpg-description-text {
	margin-top: 6px;
}

.mpg-modal-footer {
	padding: 0 22px 14px;
	display: grid;
	gap: 8px;
}

.mpg-modal-body--details {
	padding-top: 10px;
	padding-bottom: 8px;
}

.mpg-modal-body--details .mpg-intro-text {
	font-size: 12px;
	line-height: 1.35;
}

.mpg-modal-body--details .mpg-detail-card {
	margin-top: 8px;
}

.mpg-modal-body--details .mpg-detail-box {
	padding-top: 6px;
	padding-bottom: 6px;
}

.mpg-modal-body--details .mpg-detail-box__value {
	font-size: 13px;
	line-height: 1.15;
}

.mpg-modal-body--details .mpg-description-text {
	font-size: 12px;
	line-height: 1.32;
	margin-top: 5px;
}

.mpg-primary-action,
.mpg-secondary-action {
	width: 100%;
	border-radius: 12px;
	min-height: 46px;
	font-size: 15px;
	font-weight: 700;
}

.mpg-primary-action.button.alt {
	background: var(--mpg-primary-bg);
	border-color: var(--mpg-primary-bg);
	color: var(--mpg-primary-text);
}

.mpg-primary-action.button.alt:hover {
	filter: brightness(0.96);
	background: var(--mpg-primary-bg);
	border-color: var(--mpg-primary-bg);
	color: var(--mpg-primary-text);
}

.mpg-secondary-action.button {
	background: var(--mpg-secondary-bg);
	border: 1px solid var(--mpg-secondary-border);
	color: var(--mpg-secondary-text);
}

.mpg-upload-step {
	max-width: 560px;
	margin: 0 auto;
}

.mpg-upload-field {
	margin-top: 28px;
	border: 1px solid #d6dbe2;
	border-radius: 16px;
	padding: 22px;
	display: grid;
	gap: 14px;
	text-align: center;
	cursor: pointer;
	background: #fcfcfd;
}

.mpg-upload-field input[type="file"] {
	display: none;
}

.mpg-upload-icon {
	font-size: 54px;
	color: #d4dae3;
}

.mpg-upload-filename {
	font-size: 16px;
	font-weight: 700;
	color: #2a3340;
}

.mpg-upload-help {
	font-size: 14px;
	color: #8a93a1;
}

.mpg-inline-error {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 12px;
	background: #fff1f0;
	color: #c0392b;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

.mpg-success-step {
	padding-top: 16px;
	padding-bottom: 10px;
	text-align: center;
}

.mpg-countdown-text {
	text-align: center;
	color: #98a1af;
	font-size: 14px;
}

.mpg-success-icon {
	width: 86px;
	height: 86px;
	border-radius: 50%;
	margin: 0 auto 18px;
	background: #ff9518;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 44px;
	font-weight: 700;
}

@media (max-width: 782px) {
	.mpg-admin-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.mpg-modal-overlay {
		padding: 8px;
	}

	.mpg-modal {
		border-radius: 16px;
		max-height: calc(100vh - 16px);
	}

	.mpg-modal-header,
	.mpg-modal-body,
	.mpg-modal-footer {
		padding-left: 14px;
		padding-right: 14px;
	}

	.mpg-modal-header {
		padding-top: 14px;
		padding-bottom: 10px;
	}

	.mpg-modal-close {
		top: 8px;
		right: 8px;
		width: 34px;
		height: 34px;
		font-size: 28px;
	}

	.mpg-modal-brandbar {
		padding-right: 30px;
		margin-bottom: 6px;
	}

	.mpg-modal-brandbar__title {
		font-size: 11px;
	}

	.mpg-modal-brand-logo {
		width: min(var(--mpg-header-logo-width, 28px), 28px);
		height: min(var(--mpg-header-logo-height, 28px), 28px);
		border-radius: 8px;
	}

	.mpg-step-layout {
		grid-template-columns: 1fr;
	}

	.mpg-modal-header h3,
	.mpg-success-title {
		font-size: 18px;
	}

	.mpg-modal-order {
		font-size: 16px;
	}

	.mpg-detail-box__value {
		font-size: 12px;
		line-height: 1.2;
	}

	.mpg-primary-action,
	.mpg-secondary-action {
		min-height: 46px;
		font-size: 14px;
	}

	.mpg-modal-body {
		padding-top: 12px;
		padding-bottom: 10px;
	}

	.mpg-intro-text,
	.mpg-description-text {
		font-size: 12px;
		line-height: 1.38;
	}

	.mpg-detail-box {
		padding: 7px 58px 7px 12px;
	}

	.mpg-copy-button {
		right: 8px;
		min-width: 54px;
		height: 26px;
		padding: 0 8px;
		font-size: 10px;
		gap: 3px;
	}

	.mpg-copy-button__icon {
		font-size: 10px;
	}

	.mpg-modal-footer {
		padding-bottom: 12px;
		gap: 6px;
	}
}
