/* Product forms */
:root textarea {
	min-height: auto !important;
}

.mp-product-order-wrap,
.mp-product-order-wrap *,
.mp-custom-order-wrap,
.mp-custom-order-wrap * {
	box-sizing: border-box;
	border-radius: 0 !important;
}

.mp-product-order-wrap,
.mp-custom-order-wrap {
	--mp-accent: #461c1e;
	--mp-accent-light: rgba(70, 28, 30, 0.1);
	--mp-accent-bg: rgba(70, 28, 30, 0.04);
	--mp-text: #111;
	--mp-muted: #444;
	--mp-border: #ddd;
	--mp-bg-soft: #f6f4ed;

	width: 100%;
	max-width: 980px;
	margin: 0 auto;
	color: var(--mp-text);
	font-size: 16px;
	line-height: 1.4;
}

.mp-product-order-wrap strong,
.mp-product-order-wrap b {
	font-weight: 600;
}

.mp-product-order-wrap p,
.mp-new-buy-form p,
.mp-custom-order-wrap p {
	margin: 0 !important;
	padding: 0 !important;
}

.mp-product-order-wrap br {
	display: none;
}

.mp-product-order-wrap .wpcf7-form-control-wrap {
	display: block;
}

.mp-product-order-wrap .hidden-fields-container,
.mp-custom-order-wrap .hidden-fields-container {
	display: none !important;
}

.mp-order-form {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.mp-order-header h2 {
	margin: 0 0 6px;
	font-size: 22px;
	line-height: 1.2;
	font-weight: 600;
	color: var(--mp-text);
}

.mp-order-header p {
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	color: #333;
}

.mp-order-card {
	padding: 20px;
	border: 1px solid var(--mp-border);
	background: #fff;
}

.mp-section-title {
	margin: 0 0 15px;
	font-size: 18px;
	line-height: 1.3;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--mp-accent);
}

.mp-product-row {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: 15px;
	align-items: center;
}

.mp-product-thumb {
	width: 64px;
	height: 64px;
	border: 1px solid var(--mp-border);
	background: #f3f3f3;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.mp-product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mp-product-name {
	font-size: 16px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--mp-text);
}

.mp-product-wymiar {
	margin-top: 3px;
	font-size: 15px;
	line-height: 1.35;
	color: var(--mp-muted);
}

.mp-product-price {
	font-size: 18px;
	line-height: 1.3;
	font-weight: 600;
	white-space: nowrap;
	color: var(--mp-text);
}

.mp-grid {
	display: grid;
	gap: 15px;
}

.mp-grid-2 {
	grid-template-columns: 1fr 1fr;
}

.mp-order-form label {
	display: block;
	margin: 0 0 10px;
	font-size: 16px;
	line-height: 1.35;
	font-weight: 400;
	color: #333;
}

.mp-order-form .wpcf7-form-control-wrap {
	margin-top: 6px;
}

.mp-input,
.mp-textarea,
.mp-order-form input[type="text"],
.mp-order-form input[type="email"],
.mp-order-form input[type="tel"],
.mp-order-form textarea,
.mp-order-form select,
.mp-custom-order-wrap select {
	width: 100%;
	min-height: 42px;
	padding: 9px 10px;
	border: 1px solid #d8d8d8;
	background: #fff;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 400;
	color: var(--mp-text);
	outline: none;
	box-shadow: none;
}

.mp-order-form textarea,
.mp-textarea {
	min-height: 95px;
	resize: vertical;
}

.mp-input::placeholder,
.mp-textarea::placeholder,
.mp-order-form input::placeholder,
.mp-order-form textarea::placeholder {
	color: #999;
}

.mp-input:focus,
.mp-textarea:focus,
.mp-order-form input:focus,
.mp-order-form textarea:focus,
.mp-order-form select:focus,
.mp-custom-order-wrap select:focus {
	border-color: var(--mp-accent);
	box-shadow: none;
}

