/* MEISEN Konfigurator Tarasowy - style bazowe.
   Kolory oparte o CSS variables - łatwe do nadpisania w motywie Woodmart. */

.mtc-configurator,
.mtc-quote-form {
	--mtc-accent: #67B82D;
	--mtc-border: #e2e2e2;
	--mtc-bg-light: #f7f7f5;
	--mtc-text: #222;
	font-size: 15px;
	color: var(--mtc-text);
	max-width: 1100px;
}

.mtc-columns {
	display: flex;
	gap: 32px;
	flex-wrap: wrap;
}

.mtc-form-col { flex: 1 1 420px; min-width: 300px; }
.mtc-preview-col { flex: 1 1 320px; min-width: 280px; position: sticky; top: 20px; align-self: flex-start; }

.mtc-step { margin-bottom: 28px; }
.mtc-step h3 { font-size: 16px; margin: 0 0 12px; font-weight: 600; }

.mtc-shape-toggle { display: flex; gap: 12px; }
.mtc-radio-card {
	flex: 1;
	border: 1px solid var(--mtc-border);
	border-radius: 6px;
	padding: 12px 14px;
	cursor: pointer;
	text-align: center;
	transition: border-color .15s, background .15s;
}
.mtc-radio-card input { margin-right: 6px; }
.mtc-radio-card:has(input:checked) { border-color: var(--mtc-accent); background: var(--mtc-bg-light); }

