/* ==========================================================================
   Midocean Print Configurator — Frontend Styles
   WoodMart-compatible (vanilla CSS, no framework deps)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Wrapper
   -------------------------------------------------------------------------- */
.midocean-print-configurator {
	margin: 20px 0 24px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	color: #1d2327;
}

.mc-product-price-note {
	margin: -4px 0 10px;
	font-size: 12px;
	line-height: 1.5;
	color: #50575e;
}

/* --------------------------------------------------------------------------
   Config header
   -------------------------------------------------------------------------- */
.mc-config-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}

.mc-config-title {
	font-size: 16px;
	font-weight: 700;
	margin: 0;
	color: #1d2327;
}

.mc-unbedruckt-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #646970;
	cursor: pointer;
}

.mc-unbedruckt-wrap input[type="checkbox"] {
	margin: 0;
}

/* Hide the whole config body when "unbedruckt" is checked */
.mc-config-body.is-hidden {
	display: none;
}

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */
.mc-step {
	margin-bottom: 20px;
}

.mc-step-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
	margin-bottom: 12px;
}

.mc-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: #1d2327;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	border-radius: 50%;
	flex-shrink: 0;
}

.mc-step-hint {
	font-size: 11px;
	font-weight: 400;
	color: #8c8f94;
	margin-left: 4px;
}

/* --------------------------------------------------------------------------
   Position grid
   -------------------------------------------------------------------------- */
.mc-position-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
}

@media (max-width: 600px) {
	.mc-position-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* --------------------------------------------------------------------------
   Position card
   -------------------------------------------------------------------------- */
.mc-position-card {
	position: relative;
	border: 2px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	background: #fff;
	transition: border-color .15s, box-shadow .15s, background .15s;
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
}

.mc-position-card:hover {
	border-color: #1d2327;
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.mc-position-card[aria-selected="true"],
.mc-position-card.is-active {
	border-color: #1d2327;
	background: #f5f5f5;
}

.mc-position-card__img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: contain;
	display: block;
	background: #f8f8f8;
	padding: 8px;
	box-sizing: border-box;
}

.mc-position-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	background: #f8f8f8;
	color: #bbb;
}

.mc-position-card__body {
	padding: 8px 10px 10px;
}

.mc-position-card__name {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #1d2327;
	margin-bottom: 3px;
}

.mc-position-card__dims {
	font-size: 11px;
	color: #646970;
	margin-bottom: 5px;
}

.mc-position-card__techniques {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
}

.mc-tech-chip {
	font-size: 9px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
	background: #f0f0f0;
	color: #3c434a;
	padding: 1px 5px;
	border-radius: 3px;
}

/* Checkmark overlay on selected card */
.mc-position-card__check {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 22px;
	height: 22px;
	background: #1d2327;
	border-radius: 50%;
	display: none;
	align-items: center;
	justify-content: center;
}

.mc-position-card.is-active .mc-position-card__check,
.mc-position-card[aria-selected="true"] .mc-position-card__check {
	display: flex;
}

/* --------------------------------------------------------------------------
   Position panel (step 2+3 for each position)
   -------------------------------------------------------------------------- */
.mc-position-panel {
	background: #fafafa;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 16px 18px;
	margin-bottom: 16px;
}

.mc-position-panel[hidden] {
	display: none;
}

/* --------------------------------------------------------------------------
   Technique grid
   -------------------------------------------------------------------------- */
.mc-technique-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 8px;
}

.mc-technique-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	padding: 10px 12px;
	border: 2px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	background: #fff;
	transition: border-color .15s, background .15s;
}

.mc-technique-card:hover {
	border-color: #1d2327;
}

.mc-technique-card.is-selected {
	border-color: #1d2327;
	background: #f5f5f5;
}

.mc-technique-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mc-technique-card__dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
}

.mc-technique-card__name {
	font-size: 12px;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.3;
}

.mc-technique-card__colors {
	font-size: 11px;
	color: #646970;
}

.mc-technique-card__area {
	font-size: 11px;
	font-weight: 600;
	color: #3c434a;
}

/* --------------------------------------------------------------------------
   Pantone inputs
   -------------------------------------------------------------------------- */
.mc-colors-wrap,
.mc-pantones-wrap {
	margin-top: 12px;
}

.mc-colors-label,
.mc-pantones-label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #3c434a;
}