.mp-separator {
	height: 1px;
	margin: 15px 0;
	background: var(--mp-border);
}

.mp-switch-row {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin: 0 !important;
	cursor: pointer;
}

.mp-switch-row > span:first-child {
	flex: 1 1 auto;
	min-width: 0;
}

.mp-switch-row strong {
	display: block;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--mp-text);
}

.mp-switch-row small {
	display: block;
	margin-top: 2px;
	font-size: 14px;
	line-height: 1.35;
	font-weight: 400;
	color: #555;
}

.mp-switch-row input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mp-switch-ui {
	position: relative;
	width: 44px;
	height: 24px;
	flex: 0 0 44px;
	background: #b7b7b7;
	border: 1px solid #b7b7b7;
	transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.mp-switch-ui::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	background: #fff;
	transition: transform 0.25s ease;
}

.mp-switch-row.is-active .mp-switch-ui,
.mp-switch-row input:checked ~ .mp-switch-ui {
	background: var(--mp-accent) !important;
	border-color: var(--mp-accent) !important;
	box-shadow: 0 0 0 3px rgba(70, 28, 30, 0.1);
}

.mp-switch-row.is-active .mp-switch-ui::before,
.mp-switch-row input:checked ~ .mp-switch-ui::before {
	transform: translateX(20px);
}

.mp-invoice-fields,
.mp-address-fields {
	margin-top: 15px;
}

.mp-invoice-fields[hidden] {
	display: none !important;
}

.mp-delivery-card {
	width: 100%;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 12px;
	padding: 15px;
	margin: 0 0 10px;
	border: 1px solid var(--mp-border);
	background: #fff;
	text-align: left;
	cursor: pointer;
	color: var(--mp-text);
	font-family: inherit;
	appearance: none;
	box-shadow: none;
}

.mp-delivery-card:hover,
.mp-delivery-card.is-active {
	border-color: var(--mp-accent);
	background: var(--mp-accent-bg);
}

.mp-radio-dot {
	width: 18px;
	height: 18px;
	border: 1px solid #cfcfcf;
	background: #fff;
	flex: 0 0 18px;
	margin-top: 2px;
	position: relative;
}

.mp-delivery-card.is-active .mp-radio-dot {
	border-color: var(--mp-accent);
	background: var(--mp-accent);
}

.mp-delivery-card.is-active .mp-radio-dot::after {
	content: "";
	position: absolute;
	top: 5px;
	left: 5px;
	width: 6px;
	height: 6px;
	background: #fff;
}

.mp-delivery-content {
	display: block;
	min-width: 0;
}

.mp-delivery-title {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--mp-text);
}

.mp-delivery-desc {
	display: block;
	margin-top: 5px;
	font-size: 15px;
	line-height: 1.4;
	font-weight: 400;
	color: #444;
}

.mp-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 7px;
	background: var(--mp-accent-light);
	color: var(--mp-accent);
	font-size: 13px;
	line-height: 1.2;
	font-weight: 600;
}

.mp-badge-green {
	background: #e7f3da;
	color: #244d10;
}

.mp-payment-box {
	padding: 15px;
	border-left: 4px solid var(--mp-accent);
	background: var(--mp-bg-soft);
	font-size: 16px;
	line-height: 1.45;
	font-weight: 400;
	color: var(--mp-text);
}

.mp-summary-row {
	display: flex;
	justify-content: space-between;
	gap: 15px;
	padding: 5px 0;
	font-size: 16px;
	line-height: 1.35;
	font-weight: 400;
	color: var(--mp-text);
}

.mp-summary-row strong {
	font-weight: 600;
}

.mp-summary-total {
	margin-top: 6px;
	padding-top: 12px;
	border-top: 1px solid var(--mp-border);
	font-size: 18px;
}

.mp-summary-total strong:last-child {
	color: var(--mp-accent);
}

.mp-acceptance {
	font-size: 15px;
	line-height: 1.45;
	color: #333;
}