.mtc-custom-shape-note { margin-top: 10px; font-size: 13px; color: #666; }
.mtc-custom-shape-note a { color: var(--mtc-accent); font-weight: 600; }

.mtc-dim-row { display: flex; gap: 16px; }
.mtc-dim-row label { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #555; }
.mtc-dim-row input[type="number"] {
	padding: 10px 12px; border: 1px solid var(--mtc-border); border-radius: 6px; font-size: 15px;
}
.mtc-dim-hint { font-weight: 400; font-size: 12px; color: #888; }

.mtc-board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.mtc-board-card {
	position: relative;
	border: 1px solid var(--mtc-border);
	border-radius: 6px;
	padding: 8px;
	cursor: pointer;
	text-align: center;
	display: block;
}
.mtc-board-card input { position: absolute; top: 6px; left: 6px; }
.mtc-board-card:has(input:checked),
.mtc-board-card.is-selected { border-color: var(--mtc-accent); box-shadow: 0 0 0 1px var(--mtc-accent); }
.mtc-board-swatch {
	display: block; width: 100%; height: 70px; border-radius: 4px;
	background-size: cover; background-position: center; background-color: #ddd; margin-bottom: 6px;
}
.mtc-board-name { display: block; font-size: 12px; font-weight: 600; }
.mtc-board-price { display: block; font-size: 12px; color: #777; }
.mtc-board-card.mtc-out-of-stock { opacity: .45; cursor: not-allowed; }
.mtc-board-oos { display: block; font-size: 10px; color: #b32d2e; font-weight: 700; margin-top: 2px; }

.mtc-addons-list { display: flex; flex-direction: column; gap: 8px; }
.mtc-addon-item { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

.mtc-note { font-size: 13px; color: #666; margin-top: 10px; }
.mtc-note a { color: var(--mtc-accent); font-weight: 600; }

.mtc-btn {
	display: inline-block; padding: 13px 28px; border-radius: 6px; border: none;
	font-size: 15px; font-weight: 600; cursor: pointer;
}
.mtc-btn-primary { background: var(--mtc-accent) !important; color: #fff !important; border: none !important; }
.mtc-btn-primary:hover { background: #559924 !important; color: #fff !important; opacity: 1 !important; }
.mtc-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.mtc-message { margin-top: 12px; font-size: 14px; }
.mtc-message.mtc-error { color: #b32d2e; }
.mtc-message.mtc-success { color: #2b6152; }

/* --- Podgląd wizualny (bird's-eye, bez 3D) --- */
.mtc-preview-box {
	background: var(--mtc-bg-light);
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 20px;
}
.mtc-preview-canvas {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mtc-wall-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.mtc-wall-item { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }

.mtc-wall-bar {
	position: absolute;
	z-index: 3;
	background: repeating-linear-gradient(45deg, rgba(90,90,90,.9) 0, rgba(90,90,90,.9) 4px, rgba(210,210,210,.9) 4px, rgba(210,210,210,.9) 8px);
}
.mtc-wall-bar-top    { top: 0; left: 0; width: 100%; height: 7px; }
.mtc-wall-bar-bottom { bottom: 0; left: 0; width: 100%; height: 7px; }
.mtc-wall-bar-left   { top: 0; left: 0; width: 7px; height: 100%; }
.mtc-wall-bar-right  { top: 0; right: 0; width: 7px; height: 100%; }

.mtc-fascia-bar {
	position: absolute;
	z-index: 4;
	background: #E6963C;
}
.mtc-fascia-bar-top    { top: 0; left: 0; width: 100%; height: 4px; }
.mtc-fascia-bar-bottom { bottom: 0; left: 0; width: 100%; height: 4px; }
.mtc-fascia-bar-left   { top: 0; left: 0; width: 4px; height: 100%; }
.mtc-fascia-bar-right  { top: 0; right: 0; width: 4px; height: 100%; }

.mtc-yesno-toggle { display: flex; gap: 16px; margin: 8px 0 12px; }
.mtc-radio-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.mtc-inline-field { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.mtc-inline-field label { font-size: 13px; font-weight: 600; color: #555; white-space: nowrap; }
.mtc-inline-field input { width: 90px; padding: 8px 10px; border: 1px solid var(--mtc-border); border-radius: 6px; font-size: 15px; }

.mtc-preview-placeholder {
	color: #999;
	font-size: 14px;
	text-align: center;
	padding: 0 20px;
}
.mtc-preview-rect {
	position: relative;
	background-color: #ddd;
	border: 3px solid #fff;
	box-shadow: 0 2px 10px rgba(0,0,0,.12);
	transition: width .2s, height .2s;
	max-width: 100%;
	max-height: 100%;
}
.mtc-plank {
	position: absolute;
}

.mtc-preview-hint { font-size: 12px; color: #888; text-align: center; margin: 10px 0 0; }

.mtc-axis-label {
	position: absolute;
	z-index: 5;
	font-size: 12px;
	font-weight: 600;
	color: #666;
	background: rgba(255,255,255,.85);
	padding: 2px 8px;
	border-radius: 4px;
	white-space: nowrap;
	pointer-events: none;
}
/* szerokość - z boku (lewa krawędź podglądu), tekst obrócony pionowo */
.mtc-axis-label-width {
	left: 4px;
	top: 50%;
	transform: translateY(-50%) rotate(-90deg);
	transform-origin: center;
}
/* długość - na dole podglądu, wzdłuż desek */
.mtc-axis-label-length {
	bottom: 4px;
	left: 50%;
	transform: translateX(-50%);
}

.mtc-addon-icon {
	position: absolute;
	width: 32px; height: 32px;
	top: -14px; left: 50%;
	transform: translateX(-50%);
	background-size: contain; background-repeat: no-repeat;
}

.mtc-summary {
	border: 1px solid var(--mtc-border);
	border-radius: 8px;
	padding: 18px 20px;
}
.mtc-summary h3 { margin: 0 0 12px; font-size: 15px; }
.mtc-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px dashed var(--mtc-border); }
.mtc-summary-row:last-child { border-bottom: none; }
.mtc-summary-combined em { font-style: normal; color: #777; font-size: 12px; margin-left: 4px; }
.mtc-summary-row strong,
.mtc-summary-row .woocommerce-Price-amount { color: var(--mtc-text) !important; font-weight: 600; }
.mtc-summary-total { font-size: 17px; font-weight: 700; margin-top: 6px; border-top: 1px solid var(--mtc-border); padding-top: 10px; }
.mtc-summary-total strong,
.mtc-summary-total .woocommerce-Price-amount { color: var(--mtc-accent) !important; }

/* --- Formularz wyceny --- */
.mtc-quote-form .mtc-field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.mtc-quote-form label { font-size: 13px; font-weight: 600; color: #444; }
.mtc-quote-form input[type="text"],
.mtc-quote-form input[type="email"],
.mtc-quote-form input[type="tel"],
.mtc-quote-form input[type="file"],
.mtc-quote-form select,
.mtc-quote-form textarea {
	padding: 10px 12px; border: 1px solid var(--mtc-border); border-radius: 6px; font-size: 14px; font-family: inherit;
}
.mtc-field-row { display: flex; gap: 16px; margin-bottom: 16px; }
.mtc-field-row .mtc-field { flex: 1; margin-bottom: 0; }
.mtc-field-row .mtc-field-narrow { flex: 0 0 120px; }

.mtc-radio-block {
	display: block;
	border: 1px solid var(--mtc-border);
	border-radius: 6px;
	padding: 12px 14px;
	margin-bottom: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: #333;
}
.mtc-radio-block:has(input:checked) { border-color: var(--mtc-accent); background: var(--mtc-bg-light); }
.mtc-radio-block input { margin-right: 8px; }

.mtc-checkbox-block {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	font-weight: 500;
	color: #444;
	cursor: pointer;
	line-height: 1.4;
}
.mtc-checkbox-block input { margin-top: 3px; flex: 0 0 auto; }

.mtc-note-warning {
	background: #fff8e6;
	border: 1px solid #f0d999;
	border-radius: 6px;
	padding: 10px 12px;
	color: #7a5c00;
	font-size: 13px;
	margin-top: 4px;
}

.mtc-courier-details { margin-top: 10px; }
.mtc-know-board-details { margin-top: 12px; }

.mtc-quote-success {
	background: #eaf7e1;
	border: 1px solid var(--mtc-accent);
	border-radius: 8px;
	padding: 32px 24px;
	text-align: center;
}
.mtc-quote-success h3 { margin: 0 0 10px; color: var(--mtc-accent); font-size: 20px; }
.mtc-quote-success p { margin: 0; color: #333; font-size: 15px; }

@media (max-width: 700px) {
	.mtc-preview-col { position: static; }
	.mtc-dim-row { flex-direction: column; }
	.mtc-field-row { flex-direction: column; gap: 12px; }
	.mtc-field-row .mtc-field-narrow { flex: 1; }
}
