/**
 * PSDM Designer Option Cards — mockup-grade card skin for the Product tab.
 *
 * Structure per card: .psdm-oc-head (title + chevron) / .psdm-oc-sel (media
 * tile + value + subtitle + Change, or the quantity stepper + price block) /
 * .psdm-oc-body (option rows). The native select + row label stay in the DOM
 * as the source of truth. The AX theme restyles rows as flex at
 * html.psdm-ax-theme specificity, so layout overrides carry !important under
 * the wrap id (boot-gate specificity pattern).
 */

#nbo-options-wrap form.psdm-oc-on table.variations,
#nbo-options-wrap form.psdm-oc-on table.variations tbody,
#nbo-options-wrap form.psdm-oc-on table.variations tr.psdm-oc-row,
#nbo-options-wrap form.psdm-oc-on table.variations tr.psdm-oc-row td.psdm-oc-cell {
	display: block !important;
	width: 100% !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
}

/* ONE container card (the mockup look): the chrome lives on the TABLE;
   each option is a flat row inside it, separated by hairline dividers —
   never a stack of individual bordered cards. */
#nbo-options-wrap form.psdm-oc-on table.variations {
	background: #fff !important;
	border: 1px solid var(--ax-gray-200, #e8eaee) !important;
	border-radius: 14px !important;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05) !important;
	overflow: hidden !important;
}

#nbo-options-wrap form.psdm-oc-on table.variations tr.psdm-oc-row + tr.psdm-oc-row {
	border-top: 1px solid var(--ax-gray-100, #f2f3f6) !important;
}

#nbo-options-wrap form.psdm-oc-on table.variations tr.psdm-oc-row td.label,
#nbo-options-wrap form.psdm-oc-on td.psdm-oc-cell > select {
	display: none !important;
}

/* ------------------------------------------------------------------ Card */

/* Flat section row inside the container card — no chrome of its own. */
.psdm-oc-card {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.psdm-oc-card.is-open {
	background: var(--ax-gray-25, #fcfcfd);
}

/* Locked with a chosen value (auto-picked single option): looks normal,
   just not editable. Locked with NOTHING chosen: dimmed placeholder. */
.psdm-oc-card.is-locked:not(.is-chosen) { opacity: 0.45; }
.psdm-oc-card.is-locked .psdm-oc-change { display: none; }

tr.cascade-locked .psdm-oc-card,
tr.cascade-locked .psdm-oc-card * { pointer-events: none; }

/* Title row */
.psdm-oc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 14px 16px 0;
	background: transparent;
	border: 0;
	cursor: pointer;
	font: inherit;
	text-align: left;
}

.psdm-oc-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--ax-gray-900, #17181d);
	letter-spacing: 0.01em;
}