.mp-acceptance .wpcf7-list-item {
	margin: 0;
}

.mp-acceptance label {
	display: flex !important;
	align-items: flex-start;
	gap: 9px;
	margin: 0 !important;
	cursor: pointer;
}

.mp-acceptance input[type="checkbox"] {
	width: 17px;
	height: 17px;
	min-width: 17px;
	flex: 0 0 17px;
	margin: 2px 0 0;
	appearance: none;
	border: 1px solid #bdbdbd;
	background: #fff;
	cursor: pointer;
	box-shadow: none;
}

.mp-acceptance input[type="checkbox"]:checked {
	background: var(--mp-accent);
	border-color: var(--mp-accent);
	box-shadow: inset 0 0 0 4px #fff;
}

.mp-acceptance a {
	color: var(--mp-accent);
	text-decoration: underline;
}

.mp-submit,
.mp-order-form input[type="submit"] {
	width: 100%;
	min-height: 48px;
	padding: 12px 20px;
	border: 1px solid var(--mp-accent);
	background: var(--mp-accent);
	color: #fff;
	font-size: 16px;
	line-height: 1.2;
	font-weight: 600;
	cursor: pointer;
	transition: 0.2s ease;
	box-shadow: none;
}

.mp-submit:hover,
.mp-order-form input[type="submit"]:hover {
	background: #fff;
	color: var(--mp-accent);
	border-color: var(--mp-accent);
}

.mp-submit:focus,
.mp-order-form input[type="submit"]:focus {
	outline: 2px solid var(--mp-accent);
	outline-offset: 2px;
}

.mp-order-form .wpcf7-not-valid-tip {
	margin-top: 5px;
	font-size: 13px;
	line-height: 1.35;
	color: #c62828;
}

.mp-order-form .wpcf7-response-output {
	margin: 15px 0 0 !important;
	padding: 12px 14px !important;
	border: 1px solid var(--mp-accent) !important;
	font-size: 15px;
	line-height: 1.4;
	color: var(--mp-text);
}

.mp-product-order-wrap .wpcf7-response-output[aria-hidden="true"],
.mp-custom-order-wrap .wpcf7-response-output[aria-hidden="true"],
.mp-product-order-wrap .wpcf7-response-output:empty,
.mp-custom-order-wrap .wpcf7-response-output:empty {
	display: none !important;
}

.mp-order-form .wpcf7-spinner {
	margin: 10px auto 0;
	display: block;
}

.mp-order-success-open {
	overflow: hidden;
}

.mp-order-success-dialog {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 20px;
}

.mp-order-success-dialog[hidden] {
	display: none !important;
}

.mp-order-success-dialog__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.mp-order-success-dialog__panel {
	position: relative;
	z-index: 1;
	width: min(100%, 480px);
	padding: 34px;
	border: 1px solid #ddd;
	background: #fff;
	color: #111;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
	text-align: center;
}

.mp-order-success-dialog__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #111;
	font: inherit;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

.mp-order-success-dialog__title {
	margin: 0 42px 12px;
	color: #461c1e;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 600;
}

.mp-order-success-dialog__message {
	margin: 0 0 22px;
	color: #333;
	font-size: 17px;
	line-height: 1.5;
}

.mp-order-success-dialog__button {
	min-width: 180px;
	min-height: 48px;
	padding: 12px 22px;
	border: 1px solid #461c1e;
	background: #461c1e;
	color: #fff;
	font-size: 16px;
	line-height: 1.2;
	font-weight: 600;
	cursor: pointer;
}

.mp-order-success-dialog__button:hover,
.mp-order-success-dialog__button:focus {
	background: #fff;
	color: #461c1e;
}

/* Custom order form */
.mp-custom-label {
	margin: 0 0 10px;
	font-size: 16px;
	line-height: 1.35;
	color: #333;
}

.mp-color-palette {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 10px;
}

