/* PDP badge — same visual language as .drz-savings-badge */
.drezin-cutouts-pdp {
  --drezin-cutouts-accent: #2a8c4a;
  --drezin-cutouts-accent-light: #e8f5ec;
  --drezin-cutouts-border: #d4e8d9;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1.5px solid var(--drezin-cutouts-border);
  border-radius: 8px;
  padding: 10px 16px 10px 10px;
  margin: 12px 0 14px;
  max-width: 100%;
  box-shadow: 0 1px 4px rgba(42, 140, 74, 0.08);
  box-sizing: border-box;
}
.drezin-cutouts-pdp__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--drezin-cutouts-accent-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drezin-cutouts-pdp__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--drezin-cutouts-accent);
}
.drezin-cutouts-pdp__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-top: 1px;
}
.drezin-cutouts-pdp__title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--drezin-cutouts-accent);
  line-height: 1.25;
}
.drezin-cutouts-pdp__sub {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: #555;
  line-height: 1.4;
}
@media (max-width: 480px) {
  .drezin-cutouts-pdp {
    gap: 10px;
    padding: 8px 12px 8px 8px;
  }
  .drezin-cutouts-pdp__icon {
    width: 38px;
    height: 38px;
  }
  .drezin-cutouts-pdp__title {
    font-size: 0.92rem;
  }
}
/* Cart line — hole-prep status card */
.drezin-cutouts-cart {
  --drezin-cutouts-accent: #2a8c4a;
  --drezin-cutouts-accent-light: #e8f5ec;
  --drezin-cutouts-border: #d4e8d9;
  --drezin-cutouts-warn: #b45309;
  --drezin-cutouts-warn-light: #fff7ed;
  --drezin-cutouts-warn-border: #f5d0a9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border: 1.5px solid var(--drezin-cutouts-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(42, 140, 74, 0.08);
  box-sizing: border-box;
  max-width: 420px;
}
.drezin-cutouts-cart.is-empty {
  border-color: var(--drezin-cutouts-warn-border);
  background: var(--drezin-cutouts-warn-light);
  box-shadow: 0 1px 4px rgba(180, 83, 9, 0.08);
}
.drezin-cutouts-cart.is-selected {
  border-color: var(--drezin-cutouts-border);
  background: #fafffe;
}
.drezin-cutouts-cart__main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1 1 180px;
}
.drezin-cutouts-cart__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--drezin-cutouts-accent-light);
}
.drezin-cutouts-cart.is-empty .drezin-cutouts-cart__icon {
  background: #ffedd5;
}
.drezin-cutouts-cart__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--drezin-cutouts-accent);
}
.drezin-cutouts-cart.is-empty .drezin-cutouts-cart__icon svg {
  stroke: var(--drezin-cutouts-warn);
}
.drezin-cutouts-cart__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.drezin-cutouts-cart__status {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--drezin-cutouts-accent);
}
.drezin-cutouts-cart.is-empty .drezin-cutouts-cart__status {
  color: var(--drezin-cutouts-warn);
}
.drezin-cutouts-cart__labels {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
}
.drezin-cutouts-cart__hint,
.drezin-cutouts-cart__note {
  font-size: 0.75rem;
  color: #555;
  line-height: 1.35;
}
.drezin-cutouts-cart__btn {
  appearance: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 6px;
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.drezin-cutouts-cart.is-empty .drezin-cutouts-cart__btn {
  background: var(--drezin-cutouts-warn);
  color: #fff;
  box-shadow: 0 1px 2px rgba(180, 83, 9, 0.25);
}
.drezin-cutouts-cart.is-empty .drezin-cutouts-cart__btn:hover,
.drezin-cutouts-cart.is-empty .drezin-cutouts-cart__btn:focus {
  background: #92400e;
  color: #fff;
}
.drezin-cutouts-cart.is-selected .drezin-cutouts-cart__btn {
  background: var(--drezin-cutouts-accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(42, 140, 74, 0.25);
}
.drezin-cutouts-cart.is-selected .drezin-cutouts-cart__btn:hover,
.drezin-cutouts-cart.is-selected .drezin-cutouts-cart__btn:focus {
  background: #1f6b38;
  color: #fff;
}
.woocommerce-cart-form .drezin-cutouts-cart__btn.button {
  background: inherit;
}
/* Checkout order summary — per-line unconfirmed holes (notice chip) */
.woocommerce-checkout .drezin-cutouts-checkout-warn,
.woocommerce-checkout-review-order-table .product-name .drezin-cutouts-checkout-warn {
  display: flex !important;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.45rem 0 0.15rem;
  padding: 0.4rem 0.55rem;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: #7a4e00 !important;
  background: #fff6df !important;
  border: 1px solid #efd28a !important;
  border-left: 3px solid #e2a93a !important;
  border-radius: 4px;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.woocommerce-checkout .drezin-cutouts-checkout-warn__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: #e2a93a;
  color: #fff !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}
.woocommerce-checkout .drezin-cutouts-checkout-warn__text {
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  font: inherit;
}
.drezin-cutouts-pick { margin: 0.35rem 0 0; }
.drezin-cutouts-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.drezin-cutouts-modal {
  background: #fff;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 12px;
  padding: 1.25rem 1.35rem 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
}
.drezin-cutouts-modal h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  line-height: 1.3;
}
.drezin-cutouts-modal .description,
.drezin-cutouts-modal__qty {
  margin: 0 0 1rem;
  color: #555;
  font-size: 0.88rem;
  line-height: 1.4;
}
.drezin-cutouts-modal__body {
  min-height: 220px;
  flex: 1 1 auto;
  overflow: auto;
  padding-bottom: 0.25rem;
}
.drezin-cutouts-modal__error {
  padding: 1.5rem 0.5rem;
  color: #b32d2e;
  font-weight: 600;
  text-align: center;
}
.drezin-cutouts-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 220px;
  color: #555;
  font-size: 0.95rem;
}
.drezin-cutouts-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #d4e8d9;
  border-top-color: #2a8c4a;
  border-radius: 50%;
  animation: drezin-cutouts-spin 0.7s linear infinite;
}
@keyframes drezin-cutouts-spin {
  to { transform: rotate(360deg); }
}
/* Same Ľ/P segmented control as configurator — clipped track + cutouts green */
.drezin-cutouts-flip {
  --drezin-cutouts-accent: #2a8c4a;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}
.drezin-cutouts-flip__label {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: #4b5563;
  text-align: center;
}
.drezin-cutouts-flip__pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 0.15rem;
  width: min(100%, 12.5rem);
  padding: 0.2rem;
  border-radius: 999px;
  background: #ececec;
  border: 1px solid rgba(28, 28, 28, 0.08);
  box-sizing: border-box;
  overflow: hidden;
}
.drezin-cutouts-modal .drezin-cutouts-flip__pill,
.drezin-cutouts-flip__pill {
  --btn-bgcolor: transparent;
  --btn-bgcolor-hover: transparent;
  --btn-color: #6b7280;
  --btn-brd-color: transparent;
  --btn-brd-color-hover: transparent;
  --btn-box-shadow: none;
  --btn-box-shadow-hover: none;
  --btn-padding: 0.5rem 0.85rem;
  --btn-height: auto;
  --btn-font-weight: 700;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0 !important;
  padding: 0.5rem 0.85rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #6b7280 !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0.02em;
  text-transform: none !important;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.drezin-cutouts-modal .drezin-cutouts-flip__pill:hover:not(:disabled):not(.is-active),
.drezin-cutouts-modal .drezin-cutouts-flip__pill:focus-visible:not(.is-active),
.drezin-cutouts-flip__pill:hover:not(:disabled):not(.is-active),
.drezin-cutouts-flip__pill:focus-visible:not(.is-active) {
  background: transparent !important;
  color: #1c1c1c !important;
  outline: none;
}
.drezin-cutouts-modal .drezin-cutouts-flip__pill.is-active,
.drezin-cutouts-modal .drezin-cutouts-flip__pill[aria-pressed="true"],
.drezin-cutouts-flip__pill.is-active,
.drezin-cutouts-flip__pill[aria-pressed="true"] {
  background: var(--drezin-cutouts-accent, #2a8c4a) !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(42, 140, 74, 0.22) !important;
}
.drezin-cutouts-flip__pill:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.drezin-cutouts-flip.is-locked .drezin-cutouts-flip__pill:disabled.is-active,
.drezin-cutouts-flip.is-locked .drezin-cutouts-flip__pill:disabled[aria-pressed="true"] {
  opacity: 1;
}
.drezin-cutouts-svg-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  padding: 10px 8px 8px;
  box-sizing: border-box;
}
.drezin-cutouts-svg-wrap svg { width: 100%; height: auto; display: block; }
.drezin-cutouts-marker {
  cursor: pointer;
  outline: none;
}
/* Available: soft grey disc + solid ring (same silhouette as factory, empty slot) */
.drezin-cutouts-marker__halo {
  fill: none;
  stroke: none;
  pointer-events: all;
}
.drezin-cutouts-marker__ring {
  fill: none;
  stroke: #9aa3af;
  stroke-width: 0.28;
  stroke-dasharray: none;
  pointer-events: none;
}
.drezin-cutouts-marker__core {
  fill: #e8ebef;
  stroke: none;
  pointer-events: none;
}
.drezin-cutouts-marker__num {
  fill: #475569;
  font-weight: 800;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  pointer-events: none;
  user-select: none;
}
.drezin-cutouts-marker:hover .drezin-cutouts-marker__ring,
.drezin-cutouts-marker:focus-visible .drezin-cutouts-marker__ring {
  stroke: #64748b;
}
.drezin-cutouts-marker:hover .drezin-cutouts-marker__core,
.drezin-cutouts-marker:focus-visible .drezin-cutouts-marker__core {
  fill: #dce1e7;
}
/* Selected: green disc + white number */
.drezin-cutouts-marker.is-selected .drezin-cutouts-marker__halo {
  fill: none;
}
.drezin-cutouts-marker.is-selected .drezin-cutouts-marker__ring {
  stroke: #1f6b38;
  stroke-width: 0.28;
  stroke-dasharray: none;
}
.drezin-cutouts-marker.is-selected .drezin-cutouts-marker__core {
  fill: #2a8c4a;
  stroke: none;
}
.drezin-cutouts-marker.is-selected:hover .drezin-cutouts-marker__ring,
.drezin-cutouts-marker.is-selected:focus-visible .drezin-cutouts-marker__ring {
  stroke: #14532d;
}
.drezin-cutouts-marker.is-selected:hover .drezin-cutouts-marker__core,
.drezin-cutouts-marker.is-selected:focus-visible .drezin-cutouts-marker__core {
  fill: #248043;
}
.drezin-cutouts-marker.is-selected .drezin-cutouts-marker__num {
  fill: #fff;
}
/* Factory: muted green disc, always on */
.drezin-cutouts-marker.is-factory {
  cursor: default;
  pointer-events: none;
}
.drezin-cutouts-marker.is-factory .drezin-cutouts-marker__halo {
  fill: none;
}
.drezin-cutouts-marker.is-factory .drezin-cutouts-marker__ring {
  stroke: #86b894;
  stroke-width: 0.28;
  stroke-dasharray: none;
}
.drezin-cutouts-marker.is-factory .drezin-cutouts-marker__core {
  fill: #a8d0b4;
  stroke: none;
}
.drezin-cutouts-marker__tip-bg {
  fill: #fff;
  stroke: #d1d5db;
  stroke-width: 0.12;
  filter: drop-shadow(0 0.12px 0.3px rgba(0, 0, 0, 0.16));
}
.drezin-cutouts-marker__tip {
  fill: #111827;
  font-weight: 600;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  pointer-events: none;
  user-select: none;
}

.drezin-cutouts-legend {
  margin-top: 0.85rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}
.drezin-cutouts-legend__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.2rem;
}
.drezin-cutouts-legend__hint {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.35;
}
.drezin-cutouts-legend__section-title {
  margin: 0.65rem 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b7280;
}
.drezin-cutouts-legend__section-title:first-of-type {
  margin-top: 0.15rem;
}
.drezin-cutouts-legend__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.drezin-cutouts-legend__list--factory {
  margin-bottom: 0.15rem;
}
.drezin-cutouts-legend__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.drezin-cutouts-legend__item:hover,
.drezin-cutouts-legend__item:focus {
  border-color: #94a3b8;
  background: #f8fafc;
  outline: none;
}
.drezin-cutouts-legend__item.is-selected {
  border-color: #2a8c4a;
  background: #e8f5ec;
  box-shadow: inset 0 0 0 1px rgba(42, 140, 74, 0.25);
}
.drezin-cutouts-legend__swatch {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  box-sizing: border-box;
  background: #e8ebef;
  border: 2px solid #9aa3af;
}
.drezin-cutouts-legend__item.is-selected .drezin-cutouts-legend__swatch {
  background: #2a8c4a;
  border: 2px solid #1f6b38;
  box-shadow: none;
  position: relative;
}
.drezin-cutouts-legend__item.is-selected .drezin-cutouts-legend__swatch::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.28rem;
  height: 0.5rem;
  margin: 0;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  box-sizing: border-box;
  /* Optical nudge: rotated L-check sits slightly high/left without the Y offset. */
  transform: translate(-50%, -58%) rotate(45deg);
}
.drezin-cutouts-legend__meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.drezin-cutouts-legend__label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
}
.drezin-cutouts-legend__state {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.3;
}
.drezin-cutouts-legend__item.is-selected .drezin-cutouts-legend__state {
  color: #1f6b38;
  font-weight: 600;
}
.drezin-cutouts-legend__item.is-factory {
  cursor: default;
  border-color: #2a8c4a;
  background: #e8f5ec;
  opacity: 0.95;
}
.drezin-cutouts-legend__item.is-factory:hover,
.drezin-cutouts-legend__item.is-factory:focus {
  border-color: #2a8c4a;
  background: #e8f5ec;
}
.drezin-cutouts-legend__item.is-factory .drezin-cutouts-legend__swatch {
  background: #a8d0b4;
  border: 2px solid #86b894;
  box-shadow: none;
}
.drezin-cutouts-legend__item.is-factory .drezin-cutouts-legend__swatch::after {
  content: none;
}
.drezin-cutouts-legend__item.is-factory .drezin-cutouts-legend__state {
  color: #1f6b38;
  font-weight: 600;
}
.drezin-cutouts-legend__summary {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #d1d5db;
  font-size: 0.84rem;
  font-weight: 700;
  color: #2a8c4a;
}
.drezin-cutouts-legend__summary.is-empty {
  color: #9a3412;
  font-weight: 600;
}