.psdm-oc-chev {
	width: 16px;
	height: 16px;
	color: var(--ax-gray-500, #8b909e);
	transition: transform 0.18s ease;
}

.psdm-oc-chev svg { width: 100%; height: 100%; display: block; }
.psdm-oc-card.is-open .psdm-oc-chev { transform: rotate(180deg); }
.psdm-oc-card.is-locked .psdm-oc-chev { visibility: hidden; }

/* Content row */
.psdm-oc-sel {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px 16px;
	min-height: 44px;
}

.psdm-oc-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.psdm-oc-val {
	font-size: 14px;
	font-weight: 700;
	color: var(--ax-gray-900, #17181d);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.psdm-oc-val.is-empty { color: var(--ax-gray-500, #8b909e); font-weight: 500; }

.psdm-oc-sub {
	font-size: 12.5px;
	color: var(--ax-gray-500, #8b909e);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.psdm-oc-change {
	flex: 0 0 auto;
	background: transparent;
	border: 0;
	padding: 4px 2px;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	color: var(--ax-accent, #0b6623);
	cursor: pointer;
}

.psdm-oc-change:hover { text-decoration: underline; }

/* Media tile */
/* Flat tile — no border/shadow box, or it reads as a card inside the card
   (boss call, 2026-08-20). Images keep a soft radius; icons sit bare. */
.psdm-oc-media {
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	border-radius: 8px;
	background: transparent center/contain no-repeat;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.psdm-oc-media-sm { width: 30px; height: 30px; border-radius: 6px; }

.psdm-oc-media-icon { color: var(--ax-gray-600, #5c6270); }
.psdm-oc-media-icon svg { width: 60%; height: 60%; }

.psdm-oc-media-wheel {
	border-radius: 50%;
	background: conic-gradient(#f43f5e, #f59e0b, #facc15, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e);
}

.psdm-oc-media-wheel::after {
	content: '';
	position: absolute;
	inset: 28%;
	border-radius: 50%;
	background: #fff;
}

.psdm-oc-media-swatch { border-radius: 50%; background: var(--psdm-oc-swatch, #d5d8de); }

.psdm-oc-mbadge {
	position: absolute;
	right: -4px;
	bottom: -4px;
	font-size: 9px;
	font-weight: 800;
	background: var(--ax-gray-900, #17181d);
	color: #fff;
	border-radius: 6px;
	padding: 1px 4px;
	line-height: 1.4;
}

/* Quantity stepper + price block */
.psdm-oc-stepper {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--ax-gray-300, #d5d8de);
	border-radius: 10px;
	overflow: hidden;
}

.psdm-oc-step {
	width: 38px;
	border: 0;
	background: #fff;
	font-size: 17px;
	color: var(--ax-gray-900, #17181d);
	cursor: pointer;
	padding: 8px 0;
}

.psdm-oc-step:hover { background: var(--ax-gray-100, #f2f3f6); }

.psdm-oc-qtyval {
	min-width: 62px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
	border-left: 1px solid var(--ax-gray-200, #e8eaee);
	border-right: 1px solid var(--ax-gray-200, #e8eaee);
	padding: 0 8px;
}

.psdm-oc-priceblock {
	margin-left: auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 1px;
}

.psdm-oc-total { font-size: 17px; font-weight: 800; color: var(--ax-gray-900, #17181d); }
.psdm-oc-each { font-size: 12px; color: var(--ax-gray-500, #8b909e); }

/* ------------------------------------------------------------ Option list */

.psdm-oc-body { display: none; }

.psdm-oc-card.is-open .psdm-oc-body {
	display: block;
	padding: 4px 10px 12px;
	border-top: 1px solid var(--ax-gray-100, #f2f3f6);
	max-height: 320px;
	overflow-y: auto;
}

/* Orientation / ZIP blocks below the table pick up the SAME single-card
   chrome so the whole tab reads as a few clean cards (mockup bottom rows). */
#nbo-options-wrap form.psdm-oc-on #psdm-orientation-selector,
#nbo-options-wrap form.psdm-oc-on #rps-zone-selector {
	background: #fff;
	border: 1px solid var(--ax-gray-200, #e8eaee);
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
	padding: 14px 16px;
	margin-top: 12px;
}

.psdm-oc-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px;
	background: transparent;
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	text-align: left;
	font: inherit;
	font-size: 13.5px;
	color: var(--ax-gray-900, #17181d);
}

.psdm-oc-opt:hover { background: var(--ax-gray-50, #f7f8fa); }
.psdm-oc-opt.is-on { background: var(--ax-cta-tint, #eef7ef); font-weight: 700; }

.psdm-oc-optlabel {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.psdm-oc-radio {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	border: 2px solid var(--ax-gray-300, #d5d8de);
	border-radius: 50%;
	position: relative;
}

.psdm-oc-opt.is-on .psdm-oc-radio { border-color: var(--ax-accent, #0b6623); }

.psdm-oc-opt.is-on .psdm-oc-radio::after {
	content: '';
	position: absolute;
	inset: 2.5px;
	border-radius: 50%;
	background: var(--ax-accent, #0b6623);
}

/* -------------------------------------------------------------- AX override
   The AX theme cards each row individually at
   html.psdm-ax-theme body.nbd-mode-modern #nbo-options-wrap form... tr
   specificity (radius + shadow + hover lift + margins). Matching-strength
   kill block so rows go FLAT inside the single container card. */
html.psdm-ax-theme body.nbd-mode-modern #nbo-options-wrap form.psdm-oc-on table.variations tr.psdm-oc-row,
html.psdm-ax-theme body.nbd-mode-modern #nbo-options-wrap form.psdm-oc-on table.variations tr.psdm-oc-row:hover,
html.psdm-ax-theme body.nbd-mode-modern #nbo-options-wrap form.psdm-oc-on table.variations tr.psdm-oc-row:not(.cascade-locked):hover {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	transform: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

html.psdm-ax-theme body.nbd-mode-modern #nbo-options-wrap form.psdm-oc-on table.variations tr.psdm-oc-row + tr.psdm-oc-row {
	border-top: 1px solid var(--ax-gray-100, #f2f3f6) !important;
}