.mc-pantone-inputs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 8px;
}

.mc-pantone-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
}

.mc-pantone-field__label {
	font-size: 11px;
	color: #646970;
}

.midocean-print-configurator .mc-pantone-input {
	width: 100%;
	min-height: 36px;
	margin: 0;
	padding: 7px 9px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	box-sizing: border-box;
	background: #fff;
	font: inherit;
	font-size: 13px;
	color: #1d2327;
}

.midocean-print-configurator .mc-pantone-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* --------------------------------------------------------------------------
   Upload zone
   -------------------------------------------------------------------------- */
.mc-upload-zone {
	margin-bottom: 8px;
}

.mc-upload-area {
	border: 2px dashed #ccc;
	border-radius: 8px;
	padding: 24px 20px;
	text-align: center;
	background: #fff;
	cursor: pointer;
	transition: border-color .2s, background .2s;
	min-height: 110px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mc-upload-area:hover,
.mc-upload-area.is-dragover {
	border-color: #1d2327;
	background: #f5f5f5;
}

/* Enforce the hidden attribute – themes (Woodmart/Elementor) often set a
   display rule on these classes that would otherwise override [hidden]. */
.mc-upload-area__idle[hidden],
.mc-upload-area__uploading[hidden],
.mc-upload-area__result[hidden],
.midocean-print-configurator [hidden] {
	display: none !important;
}

.mc-upload-area__idle {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: #8c8f94;
}

.mc-upload-area__idle svg {
	opacity: .5;
}

.mc-upload-area__text {
	font-size: 13px;
	color: #3c434a;
	margin: 0;
}

.mc-upload-browse-btn {
	background: none;
	border: none;
	padding: 0;
	color: #1d2327;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	font-size: inherit;
}

.mc-upload-area__hint {
	font-size: 11px;
	color: #8c8f94;
	margin: 0;
}

/* Uploading state */
.mc-upload-area__uploading {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.mc-upload-progress-bar-wrap {
	width: 100%;
	height: 6px;
	background: #e0e0e0;
	border-radius: 3px;
	overflow: hidden;
}

.mc-upload-progress-bar {
	height: 100%;
	width: 0%;
	background: #1d2327;
	border-radius: 3px;
	transition: width .2s;
}

/* Result state */
.mc-upload-area__result {
	width: 100%;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mc-upload-result-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.mc-upload-filename {
	font-size: 12px;
	font-weight: 600;
	color: #1d2327;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 80%;
}

.mc-upload-remove-btn {
	background: none;
	border: none;
	color: #8c8f94;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	padding: 0;
	flex-shrink: 0;
}

.mc-upload-remove-btn:hover {
	color: #d63638;
}

/* --------------------------------------------------------------------------
   DPI Ampel
   -------------------------------------------------------------------------- */
.mc-dpi-meter {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mc-dpi-meter__bar-wrap {
	height: 8px;
	background: #f0f0f0;
	border-radius: 4px;
	overflow: hidden;
}

.mc-dpi-meter__bar {
	height: 100%;
	width: 0%;
	border-radius: 4px;
	transition: width .4s ease, background-color .4s ease;
	background: #8c8f94;
}

.mc-dpi-meter__bar.is-red    { background: #d63638; }
.mc-dpi-meter__bar.is-yellow { background: #dba617; }
.mc-dpi-meter__bar.is-green  { background: #00a32a; }
.mc-dpi-meter__bar.is-error  { background: #d63638; }
.mc-dpi-meter__bar.is-warn   { background: #dba617; }
.mc-dpi-meter__bar.is-ok     { background: #00a32a; }

.mc-dpi-meter__info {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
}

.mc-dpi-value {
	font-weight: 700;
	color: #1d2327;
}

.mc-dpi-label {
	color: #646970;
}

/* Upload status badge */
.mc-upload-status-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 3px 8px;
	border-radius: 3px;
	line-height: 1.4;
}

.mc-upload-status-badge.is-ok {
	background: #d7f0dd;
	color: #0a4a1a;
}

.mc-upload-status-badge.is-warn {
	background: #fcf9e8;
	color: #7a5c00;
}

.mc-upload-status-badge.is-error {
	background: #fce8e8;
	color: #78050a;
}

/* Message list */
.mc-upload-messages {
	margin: 0;
	padding: 0 0 0 16px;
	list-style: disc;
	font-size: 11px;
	color: #646970;
}

.mc-upload-messages li {
	margin-bottom: 2px;
}

/* Optional note */
.mc-optional-note {
	font-size: 11px;
	color: #8c8f94;
	margin: 4px 0 0;
}

/* --------------------------------------------------------------------------
   Live price summary
   -------------------------------------------------------------------------- */
.mc-price-summary {
	margin-top: 18px;
	padding: 14px 16px;
	background: #f7f8f8;
	border-top: 2px solid #1d2327;
	border-bottom: 1px solid #dcdcde;
}

.mc-price-summary__title {
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 8px;
}

.mc-price-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 4px 0;
	font-size: 12px;
}

.mc-price-row strong {
	font-size: 13px;
	white-space: nowrap;
}

.mc-price-row--unit-total {
	margin-top: 4px;
	padding-top: 8px;
	border-top: 1px solid #dcdcde;
}

.mc-price-row--order-total {
	margin-top: 6px;
	padding-top: 9px;
	border-top: 1px solid #8c8f94;
	font-size: 13px;
	font-weight: 700;
}

.mc-price-row--order-total strong {
	font-size: 16px;
}

.mc-price-summary__source,
.mc-price-summary__error {
	font-size: 11px;
	margin: 8px 0 0;
}

.mc-price-summary__source {
	color: #646970;
}

.mc-price-summary__error {
	color: #8a2424;
	font-weight: 600;
}

.mc-price-summary.has-price-error {
	border-top-color: #b32d2e;
}

/* --------------------------------------------------------------------------
   Druckinformationen toggle section
   -------------------------------------------------------------------------- */
.mc-druckinfo-section {
	margin-top: 20px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
}

.mc-druckinfo-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f8f8f8;
	border: none;
	padding: 12px 16px;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	cursor: pointer;
	text-align: left;
	gap: 8px;
}

.mc-druckinfo-toggle:hover {
	background: #f0f0f0;
}

.mc-druckinfo-toggle__icon {
	flex-shrink: 0;
	transition: transform .2s;
}

.mc-druckinfo-toggle[aria-expanded="true"] .mc-druckinfo-toggle__icon {
	transform: rotate(180deg);
}

.mc-druckinfo-body {
	padding: 16px;
	background: #fff;
}

.mc-druckinfo-body[hidden] {
	display: none;
}

/* Technique info cards */
.mc-druckinfo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 10px;
	margin-bottom: 18px;
}

.mc-druckinfo-card {
	display: flex;
	gap: 10px;
	background: #f8f8f8;
	border-radius: 6px;
	padding: 10px 12px;
}

.mc-druckinfo-card__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
	margin-top: 4px;
}

.mc-druckinfo-card__body {
	flex: 1;
}

.mc-druckinfo-card__name {
	font-size: 12px;
	font-weight: 700;
	margin: 0 0 5px;
}

.mc-druckinfo-card__pros,
.mc-druckinfo-card__cons {
	margin: 0;
	padding: 0 0 0 0;
	list-style: none;
	font-size: 11px;
	line-height: 1.5;
}

.mc-druckinfo-card__pros li { color: #00a32a; }
.mc-druckinfo-card__cons li { color: #646970; }

/* Positions table */
.mc-positions-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}

.mc-positions-table th,
.mc-positions-table td {
	padding: 8px 10px;
	text-align: left;
	border-bottom: 1px solid #f0f0f1;
}

.mc-positions-table th {
	font-weight: 700;
	background: #f8f8f8;
	color: #3c434a;
}

/* Elementor checkout: show only the uploaded logo, never a wide text card. */
.woocommerce-checkout .mc-checkout-artwork-preview {
	display: inline-flex !important;
	flex: 0 0 40px !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	max-width: 40px !important;
	min-width: 40px !important;
	height: 40px !important;
	margin: 0 0 0 8px !important;
	padding: 3px !important;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	box-sizing: border-box;
	background: #fff;
	vertical-align: middle;
	overflow: hidden;
}

.woocommerce-checkout .mc-checkout-artwork-preview img {
	width: 34px !important;
	height: 34px !important;
	min-width: 34px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 2px;
	box-sizing: border-box;
	background: #fff;
	object-fit: contain;
}

.woocommerce-checkout .woocommerce-checkout-review-order-table .product-name {
	vertical-align: middle;
}