.mp-color-swatch {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border: 1px solid transparent;
	background: #eee;
	cursor: pointer;
	position: relative;
	appearance: none;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mp-color-swatch:hover,
.mp-color-swatch.is-active {
	border-color: var(--mp-accent);
	box-shadow: 0 0 0 3px rgba(70, 28, 30, 0.16);
}

.mp-color-swatch.is-active::after {
	content: "";
	position: absolute;
	inset: -5px;
	border: 2px solid var(--mp-accent);
	pointer-events: none;
}

.mp-color-beige {
	background: #f4e2c4;
}

.mp-color-blue-light {
	background: #dcecf1;
}

.mp-color-blue-dark {
	background: #6f829c;
}

.mp-color-green {
	background: #a8c99c;
}

.mp-color-brown {
	background: #d0aa84;
}

.mp-color-pink {
	background: #e8dbe8;
}

.mp-color-light {
	background: #f1f1ef;
}

.mp-color-dark {
	background: #696967;
}

.mp-color-custom {
	background: conic-gradient(
		from 0deg,
		#e96363,
		#f0b25a,
		#efe86b,
		#74c56d,
		#64b7e6,
		#806ee8,
		#e963bb,
		#e96363
	);
}

.mp-color-same {
	background:
		linear-gradient(135deg, transparent 48%, rgba(70, 28, 30, 0.65) 49%, rgba(70, 28, 30, 0.65) 51%, transparent 52%),
		#fff;
}

.mp-color-same::before {
	content: "=";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--mp-accent);
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.mp-selected-info {
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 1.35;
	color: #555;
}

.mp-selected-info strong {
	font-weight: 600;
	color: var(--mp-text);
}

.mp-custom-js-color-other[hidden],
.mp-custom-js-format-other[hidden] {
	display: none !important;
}

.mp-format-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin: 0 0 14px;
}

