/* Nitzotz – הטבעות. Front end (product page, cart, checkout, order) + admin order lines. Brand: navy #16294A, gold #D6A94B. */

/* ---------- Product page ---------- */
form.cart .nz-engr { flex: 0 0 100%; width: 100%; order: -1; margin-block-end: 14px; }
.nz-engr { text-align: start; }

.nz-engr-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; color: #16294A; user-select: none; }
.nz-engr-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nz-engr-toggle-box { width: 20px; height: 20px; border: 2px solid #16294A; border-radius: 5px; display: inline-grid; place-items: center; transition: background .15s; flex: none; }
.nz-engr-toggle input:checked + .nz-engr-toggle-box { background: #16294A; }
.nz-engr-toggle input:checked + .nz-engr-toggle-box::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.nz-engr-toggle input:focus-visible + .nz-engr-toggle-box { box-shadow: 0 0 0 3px rgba(214, 169, 75, .45); }
.nz-engr-toggle-text::before { content: "✦ "; color: #D6A94B; }

.nz-engr-panel { margin-top: 12px; }
.nz-engr-panel[hidden], .nz-engr [hidden] { display: none !important; }
.nz-engr-boxes { display: flex; flex-direction: column; gap: 12px; }

.nz-engr-box { position: relative; border: 1px solid #e6dcc4; border-radius: 12px; padding: 14px; background: #fffdf8; }
.nz-engr-box-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 10px; }
.nz-engr-box-title { font-weight: 600; color: #16294A; font-size: 14px; }
.nz-engr button.nz-engr-x { all: unset; box-sizing: border-box; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #8a8f99; font-size: 18px; line-height: 1; transition: background .15s, color .15s; }
.nz-engr button.nz-engr-x:hover, .nz-engr button.nz-engr-x:focus-visible { background: #f1ece0; color: #16294A; }

.nz-engr-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 999px; background: #f3efe5; margin-block-end: 10px; }
.nz-engr button.nz-engr-seg-btn { all: unset; box-sizing: border-box; cursor: pointer; padding: 6px 14px; border-radius: 999px; font-size: 13px; color: #4b5160; transition: background .15s, color .15s; }
.nz-engr button.nz-engr-seg-btn.is-on { background: #16294A; color: #fff; }
.nz-engr button.nz-engr-seg-btn:focus-visible { box-shadow: 0 0 0 2px #D6A94B; }
.nz-engr .nz-engr-seg-sm button.nz-engr-seg-btn { padding: 4px 12px; font-size: 12.5px; }
.nz-engr-sw-gold::before, .nz-engr-sw-silver::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 6px; vertical-align: -1px; }
.nz-engr-sw-gold::before { background: linear-gradient(135deg, #f3d98b, #C9A24A); }
.nz-engr-sw-silver::before { background: linear-gradient(135deg, #f1f2f4, #9aa0a6); }

.nz-engr-label { display: block; font-size: 13px; color: #4b5160; margin-block: 4px; }
.nz-engr-field { position: relative; display: flex; align-items: center; gap: 8px; margin-block-end: 6px; }
.nz-engr .nz-engr-input, .nz-engr .nz-engr-note-input { flex: 1; min-width: 0; width: 100%; border: 1px solid #d9d2c0; border-radius: 8px; background: #fff; padding: 8px 10px; font-size: 15px; }
.nz-engr .nz-engr-note-input { height: 64px; min-height: 0; resize: vertical; }
.nz-engr .nz-engr-input { height: 42px; padding-inline-end: 118px; }
.nz-engr .nz-engr-input:focus, .nz-engr .nz-engr-note-input:focus { border-color: #D6A94B; outline: none; box-shadow: 0 0 0 3px rgba(214, 169, 75, .25); }
.nz-engr-count { position: absolute; inset-inline-end: 10px; font-size: 11.5px; color: #8a8f99; pointer-events: none; white-space: nowrap; }
.nz-engr-count.is-low { color: #b3261e; font-weight: 600; }
.nz-engr-lines .nz-engr-field:has(.nz-engr-line-x) .nz-engr-count { inset-inline-end: 44px; }
.nz-engr button.nz-engr-line-x { all: unset; box-sizing: border-box; cursor: pointer; width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #8a8f99; font-size: 16px; }
.nz-engr button.nz-engr-line-x:hover { background: #f1ece0; color: #16294A; }
.nz-engr button.nz-engr-link { all: unset; box-sizing: border-box; cursor: pointer; color: #16294A; font-size: 13px; font-weight: 600; padding: 4px 0; }
.nz-engr button.nz-engr-link:hover { color: #a07a28; }
.nz-engr-hint { font-size: 12.5px; color: #6b7080; margin-block: 4px 8px; }

.nz-engr-file input[type="file"] { font-size: 13px; max-width: 100%; }
.nz-engr-file-status { font-size: 13px; margin-top: 6px; }

.nz-engr-box-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.nz-engr-box-foot .nz-engr-label { margin: 0; }
.nz-engr-box-foot .nz-engr-seg { margin: 0; }
.nz-engr-qty { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #4b5160; margin-inline-start: auto; }
.nz-engr .nz-engr-qty input { width: 84px; height: 36px; border: 1px solid #d9d2c0; border-radius: 8px; text-align: center; }

.nz-engr button.nz-engr-add { all: unset; box-sizing: border-box; cursor: pointer; margin-top: 10px; padding: 8px 14px; border: 1px dashed #C9A24A; border-radius: 10px; color: #16294A; font-size: 13.5px; font-weight: 600; }
.nz-engr button.nz-engr-add:hover, .nz-engr button.nz-engr-add:focus-visible { background: #fff7e3; }
.nz-engr-mode { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 14px; }
.nz-engr-mode label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; }
.nz-engr-mode input { accent-color: #16294A; margin: 0; }
.nz-engr-type .nz-engr-seg { margin-block-end: 12px; }
.nz-engr-summary { margin-top: 14px; border: 1px solid #e6dcc4; border-radius: 12px; background: #fff; padding: 10px 14px; color: #16294A; font-size: 14px; }
.nz-engr-sum-title { font-weight: 700; font-size: 13.5px; margin-block-end: 6px; }
.nz-engr-sum-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px dashed #ece4cf; }
.nz-engr-sum-row:first-child { border-top: 0; }
.nz-engr-sum-name { min-width: 0; overflow-wrap: anywhere; }
.nz-engr-sum-name small { display: block; font-size: 12px; color: #6b7080; }
.nz-engr-sum-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.nz-engr-sum-total { border-top: 1px solid #e0cf9f; margin-top: 4px; padding-top: 8px; font-weight: 700; }
.nz-engr-err { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: #fdecea; color: #b3261e; font-size: 13.5px; }

/* ---------- Cart, checkout, order (summary frames) ---------- */
.nz-engr-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.nz-engr-frame { position: relative; border: 1px solid #e0cf9f; border-radius: 10px; padding: 18px 12px 8px; text-align: center; background: #fffdf8; min-width: 160px; }
.nz-engr-frame.nz-engr-silver { border-color: #c4c8cd; background: #fbfbfc; }
.nz-engr-tag { position: absolute; top: -9px; inset-inline-start: 10px; padding: 0 6px; background: #fff; font-size: 11px; color: #8a6a1f; line-height: 18px; border-radius: 4px; }
.nz-engr-silver .nz-engr-tag { color: #5f656d; }
.nz-engr-line { font-size: 14px; line-height: 1.5; color: #16294A; word-break: break-word; }
.nz-engr-note { font-size: 12px; color: #6b7080; margin-top: 4px; }
.nz-engr-units.nz-engr-bare { color: #6b7080; font-style: italic; }
.nz-engr-units { font-size: 12.5px; color: #4b5160; margin-top: 3px; text-align: center; }
.nz-engr-cost { font-size: 12.5px; color: #4b5160; margin-top: 6px; }
.nz-engr-order { margin-top: 8px; max-width: 360px; }
.nz-engr-order > strong { display: block; font-size: 12px; margin-block-end: 8px; }

/* ---------- Plate file: view / download buttons (product page, cart, side cart, order, admin) ---------- */
.nz-engr-files { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.nz-engr a.nz-engr-fbtn, .nz-engr button.nz-engr-fbtn, a.nz-engr-fbtn {
	all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 0;
	padding: 5px 12px; border: 1px solid #d9cfb5; border-radius: 999px; background: #fff;
	font-size: 12.5px; font-weight: 600; color: #16294A; line-height: 1.4; text-decoration: none; transition: background .15s, border-color .15s;
}
.nz-engr a.nz-engr-fbtn:hover, .nz-engr button.nz-engr-fbtn:hover, a.nz-engr-fbtn:hover, a.nz-engr-fbtn:focus-visible { background: #fff7e3; border-color: #C9A24A; color: #16294A; }
.nz-engr button.nz-engr-fbtn-del { color: #b3261e; }
.nz-engr-ico { display: inline-block; vertical-align: -3px; margin-inline-end: 5px; width: 15px; height: 15px; flex: none; background: currentColor; -webkit-mask: var(--nz-ico) center / contain no-repeat; mask: var(--nz-ico) center / contain no-repeat; }
.nz-engr-ico-eye { --nz-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C6.5 5 2.7 9.3 1.5 12c1.2 2.7 5 7 10.5 7s9.3-4.3 10.5-7C21.3 9.3 17.5 5 12 5zm0 11.5A4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 0 1 0 9zm0-2.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4z'/%3E%3C/svg%3E"); }
.nz-engr-ico-dl { --nz-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v9.6l3.3-3.3 1.4 1.4L12 16.4l-5.7-5.7 1.4-1.4 3.3 3.3V3zM4 18h16v3H4z'/%3E%3C/svg%3E"); }

/* Product page: uploaded file card */
.nz-engr-file-card { border: 1px solid #cfe3d4; background: #f4faf5; border-radius: 10px; padding: 10px 12px; }
.nz-engr-file-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: #1d7a3a; font-size: 13.5px; }
.nz-engr-file-info strong { overflow-wrap: anywhere; }
.nz-engr-file-info span { color: #4b5160; font-size: 12.5px; }
.nz-engr-file-card .nz-engr-files { justify-content: flex-start; }
.nz-engr-file-err { margin-top: 6px; color: #b3261e; font-weight: 600; font-size: 13px; }

/* Side cart (Woodmart mini cart): compact */
.widget_shopping_cart .nz-engr-frame, .cart-widget-side .nz-engr-frame { min-width: 0; padding: 14px 8px 6px; }
.widget_shopping_cart .nz-engr-line, .cart-widget-side .nz-engr-line { font-size: 12.5px; }
.widget_shopping_cart a.nz-engr-fbtn, .cart-widget-side a.nz-engr-fbtn { padding: 3px 9px; font-size: 11.5px; }

/* Admin: send to plate maker */
.nz-engr-send { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; }
.nz-engr-send select { min-width: 140px; }
.nz-engr-send-msg { font-size: 12px; font-weight: 600; }
.nz-engr-send-msg.is-ok { color: #1d7a3a; }
.nz-engr-send-msg.is-bad { color: #b3261e; }
.nz-engr-sent { display: block; margin-top: 4px; font-size: 11.5px; color: #1d7a3a; text-align: center; }
.nz-engr-so { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e0cf9f; }
.nz-engr-so > strong { display: block; font-size: 12.5px; color: #16294A; margin-block-end: 4px; }
.nz-engr-so-file { padding: 6px 0; }
.nz-engr-so-file + .nz-engr-so-file { border-top: 1px solid #f0ead9; }
.nz-engr-so-name { display: block; font-size: 12.5px; color: #4b5160; }
.nz-engr-so .nz-engr-files, .nz-engr-so .nz-engr-send { justify-content: flex-start; }

@media (max-width: 600px) {
	.nz-engr .nz-engr-input { padding-inline-end: 96px; }
	.nz-engr-count { font-size: 10.5px; }
	.nz-engr-qty { margin-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.nz-engr * { transition: none !important; scroll-behavior: auto !important; }
}
