/*
 * Styles that keep the theme look with Extra Product Options 7.6+.
 * Loaded by ndg-functions before the theme stylesheet, so theme rules still win on ties.
 */

/*
 * EPO 7.6 resets the totals box (dl.tm-extra-product-options-totals dt, dd { display: initial }),
 * which beats the Additional CSS that hides the totals labels and the options total.
 */
body dl.tm-custom-price-totals dt { display: none; }
body dl.tm-extra-product-options-totals .tm-options-totals { display: none; }

/* EPO 7.6 also sets line-height 1.5 on the totals box and pads its rows; 7.3.2 left both to the theme. */
body dl.tm-extra-product-options-totals { line-height: inherit; }
body dl.tm-extra-product-options-totals dd { padding-bottom: 0; }

/*
 * EPO 7.6 spaces its grid with flex gaps instead of cell margins and list item padding.
 * The rules below put back the 7.3.2 spacing the theme was designed with. The var() fallbacks
 * keep them right on EPO 7.3.2, which has no --tcgaprow / --tcinnergapcolumn.
 */
.tm-extra-product-options .cpf-section.tc-cell { margin-top: calc(var(--tcgaprow, 15px) / 2); }
.tm-extra-product-options ul.tmcp-ul-wrap.tm-element-ul-checkbox,
.tm-extra-product-options ul.tmcp-ul-wrap.tm-element-ul-radio { row-gap: 0; }
.tm-extra-product-options ul.tmcp-ul-wrap.tm-element-ul-checkbox li.tmcp-field-wrap,
.tm-extra-product-options ul.tmcp-ul-wrap.tm-element-ul-radio li.tmcp-field-wrap { padding-top: calc(var(--tcgaprow, 15px) / 2); padding-bottom: calc(var(--tcgaprow, 15px) / 2); }
.tm-extra-product-options ul.tmcp-ul-wrap li.tmcp-field-wrap.tmcp-field-wrap_range2 { gap: 0; }

/*
 * EPO 7.6 wraps the option text in an inline-flex box, which puts a gap after an emoji and
 * drops the space before the text; 7.3.2 printed the text inline.
 */
.tm-extra-product-options .tc-label-text { display: block; }

/*
 * EPO 7.6 shrank the option help icon to the text size (1.25em before), gave it the text
 * line-height, and its Font Awesome 7 makes every icon 1.25em wide.
 */
.tm-extra-product-options .tc-tooltip { font-size: 1.25em; width: auto; height: 1em; }
.tm-extra-product-options .tc-epo-style-space.tc-tooltip { line-height: 1 !important; }
/* 7.3.2 put the icon 0.5em after the option text; 7.6 puts the grid gap there instead. */
.tm-extra-product-options .tc-label-inner > .tc-tooltip { margin-left: calc(0.5em - var(--tcinnergapcolumn, 7.5px)); }

/*
 * The theme drops the Additional CSS bottom margin of a dropdown with .tmcp-select:last-child.
 * EPO 7.6 prints a hidden help icon after every select, so the select is never the last child.
 */
.ndg-summary .tm-extra-product-options .tmcp-select { margin-bottom: 0; }

/*
 * EPO 7.6 adds .tc-expand to every checkbox list and clips it (overflow: hidden) for its
 * "Load more" collapse, which 7.6.2 does not run. The theme draws checkbox boxes 3px outside
 * the label, so the clipping cut their top and bottom borders. Clip only a collapsed list
 * (the collapse sets an inline max-height).
 */
.tc-expand .tmcp-ul-wrap:not([style*="max-height"]) { overflow: visible; }

/*
 * EPO 7.6 ships noUiSlider 15 with its skin scoped to .tm-range-picker; up to 7.5 the skin
 * applied to every slider. The block below is the EPO 7.3.2 skin limited to the theme's sliders
 * (range2 and the product quantity slider).
 * The v14 ".noui-origin { height: 10%; width: 10% }" rule is left out: noUiSlider 15 moves
 * full-width origins, so that rule would squeeze both handles to the right end.
 */