.mp-format-card {
	min-height: 70px;
	padding: 12px 10px;
	border: 1px solid var(--mp-border);
	background: #fff;
	color: var(--mp-text);
	font-family: inherit;
	text-align: center;
	cursor: pointer;
	appearance: none;
	box-shadow: none;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.mp-format-card:hover,
.mp-format-card.is-active {
	border-color: var(--mp-accent);
	background: var(--mp-accent-bg);
	box-shadow: 0 0 0 3px rgba(70, 28, 30, 0.08);
}

.mp-format-title {
	display: block;
	font-size: 16px;
	line-height: 1.25;
	font-weight: 600;
}

.mp-format-desc {
	display: block;
	margin-top: 3px;
	font-size: 13px;
	line-height: 1.3;
	font-weight: 400;
	color: #666;
}

.mp-summary-note {
	margin-top: 12px !important;
	padding-top: 12px;
	border-top: 1px solid var(--mp-border);
	font-size: 15px;
	line-height: 1.45;
	color: #555;
}

@media (max-width: 768px) {
	.mp-product-order-wrap,
	.mp-custom-order-wrap {
		max-width: 100%;
		font-size: 16px;
	}

	.mp-order-form {
		gap: 12px;
	}

	.mp-order-header h2 {
		font-size: 20px;
	}

	.mp-order-header p {
		font-size: 15px;
	}

	.mp-order-card {
		padding: 16px;
	}

	.mp-section-title {
		margin-bottom: 12px;
		font-size: 16px;
	}

	.mp-grid {
		gap: 0;
	}

	.mp-grid-2 {
		grid-template-columns: 1fr;
	}

	.mp-product-row {
		grid-template-columns: 58px 1fr;
		gap: 12px;
		align-items: start;
	}

	.mp-product-thumb {
		width: 54px;
		height: 54px;
	}

	.mp-product-name {
		font-size: 16px;
	}

	.mp-product-wymiar {
		font-size: 14px;
	}

	.mp-product-price {
		grid-column: 2;
		font-size: 16px;
		margin-top: 2px;
	}

	.mp-order-form label {
		margin-bottom: 9px;
		font-size: 15px;
	}

	.mp-input,
	.mp-textarea,
	.mp-order-form input[type="text"],
	.mp-order-form input[type="email"],
	.mp-order-form input[type="tel"],
	.mp-order-form textarea {
		min-height: 40px;
		padding: 8px 10px;
		font-size: 15px;
	}

	.mp-order-form textarea,
	.mp-textarea {
		min-height: 85px;
	}

	.mp-separator {
		margin: 12px 0;
	}

	.mp-switch-row {
		gap: 12px;
		align-items: center;
	}

	.mp-switch-row strong {
		font-size: 15px;
	}

	.mp-switch-row small {
		font-size: 13px;
	}

	.mp-switch-ui {
		width: 40px;
		height: 22px;
		flex-basis: 40px;
	}

	.mp-switch-ui::before {
		width: 16px;
		height: 16px;
	}

	.mp-switch-row.is-active .mp-switch-ui::before,
	.mp-switch-row input:checked ~ .mp-switch-ui::before {
		transform: translateX(18px);
	}

	.mp-delivery-card {
		gap: 10px;
		padding: 13px;
		margin-bottom: 8px;
	}

	.mp-radio-dot {
		width: 16px;
		height: 16px;
		flex-basis: 16px;
	}

	.mp-delivery-card.is-active .mp-radio-dot::after {
		top: 4px;
		left: 4px;
		width: 6px;
		height: 6px;
	}

	.mp-delivery-title {
		font-size: 15px;
		gap: 6px;
	}

	.mp-delivery-desc {
		font-size: 14px;
	}

	.mp-badge {
		font-size: 12px;
		padding: 3px 6px;
	}

	.mp-address-fields,
	.mp-invoice-fields {
		margin-top: 12px;
	}

	.mp-payment-box {
		padding: 13px;
		font-size: 15px;
	}

	.mp-summary-row {
		font-size: 15px;
		gap: 10px;
	}

	.mp-summary-total {
		font-size: 16px;
	}

	.mp-acceptance {
		font-size: 14px;
	}

	.mp-acceptance label {
		gap: 8px;
	}

	.mp-acceptance input[type="checkbox"] {
		width: 16px;
		height: 16px;
		min-width: 16px;
		flex-basis: 16px;
	}

	.mp-submit,
	.mp-order-form input[type="submit"] {
		min-height: 44px;
		padding: 11px 16px;
		font-size: 15px;
	}

	.mp-order-success-dialog {
		padding: 14px;
	}

	.mp-order-success-dialog__panel {
		padding: 30px 18px 22px;
	}

	.mp-order-success-dialog__title {
		margin-inline: 34px;
		font-size: 24px;
	}

	.mp-order-success-dialog__message {
		font-size: 15px;
	}

	.mp-order-success-dialog__button {
		width: 100%;
		min-width: 0;
		min-height: 44px;
		font-size: 15px;
	}

	.mp-color-palette {
		gap: 8px;
	}

	.mp-color-swatch {
		width: 34px;
		height: 34px;
		flex-basis: 34px;
	}

	.mp-color-swatch.is-active::after {
		inset: -4px;
	}

	.mp-format-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.mp-format-card {
		min-height: 62px;
		padding: 10px 8px;
	}

	.mp-format-title {
		font-size: 15px;
	}

	.mp-format-desc {
		font-size: 12px;
	}

	.mp-custom-label {
		font-size: 15px;
	}

	.mp-selected-info,
	.mp-summary-note {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.mp-order-card {
		padding: 14px;
	}

	.mp-product-row {
		grid-template-columns: 52px 1fr;
	}

	.mp-product-thumb {
		width: 50px;
		height: 50px;
	}

	.mp-summary-row {
		flex-direction: column;
		gap: 2px;
	}

	.mp-summary-total {
		flex-direction: row;
		justify-content: space-between;
		gap: 10px;
	}
}

@media (max-width: 420px) {
	.mp-format-grid {
		grid-template-columns: 1fr;
	}
}
