/* Wochner Widgets – Sideboard JW.1 Konfigurator: additions on top of configurator.css (JW.C, loaded as dependency). */

/* 8 steps: tabs scroll sideways on narrow panels, active tab stays visible (JS) */
.jwcfg--sb .jwcfg__tabs { gap: 20px; padding: 0 26px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.jwcfg--sb .jwcfg__tabs::-webkit-scrollbar { display: none; }
.jwcfg--sb .jwcfg .jwcfg__tab, .jwcfg--sb .jwcfg__tab { flex: 0 0 auto; }

/* option cards: price line + texture / photo swatches */
.jwcfg__card-price { font-size: 14px; color: var(--c-mid); }
.jwcfg__card.is-selected .jwcfg__card-price { color: var(--c-text); }
.jwcfg__swatch--img { background-size: cover !important; background-position: center !important; }

/* cards with a photo (Mittelteil, modules) */
.jwcfg__card--photo { padding: 0 !important; overflow: hidden; min-height: 0; }
.jwcfg__card-photo { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #1a1a17; filter: saturate(0.9); transition: filter .25s ease; }
.jwcfg__card--photo .jwcfg__card-text { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.jwcfg__card.is-selected .jwcfg__card-photo { filter: none; }
.jwcfg__card-check {
	position: absolute; right: 10px; top: 10px; width: 24px; height: 24px; border-radius: 50%;
	border: 1.27px solid rgba(233, 231, 226, 0.6); background: rgba(13, 13, 11, 0.65);
	display: flex; align-items: center; justify-content: center; color: transparent; font-size: 14px; line-height: 1;
}
.jwcfg__card.is-selected .jwcfg__card-check { background: var(--c-text); border-color: var(--c-text); color: var(--c-bg); }

/* watch winder block: type + placement */
.jwcfg__sub { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1.27px solid var(--c-line); border-radius: 2.54px; background: #11110f; }
.jwcfg__sub-title { color: var(--c-text); font-size: 16px; }
.jwcfg__seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jwcfg .jwcfg__seg-btn {
	height: 44px; padding: 0 10px !important; border: 1.27px solid var(--c-line) !important; border-radius: 2.54px !important;
	background: var(--c-bg) !important; color: var(--c-mid) !important; font-size: 14px !important; line-height: 1.15 !important;
	transition: border-color .25s ease, color .25s ease, background-color .25s ease;
}
.jwcfg .jwcfg__seg-btn small { display: block; font-size: 12px; opacity: .8; }
.jwcfg .jwcfg__seg-btn.is-selected { background: var(--c-card) !important; border-color: var(--c-active-line) !important; color: var(--c-text) !important; }
.jwcfg .jwcfg__seg-btn:disabled { opacity: .35; cursor: default; }
.jwcfg__sub-note { color: var(--c-dim); font-size: 13px; }

/* upload */
.jwcfg__upload {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; padding: 20px;
	border: 1.27px dashed #3b3a35; border-radius: 2.54px; color: var(--c-mid); text-align: center; cursor: pointer;
	transition: border-color .25s ease, color .25s ease;
}
.jwcfg__upload:hover, .jwcfg__upload.is-drag { border-color: var(--c-active-line); color: var(--c-text); }
.jwcfg__upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.jwcfg__upload img { max-width: 220px; max-height: 110px; object-fit: contain; background: #fff; padding: 8px; border-radius: 2px; }
.jwcfg__upload-name { color: var(--c-text); font-size: 14px; word-break: break-all; }
.jwcfg .jwcfg__link { color: var(--c-mid) !important; font-size: 13px !important; text-decoration: underline !important; padding: 0 !important; }

/* summary */
.jwcfg__sum { display: flex; flex-direction: column; border-top: 1.27px solid var(--c-line); }
.jwcfg__sum-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 13px 0; border-bottom: 1.27px solid var(--c-line); font-size: 15px; }
.jwcfg__sum-row dt { color: var(--c-mid); font-size: 13px; grid-column: 1 / -1; }
.jwcfg__sum-row dd { margin: 0; color: var(--c-text); }
.jwcfg__sum-row .jwcfg__sum-price { text-align: right; color: var(--c-mid); white-space: nowrap; }
.jwcfg__sum-total { display: flex; justify-content: space-between; padding: 16px 0 0; font-size: 18px; color: var(--c-text); }

/* photo preview over the 3D view (Mittelteil / modules are not modelled individually) */
.jwcfg__photo {
	position: absolute; left: 26px; bottom: 100px; z-index: 3; width: 240px; border-radius: 4px; overflow: hidden;
	border: 1px solid #393832; background: #121210; box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
	opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .35s ease, transform .35s ease;
}
.jwcfg__photo.is-on { opacity: 1; transform: none; }
.jwcfg__photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.jwcfg__photo span { display: block; padding: 8px 12px; color: var(--c-mid); font-size: 13px; }

@media (max-width: 1024px) { .jwcfg__photo { left: 16px; bottom: 70px; width: 180px; } }
@media (max-width: 600px) {
	.jwcfg--sb .jwcfg__tabs { padding: 0 12px; gap: 14px; }
	.jwcfg__photo { display: none; }
	.jwcfg__seg { grid-template-columns: 1fr 1fr 1fr; }
}

/* photo cards: beat the mobile card padding of base.css (.jwcfg .jwcfg__card) */
.jwcfg .jwcfg__card.jwcfg__card--photo { padding: 0 !important; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; }
.jwcfg__card--photo .jwcfg__card-photo { width: 100%; max-width: none; }
.jwcfg__card-title { overflow-wrap: anywhere; hyphens: auto; }
.jwcfg .jwcfg__view { white-space: nowrap; }
@media (max-width: 420px) {
	.jwcfg__card--photo .jwcfg__card-text { padding: 10px 11px 12px; }
	.jwcfg .jwcfg__view { padding-left: 12px !important; padding-right: 12px !important; font-size: 13px !important; }
}

/* material cards: keep long names (e.g. "Eldorado Premium Schiefer") clear of the colour dot */
.jwcfg--sb .jwcfg .jwcfg__card:not(.jwcfg__card--photo), .jwcfg.jwcfg--sb .jwcfg__card:not(.jwcfg__card--photo) { padding-right: 46px !important; }

/* upload step: price on its own line, hint below */
.jwcfg__upload-price { display: flex; justify-content: space-between; margin: 4px 0 0; color: var(--c-mid); font-size: 14px; }
.jwcfg__upload-price strong { color: var(--c-text); font-weight: 400; white-space: nowrap; }
.jwcfg__hint--sb { display: block !important; color: var(--c-dim); font-size: 13px; line-height: 1.45; }

/* the sideboard is long and flat: on phones a shorter 3D area shows it bigger (the camera fits the width) */
@media (max-width: 600px) {
	.jwcfg--sb .jwcfg__stage { height: auto !important; min-height: 0 !important; aspect-ratio: 1 / 0.95; max-height: 60vh; }
}

/* winder buttons: grow with their text (long labels wrap on phones) */
.jwcfg .jwcfg__seg-btn { height: auto !important; min-height: 44px; padding: 8px 8px !important; }
@media (max-width: 600px) {
	.jwcfg .jwcfg__seg-btn { font-size: 13px !important; }
	.jwcfg .jwcfg__seg-btn small { font-size: 11px; margin-top: 2px; }
}

/* upload box: preview, file name and remove link stacked */
.jwcfg__upload-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* info text under the order button (cart not connected yet) */
.jwcfg--sb .jwcfg__msg.is-info { color: var(--c-mid); font-size: 14px; line-height: 1.45; text-align: center; margin-top: 10px; }

/* order button while the cart request runs */
.jwcfg--sb .jwcfg__cta.is-busy { opacity: .6; pointer-events: none; }