.noui-target:where(.tm-range-picker2, .product-tm-quantity__slider),
.noui-target:where(.tm-range-picker2, .product-tm-quantity__slider) * { -webkit-touch-callout: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-user-select: none; -ms-touch-action: none; touch-action: none; -ms-user-select: none; -moz-user-select: none; user-select: none; -moz-box-sizing: border-box; box-sizing: border-box; }
.noui-target:where(.tm-range-picker2, .product-tm-quantity__slider) { position: relative; background: #cdcdcd; border-radius: 4px; border: 0; box-shadow: none; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-base,
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-connects { width: 100%; height: 100%; position: relative; z-index: 1; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-connects { overflow: hidden; z-index: 0; border-radius: 3px; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-connect,
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-origin { will-change: transform; position: absolute; z-index: 1; top: 0; right: 0; -ms-transform-origin: 0 0; -webkit-transform-origin: 0 0; -webkit-transform-style: preserve-3d; transform-origin: 0 0; transform-style: flat; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-connect { height: 100%; width: 100%; background: #3fb8af; }
.noui-vertical:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-origin { width: 0; }
.noui-horizontal:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-origin { height: 0; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle { -webkit-backface-visibility: hidden; backface-visibility: hidden; position: absolute; border: 0; border-radius: 50%; background: #3fb8af; cursor: pointer; box-shadow: none; outline: none !important; transition: all 0.1s ease-out, border-color 0.2s ease-out; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-touch-area { height: 100%; width: 100%; }
.noui-state-tap:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-connect,
.noui-state-tap:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-origin { -webkit-transition: transform 0.3s; transition: transform 0.3s; }
.noui-state-drag * { cursor: inherit !important; }
.noui-txt-dir-rtl.noui-horizontal:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-origin { left: 0; right: auto; }
:where(.tm-range-picker2, .product-tm-quantity__slider)[disabled] .noui-connect { background: #b8b8b8; }
[disabled].noui-target:where(.tm-range-picker2, .product-tm-quantity__slider),
:where(.tm-range-picker2, .product-tm-quantity__slider) [disabled].noui-handle,
:where(.tm-range-picker2, .product-tm-quantity__slider)[disabled] .noui-handle { cursor: not-allowed; }
.noui-horizontal:where(.tm-range-picker2, .product-tm-quantity__slider) { height: 3px; }
.noui-horizontal:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle { width: 14px; height: 14px; right: -7px; top: -5px; }
.noui-vertical:where(.tm-range-picker2, .product-tm-quantity__slider) { width: 18px; }
.noui-vertical:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle { width: 28px; height: 34px; right: -6px; top: -17px; }
.noui-txt-dir-rtl.noui-horizontal:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle { left: -8px; right: auto; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-draggable { cursor: ew-resize; }
.noui-vertical:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-draggable { cursor: ns-resize; }
.noui-horizontal:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-active.noui-handle { box-shadow: none; width: 16px; height: 16px; right: -8px; top: -6px; }
.noui-txt-dir-rtl.noui-horizontal:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-active.noui-handle { left: -8px; right: auto; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle::before { width: 2em; height: 2em; background-color: rgba(1, 164, 211, 0.2); content: ""; display: block !important; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); transition: all 0.1s ease-out, border-color 0.2s ease-out; border-radius: 50%; will-change: transform; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle::before,
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle::after { display: none; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle:hover::before,
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-active.noui-handle::before { transform: translate(-50%, -50%) scale(1); }
.noui-vertical:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle::before,
.noui-vertical:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle::after { width: 14px; height: 1px; left: 6px; top: 14px; }
.noui-vertical:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle::after { top: 17px; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-pips,
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-pips * { -moz-box-sizing: border-box; box-sizing: border-box; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-pips { position: absolute; color: #999; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-value { position: absolute; white-space: nowrap; text-align: center; font-size: 0.8em; margin-top: 0.8em; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-value-sub { color: #ccc; font-size: 10px; margin-top: 0.6em; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-marker { position: absolute; background: #ccc; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-marker-sub { background: #aaa; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-marker-large { background: #aaa; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-pips-horizontal { padding: 10px 0; height: 80px; top: 100%; left: 0; width: 100%; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-value-horizontal { -webkit-transform: translate(-50%, 50%); transform: translate(-50%, 50%); }
.noui-rtl:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-value-horizontal { -webkit-transform: translate(50%, 50%); transform: translate(50%, 50%); }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-marker-horizontal.noui-marker { margin-left: -1px; width: 1px; height: 5px; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-marker-horizontal.noui-marker-sub { height: 10px; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-marker-horizontal.noui-marker-large { height: 15px; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-pips-vertical { padding: 0 10px; height: 100%; top: 0; left: 100%; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-value-vertical { -webkit-transform: translate(0, -50%); transform: translate(0, -50%); padding-left: 25px; }
.noui-rtl:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-value-vertical { -webkit-transform: translate(0, 50%); transform: translate(0, 50%); }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-marker-vertical.noui-marker { width: 5px; height: 2px; margin-top: -1px; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-marker-vertical.noui-marker-sub { width: 10px; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-marker-vertical.noui-marker-large { width: 15px; }
:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-tooltip { display: none; position: absolute; border: 1px solid #d9d9d9; border-radius: 3px; background: #fff; color: #000; padding: 5px; text-align: center; white-space: nowrap; }
.noui-horizontal:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-tooltip { -webkit-transform: translate(-50%, 0); -webkit-transform: translate(-50%, 0); transform: translate(-50%, 0%); left: 50%; background: #3fb8af; bottom: 120%; color: #fff; border: 2px solid #fff; }
.noui-vertical:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-tooltip { -webkit-transform: translate(0, -50%); transform: translate(0, -50%); top: 50%; right: 120%; }
.noui-show-tooltip:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-tooltip,
.noui-show-tooltip:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-active .noui-tooltip { display: block; }
.noui-horizontal:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-origin > .noui-tooltip { -webkit-transform: translate(50%, 0); transform: translate(50%, 0); left: auto; bottom: 10px; }
.noui-vertical:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-origin > .noui-tooltip { -webkit-transform: translate(0, -18px); transform: translate(0, -18px); top: auto; right: 28px; }
.noui-show-tooltip:where(.tm-range-picker2, .product-tm-quantity__slider) .noui-handle:hover .noui-tooltip { display: block; }
