/* artfab v0 - quote modal */
.artfab-content { border: 1px solid rgba(0,0,0,.2); border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,.35); }
#artfab-modal .modal-header { border-bottom: 1px solid #e3e6ea; background: #fbfbfc;
  border-radius: 12px 12px 0 0; }
.artfab-grid { display: grid; grid-template-columns: 1fr 380px; min-height: 70vh; }
.artfab-controls { border-left: 1px solid #e3e6ea; }
.artfab-tiles-infill { align-items: stretch; }
.artfab-infill-custom { display: inline-flex; align-items: center; gap: 4px; }
.artfab-infill-custom input { width: 84px; min-height: 44px; border-radius: 10px; }
.artfab-tile-colour { min-width: 72px; }
.artfab-viewer-wrap { position: relative; background: #f4f5f7; min-height: 320px; }
#artfab-viewer { position: absolute; inset: 0; }
.artfab-drop { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  border: 2px dashed #c6cbd4; margin: 14px; border-radius: 12px; background: rgba(255,255,255,.75);
  cursor: pointer; z-index: 2; text-align: center; transition: border-color .15s, background .15s; }
.artfab-drop.dragover { border-color: #0d6efd; background: rgba(230,240,255,.9); }
.artfab-drop.hidden { display: none; }
.artfab-drop-icon { font-size: 44px; line-height: 1; margin-bottom: 6px; }
.artfab-viewer-note { position: absolute; left: 12px; bottom: 8px; z-index: 3; }
.artfab-controls { overflow-y: auto; max-height: calc(100vh - 120px); }
.artfab-label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: .9rem; }
.artfab-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.artfab-tile { flex: 1 1 auto; min-width: 90px; min-height: 44px; padding: 8px 10px; border-radius: 10px;
  border: 1.5px solid #d4d8df; background: #fff; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; font-size: .9rem; }
.artfab-tile.active { border-color: #0d6efd; background: #eef5ff; box-shadow: 0 0 0 1px #0d6efd inset; }
.artfab-qty { max-width: 120px; min-height: 44px; }
.artfab-price { font-size: 1.9rem; font-weight: 700; }
#artfab-price-badge { background: #6c757d; }
#artfab-price-badge.exact { background: #198754; }
.artfab-breakdown { list-style: none; padding: 0; margin: 6px 0 0; }
.artfab-fileline { background: #f1f3f5; border-radius: 8px; padding: 6px 10px; display: flex; align-items: center; }
#artfab-filename { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 991px) {
  .artfab-grid { grid-template-columns: 1fr; min-height: 0; }
  .artfab-viewer-wrap { height: 42vh; min-height: 260px; }
  .artfab-controls { max-height: none; }
}
.artfab-breakdown li { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0; }
.artfab-breakdown .artfab-bd-total { border-top: 1px solid #d9dde2; margin-top: 4px; padding-top: 4px;
  font-weight: 600; color: #212529; }
.artfab-breakdown .artfab-bd-neg { color: #198754; }
.artfab-breakdown .artfab-bd-meta { color: #868e96; }
.artfab-spin { display: inline-block; width: 16px; height: 16px; margin-right: 8px;
  border: 2px solid #b9c2ce; border-top-color: #0d6efd; border-radius: 50%;
  vertical-align: -3px; animation: artfab-rot .7s linear infinite; }
@keyframes artfab-rot { to { transform: rotate(360deg); } }
#artfab-price-box.calculating .artfab-price,
#artfab-price-box.calculating .artfab-breakdown { opacity: .35; transition: opacity .15s; }
.artfab-dims { position: absolute; right: 12px; bottom: 10px; z-index: 3;
  background: rgba(33,37,41,.78); color: #fff; font-size: .85rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .02em; pointer-events: none; }
.artfab-price-old { text-decoration: line-through; color: #98a1ab; font-size: 1.25rem; font-weight: 600; }
#artfab-price-box { position: relative; }
.artfab-loading { display: none; position: absolute; inset: -4px; z-index: 3; border-radius: 10px;
  background: rgba(248,249,250,.65); align-items: center; justify-content: center; }
#artfab-price-box.calculating .artfab-loading { display: flex; }
.artfab-spin-big { width: 46px; height: 46px; border: 4px solid #c8d1dc; border-top-color: #0d6efd;
  border-radius: 50%; animation: artfab-rot .8s linear infinite; }
.artfab-price-old { display: block; }
.artfab-ready { margin-top: 8px; color: #2a2f36; }
.artfab-breakdown li span:first-child { flex: 1 1 auto; }
.artfab-breakdown li span:last-child { flex: 0 1 auto; margin-left: auto; text-align: right; }
.artfab-build-new { margin-bottom: 10px; }
.artfab-build-new .btn { min-height: 44px; }
/* the native customization field is INTERNAL (filled automatically with the design
   reference at attach) - never shown to customers on fab-bound product pages */
.product__customization.js-product-customization { display: none !important; }
.artfab-scale-wrap { display: inline-flex; align-items: center; gap: 6px; }
.artfab-scale-wrap { flex-wrap: wrap; }
.artfab-scale-wrap .form-control { width: 84px; min-height: 44px; }
.artfab-scale-wrap .artfab-dim { width: 76px; }
.artfab-breakdown .artfab-bd-sub { border-top: 1px dashed #d9dde2; margin-top: 4px; padding-top: 4px; font-weight: 600; }
.artfab-lock { opacity: .6; cursor: help; }
/* don't chain scrolling to the page when the modal's scroll hits its end */
.artfab-controls, #artfab-modal .modal-body, #artfab-modal { overscroll-behavior: contain; }
.artfab-dims-row { display: flex; align-items: center; gap: 8px; }
.artfab-dims-row .artfab-dim { flex: 1 1 0; width: auto; min-width: 0; min-height: 44px; text-align: center; }
/* fileline: name takes all space (ellipsized), buttons pinned right */
.artfab-fileline { gap: 8px; }
#artfab-filename { flex: 1 1 0; min-width: 0; }
#artfab-refile, #artfab-clearfile { flex: 0 0 auto; white-space: nowrap; }
/* rights + ToS consent must be unmissable */
#artfab-tos-wrap { background: #fff8e6; border: 1px solid #f0d48a; border-radius: 8px;
  padding: 10px 12px 10px 36px; }
#artfab-tos-wrap .form-check-label { color: #212529; font-size: .95rem; font-weight: 500; }
#artfab-tos-wrap .form-check-input { width: 1.15em; height: 1.15em; border-color: #b58900; }
#artfab-tos-wrap .form-check-label a { font-weight: 600; }
.artfab-label { color: #212529; }
label[for="artfab-message"] { color: #212529; font-weight: 600; }
/* the customization form is INTERNAL on fab pages - hide EVERY renderer of it:
   theme partial AND the wkcustomizationtocart module block (§10.496 - a BO
   product save resets product.customizable, so CSS must hold regardless) */
.wk-product-customization, .wk-js-product-customization,
section.product-customization, .product__customization { display: none !important; }
/* Вашите дизайни - saved design rows on the product page (pens model) */
.artfab-designs { margin-top: 14px; }
.artfab-designs-title { font-weight: 700; margin-bottom: 8px; color: #212529; }
.artfab-design-row { display: flex; align-items: center; gap: 12px; padding: 10px;
  border: 1px solid #e3e6ea; border-radius: 10px; margin-bottom: 8px; background: #fff; }
.artfab-design-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px;
  border: 1px solid #dee2e6; flex: 0 0 auto; }
.artfab-design-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.artfab-design-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artfab-design-info span { font-size: .85rem; color: #6c757d; }
.artfab-design-price { font-weight: 700; color: #212529 !important; font-size: .95rem !important; }
.artfab-design-btns { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
@media (max-width: 576px) {
  .artfab-design-row { flex-wrap: wrap; }
  .artfab-design-btns { flex-direction: row; width: 100%; }
  .artfab-design-btns .btn { flex: 1 1 0; }
}
/* slot combinations are INTERNAL plumbing - never show the variant picker */
.product__variants, .js-product-variants, .product-variants { display: none !important; }
.artfab-qty-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.artfab-qty-row .artfab-label { margin: 0; }
.artfab-qty-row .artfab-qty { max-width: 110px; }
.artfab-qty-row .btn { min-height: 44px; min-width: 48px; }

/* (i) tooltip on the quality label */
.artfab-info { display: inline-flex; width: 17px; height: 17px; margin-left: 6px;
  border-radius: 50%; background: #6c757d; cursor: help; position: relative;
  vertical-align: middle; user-select: none; font-size: 0; }
/* the "i" is DRAWN (dot + stem), pixel-centered - font glyphs never center right */
.artfab-info::before { content: ''; position: absolute; left: 50%; top: 3.2px;
  width: 2.6px; height: 2.6px; margin-left: -1.3px; border-radius: 50%; background: #fff; }
.artfab-info::after { content: ''; position: absolute; left: 50%; bottom: 3.2px;
  width: 2.6px; height: 6px; margin-left: -1.3px; border-radius: 1.3px; background: #fff; }
/* tooltip body is FIXED-positioned by JS: the controls column scrolls (overflow)
   and CLIPS absolute children - no z-index can escape that */
.artfab-info .artfab-tip { display: none; position: fixed; width: 290px; max-width: 86vw;
  z-index: 2000; background: #212529; color: #f1f3f5; font-style: normal; font-weight: 400;
  font-size: .8rem; line-height: 1.45; padding: 10px 12px; border-radius: 10px;
  box-shadow: 0 6px 22px rgba(0,0,0,.25); text-align: left; cursor: auto; }

/* filename loading circle while the new file uploads/processes */
.artfab-fileloading #artfab-filename { opacity: .6; }
.artfab-fileloading::before { content: ''; display: inline-block; width: 15px; height: 15px;
  margin-right: 7px; border: 2.5px solid #c8d1dc; border-top-color: #0d6efd;
  border-radius: 50%; vertical-align: -3px;
  animation: artfabfspin .8s linear infinite; }
@keyframes artfabfspin { to { transform: rotate(360deg); } }

/* multicolour mapping rows */
.artfab-cm-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.artfab-cm-swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid #c8d1dc; flex: 0 0 auto; }
.artfab-cm-row select { flex: 1 1 auto; min-height: 34px; border: 1px solid #d4d8df; border-radius: 8px; padding: 2px 8px; }
.artfab-cm-arrow { color: #868e96; }

/* viewport wait overlay: spinner + honest elapsed timer while the slicer works */
.artfab-viewer-wait { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; z-index: 6;
  background: rgba(248,249,250,.82); backdrop-filter: blur(2px); text-align: center; padding: 16px; }
.artfab-vw-spin { width: 44px; height: 44px; border: 4px solid #c8d1dc; border-top-color: #0d6efd;
  border-radius: 50%; animation: artfabfspin .8s linear infinite; }
.artfab-vw-text { font-size: .9rem; color: #495057; max-width: 420px; }
.artfab-vw-timer { font-size: .85rem; font-weight: 600; color: #0d6efd; font-variant-numeric: tabular-nums; }

/* quality dropdown */
.artfab-quality-select { min-height: 42px; border-radius: 10px; }