/* Footer: secondary left, primary right (modal UX standard) */
.drezin-cutouts-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex: 0 0 auto;
  margin: 0.85rem -1.35rem 0;
  padding: 0.95rem 1.35rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 12px 12px;
}
.drezin-cutouts-actions__secondary,
.drezin-cutouts-actions__primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.drezin-cutouts-actions__primary {
  margin-left: auto;
}
.drezin-cutouts-btn {
  appearance: none;
  border: 1.5px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.65rem 1.05rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.drezin-cutouts-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.drezin-cutouts-btn--primary {
  background: #2a8c4a;
  border-color: #2a8c4a;
  color: #fff;
  min-width: 7.5rem;
  box-shadow: 0 1px 2px rgba(42, 140, 74, 0.25);
}
.drezin-cutouts-btn--primary:hover,
.drezin-cutouts-btn--primary:focus {
  background: #1f6b38;
  border-color: #1f6b38;
  color: #fff;
}
.drezin-cutouts-btn--primary.is-busy {
  opacity: 0.9;
  cursor: wait;
}
/* Keep Save green even if theme overrides .button */
.drezin-cutouts-modal .drezin-cutouts-btn--primary,
.drezin-cutouts-modal .drezin-cutouts-save {
  background: #2a8c4a !important;
  border-color: #2a8c4a !important;
  color: #fff !important;
}
.drezin-cutouts-modal .drezin-cutouts-btn--primary:hover,
.drezin-cutouts-modal .drezin-cutouts-btn--primary:focus,
.drezin-cutouts-modal .drezin-cutouts-save:hover,
.drezin-cutouts-modal .drezin-cutouts-save:focus {
  background: #1f6b38 !important;
  border-color: #1f6b38 !important;
  color: #fff !important;
}
.drezin-cutouts-btn--secondary {
  background: #fff;
  border-color: #d1d5db;
  color: #374151;
}
.drezin-cutouts-btn--secondary:hover,
.drezin-cutouts-btn--secondary:focus {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
}
.drezin-cutouts-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: #4b5563;
  font-weight: 600;
  box-shadow: none;
}
.drezin-cutouts-btn--ghost:hover,
.drezin-cutouts-btn--ghost:focus {
  background: #eef2f7;
  color: #111827;
}
@media (max-width: 560px) {
  .drezin-cutouts-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .drezin-cutouts-actions__secondary,
  .drezin-cutouts-actions__primary {
    width: 100%;
  }
  .drezin-cutouts-actions__primary {
    margin-left: 0;
    justify-content: stretch;
  }
  .drezin-cutouts-actions__primary .drezin-cutouts-btn--primary {
    flex: 1 1 auto;
  }
  .drezin-cutouts-actions__primary .drezin-cutouts-btn--ghost {
    flex: 0 0 auto;
  }
}
.drezin-cutouts-noreturn label { font-weight: 600; }
