/**
 * NDC Creations UK — Live Laser Engraving & Artwork Studio Styling (WordPress / WooCommerce)
 * v1.4.0: matches the new product page design (website/product-theme/ndc-product-pages.css).
 * Colours: wine #74332F, body #7C3834, coral #B44A45, rose buttons #D59789 with #5E2420 text,
 * peach pills #FAE0D8 / #8C2D2A, blush borders #E0B2A2 / #F2C9BD, cream #FEF2EC, page #FEF8F4.
 * Fonts: Playfair Display (headings), Outfit (labels, buttons), Public Sans (body text).
 */

#ndc-live-engraver-root {
  --ndc-wine: #74332F;
  --ndc-body: #7C3834;
  --ndc-coral: #B44A45;
  --ndc-rose: #D59789;
  --ndc-rose-text: #5E2420;
  --ndc-peach: #FAE0D8;
  --ndc-peach-text: #8C2D2A;
  --ndc-blush: #E0B2A2;
  --ndc-blush-soft: #F2C9BD;
  --ndc-line: #F2DDD5;
  --ndc-cream: #FEF2EC;
  --ndc-page: #FEF8F4;
  --ndc-taupe: #8C5F55;
  --ndc-burn: #160B04;
}

/* ==========================================================================
   1. MAIN ROOT CONTAINER (Compact, Low-Profile, Expandable Card)
   ========================================================================== */
#ndc-live-engraver-root.ndc-engraver-card {
  clear: both; /* the theme floats the variation stock line */
  background: var(--ndc-cream);
  border: 1px solid var(--ndc-blush-soft);
  border-radius: 1.25rem;
  padding: 16px 20px;
  margin: 20px 0;
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ndc-body);
  box-shadow: 0 6px 24px rgba(116, 51, 47, 0.06);
  box-sizing: border-box;
  transition: padding 0.25s ease, box-shadow 0.25s ease;
}

#ndc-live-engraver-root.ndc-engraver-card:not(.ndc-is-collapsed) {
  padding: 22px;
  box-shadow: 0 10px 30px rgba(116, 51, 47, 0.12);
}

#ndc-live-engraver-root.ndc-engraver-card * {
  box-sizing: border-box;
}

#ndc-live-engraver-root button {
  font-family: 'Outfit', sans-serif;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.2;
}

#ndc-live-engraver-root button:focus-visible,
#ndc-live-engraver-root .ndc-compact-trigger:focus-visible {
  outline: 2px solid var(--ndc-coral);
  outline-offset: 2px;
}

/* ==========================================================================
   2. COMPACT COLLAPSIBLE TRIGGER BAR (Zero White Space When Closed)
   ========================================================================== */
.ndc-compact-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.ndc-trigger-left {
  flex: 1;
  min-width: 0;
}

.ndc-trigger-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

/* Named ndc-engrave-badge, not ndc-badge: the website chat widget styles every .ndc-badge as a red dot. */
.ndc-engrave-badge,
.ndc-badge-sub {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 6px 11px;
  border-radius: 999px;
}

.ndc-engrave-badge {
  background: var(--ndc-peach);
  border: 1px solid var(--ndc-blush-soft);
  color: var(--ndc-peach-text);
}

.ndc-badge-sub {
  background: #FFFFFF;
  border: 1px solid var(--ndc-line);
  color: var(--ndc-taupe);
}

.ndc-trigger-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ndc-wine) !important;
  margin: 0 0 4px;
  line-height: 1.25;
}

.ndc-trigger-desc {
  font-size: 0.875rem;
  color: var(--ndc-body);
  margin: 0;
  line-height: 1.5;
}

/* Live Summary Pill (Shows in collapsed trigger bar when text is entered) */
.ndc-live-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--ndc-blush);
  color: var(--ndc-wine);
  padding: 5px 12px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 500;
  margin-top: 10px;
  max-width: 100%;
}

.ndc-summary-check {
  color: var(--ndc-coral);
  font-weight: 700;
}

.ndc-summary-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ndc-trigger-right {
  flex-shrink: 0;
}

/* Main button: the same rose pill as "Add to basket" */
#ndc-live-engraver-root .ndc-trigger-action-btn {
  background: var(--ndc-rose);
  color: var(--ndc-rose-text);
  border: 0;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
  white-space: nowrap;
}

#ndc-live-engraver-root .ndc-trigger-action-btn:hover {
  background: var(--ndc-coral);
  color: var(--ndc-page);
}

.ndc-btn-arrow {
  font-size: 11px;
}

/* ==========================================================================
   3. EXPANDABLE CUSTOMIZATION DRAWER
   ========================================================================== */
.ndc-expanded-drawer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--ndc-blush);
  animation: ndcSlideDown 0.25s ease forwards;
}

@keyframes ndcSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ndc-expanded-drawer { animation: none; }
}

/* ==========================================================================
   4. IN-BOX VISUAL PREVIEW STAGE
   ========================================================================== */
.ndc-stage-box {
  background: #FFFFFF;
  border: 1px solid var(--ndc-line);
  border-radius: 1rem;
  padding: 14px;
  margin-bottom: 20px;
}

.ndc-stage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ndc-stage-thumbs-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  max-width: 100%;
}

#ndc-live-engraver-root .ndc-stage-thumb-btn {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--ndc-line);
  padding: 2px;
  background: var(--ndc-page);
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
}

#ndc-live-engraver-root .ndc-stage-thumb-btn:hover {
  border-color: var(--ndc-blush);
}

#ndc-live-engraver-root .ndc-stage-thumb-btn.is-active {
  border-color: var(--ndc-wine);
  box-shadow: 0 0 0 2px var(--ndc-peach);
}

.ndc-stage-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
  display: block;
}

.ndc-stage-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#ndc-live-engraver-root .ndc-btn-ai-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--ndc-blush-soft);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

#ndc-live-engraver-root .ndc-btn-ai-pill.is-active {
  background: var(--ndc-peach);
  color: var(--ndc-peach-text);
}

#ndc-live-engraver-root .ndc-btn-ai-pill.is-inactive {
  background: #FFFFFF;
  color: var(--ndc-taupe);
}

.ndc-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--ndc-coral);
  display: inline-block;
}

.ndc-btn-ai-pill.is-inactive .ndc-dot-pulse {
  background: var(--ndc-blush);
}

.ndc-stage-ai-notice {
  background: var(--ndc-page);
  border-left: 3px solid var(--ndc-rose);
  border-radius: 0 10px 10px 0;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--ndc-body);
}

.ndc-stage-ai-notice code {
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--ndc-wine);
  font-weight: 600;
}

/* 1:1 In-Box Preview Canvas Stage */
.ndc-stage-canvas-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  background: var(--ndc-page);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ndc-line);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none; /* dragging text on a phone must not scroll the page */
}

#ndc-stage-main-img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  display: block;
  pointer-events: none;
  margin: 0;
}

/* Sample text cover */
.ndc-stage-clean-patch {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

/* Text Zones Layer */
.ndc-stage-zones-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

/* Laser burn engraving text on the stage (the burn colour stays dark brown on purpose) */
.ndc-stage-zone-item {
  position: absolute;
  transform: translate(-50%, -50%);
  color: var(--ndc-burn) !important;
  font-weight: 700 !important;
  text-shadow:
    0px 1px 1px rgba(255, 255, 255, 0.6),
    0px -1px 1px rgba(0, 0, 0, 0.85),
    0px 0px 2px rgba(15, 8, 3, 0.45);
  filter: contrast(1.3) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
  white-space: nowrap;
  text-align: center;
  pointer-events: auto;
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 12;
  line-height: 1;
  touch-action: none;
}

.ndc-stage-zone-item.is-placeholder {
  opacity: 0.6;
  font-style: italic;
  /* No fixed font size here: the placeholder must grow and shrink with the corner dots too. */
  font-family: 'Outfit', sans-serif !important;
  font-weight: 500 !important;
  color: var(--ndc-taupe) !important;
  text-shadow: none;
  filter: none;
}

.ndc-stage-zone-item.is-selected {
  outline: 2px dashed var(--ndc-coral);
  outline-offset: 4px;
  background: rgba(250, 224, 216, 0.35);
}

/* Curved text SVG wrapper inside zone item */
.ndc-curved-text-svg {
  display: block;
  overflow: visible;
  pointer-events: none;
}

/* Uploaded Stencil Artwork on Stage */
.ndc-stage-artwork-wrapper {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: move;
  z-index: 8;
  border-radius: 4px;
  touch-action: none;
}

.ndc-stage-artwork-wrapper canvas {
  display: block;
}

.ndc-stage-artwork-wrapper.is-selected {
  outline: 2px dashed var(--ndc-coral);
  outline-offset: 4px;
}

/* Hint under the photo (it used to sit on the photo and cover the text) */
.ndc-stage-bottom-hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ndc-taupe);
}

/* Interactive Corner Resize Handles */
.ndc-resize-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #FFFFFF;
  border: 2px solid var(--ndc-wine);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  z-index: 25;
  touch-action: none;
}

/* Bigger invisible grab area, so the dots are easy to catch with a mouse or a finger */
.ndc-resize-handle::after,
.ndc-rotate-handle::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 999px;
}

.ndc-resize-handle-nw { top: -12px; left: -12px; cursor: nwse-resize; }
.ndc-resize-handle-ne { top: -12px; right: -12px; cursor: nesw-resize; }
.ndc-resize-handle-se { bottom: -12px; right: -12px; cursor: nwse-resize; }
.ndc-resize-handle-sw { bottom: -12px; left: -12px; cursor: nesw-resize; }

/* Rotate handle: a round arrow on a short stem above the text */
.ndc-rotate-handle {
  position: absolute;
  top: -46px;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ndc-wine);
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  font-family: Arial, sans-serif;
  font-size: 15px !important;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  text-shadow: none;
  cursor: grab;
  z-index: 26;
  touch-action: none;
}

.ndc-rotate-handle::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: 16px;
  margin-left: -1px;
  background: var(--ndc-coral);
}

/* Floating Quick Size Mini-Toolbar below active text */
.ndc-mini-size-toolbar {
  position: absolute;
  bottom: -60px; /* clear of the corner dots so they can still be grabbed */
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ndc-wine);
  color: var(--ndc-page);
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(116, 51, 47, 0.3);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  font-style: normal;
  white-space: nowrap;
  z-index: 30;
  user-select: none;
  pointer-events: auto;
  filter: none;
  text-shadow: none;
}

#ndc-live-engraver-root .ndc-mini-btn {
  width: 20px;
  height: 20px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--ndc-page);
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
}

#ndc-live-engraver-root .ndc-mini-btn:hover {
  background: var(--ndc-rose);
  color: var(--ndc-rose-text);
}

/* ==========================================================================
   5. CONTROLS: ZONE TABS, INPUTS & SLIDERS
   ========================================================================== */
.ndc-zone-tabs-wrapper {
  margin-bottom: 16px;
}

/* One engraving area: no tabs needed */
.ndc-zone-tabs-wrapper.ndc-single-zone {
  display: none;
}

.ndc-zone-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

#ndc-live-engraver-root .ndc-zone-tab {
  background: #FFFFFF;
  color: var(--ndc-body);
  border: 1px solid var(--ndc-blush);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

#ndc-live-engraver-root .ndc-zone-tab:hover {
  border-color: var(--ndc-coral);
}

#ndc-live-engraver-root .ndc-zone-tab.is-active {
  background: var(--ndc-wine);
  border-color: var(--ndc-wine);
  color: var(--ndc-page);
}

.ndc-tab-status {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.85;
}

.ndc-tab-status.is-done {
  opacity: 1;
}

/* Zone Panels */
.ndc-zone-panel {
  display: none;
  background: #FFFFFF;
  border: 1px solid var(--ndc-line);
  border-radius: 1rem;
  padding: 18px;
  margin-bottom: 18px;
}

.ndc-zone-panel.is-active {
  display: block;
}

.ndc-zone-input-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ndc-zone-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ndc-wine);
  margin: 0;
}

.ndc-required {
  color: var(--ndc-coral);
}

.ndc-char-count {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  color: var(--ndc-taupe);
  white-space: nowrap;
}

.ndc-char-count.is-full {
  color: var(--ndc-coral);
  font-weight: 600;
}

.ndc-input-wrap {
  margin-bottom: 14px;
}

#ndc-live-engraver-root .ndc-live-text-input {
  width: 100%;
  margin: 0;
  padding: 12px 15px !important;
  border-radius: 12px !important;
  border: 1px solid var(--ndc-blush) !important;
  background: #FFFFFF !important;
  color: var(--ndc-wine) !important;
  font-size: 16px !important; /* 16px stops iPhones zooming in */
  font-family: 'Public Sans', sans-serif !important;
  height: auto;
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#ndc-live-engraver-root .ndc-live-text-input::placeholder {
  color: var(--ndc-taupe);
  opacity: 0.75;
}

#ndc-live-engraver-root .ndc-live-text-input:focus {
  border-color: var(--ndc-coral) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px var(--ndc-peach) !important;
}

/* Sliders Fine-Tuning Grid */
.ndc-zone-sliders-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ndc-line);
}

.ndc-slider-control {
  background: var(--ndc-page);
  border: 1px solid var(--ndc-line);
  border-radius: 12px;
  padding: 10px 12px;
}

.ndc-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ndc-control-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ndc-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ndc-quick-size-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

#ndc-live-engraver-root .ndc-mini-step-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  background: var(--ndc-rose);
  color: var(--ndc-rose-text);
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

#ndc-live-engraver-root .ndc-mini-step-btn:hover {
  background: var(--ndc-coral);
  color: var(--ndc-page);
}

.ndc-slider-val {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ndc-wine);
}

#ndc-live-engraver-root .ndc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  padding: 0;
  border: 0;
  background: var(--ndc-blush-soft);
  border-radius: 999px;
  outline: none;
  margin: 8px 0 4px;
}

#ndc-live-engraver-root .ndc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--ndc-wine);
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 1px var(--ndc-blush);
  cursor: pointer;
}

#ndc-live-engraver-root .ndc-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--ndc-wine);
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 1px var(--ndc-blush);
  cursor: pointer;
}

/* ==========================================================================
   6. FONT PICKER GRID (Synced with WooCommerce Variation Selects)
   ========================================================================== */
.ndc-font-picker-section {
  margin-top: 18px;
  margin-bottom: 20px;
}

.ndc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ndc-font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

#ndc-live-engraver-root .ndc-font-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
  background: #FFFFFF;
  color: var(--ndc-wine);
  border: 1px solid var(--ndc-line);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease;
  min-height: 66px;
}

#ndc-live-engraver-root .ndc-font-card:hover {
  border-color: var(--ndc-blush);
}

#ndc-live-engraver-root .ndc-font-card.is-active {
  background: var(--ndc-peach);
  border-color: var(--ndc-coral);
  box-shadow: 0 0 0 1px var(--ndc-coral);
}

.ndc-font-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 4px;
}

.ndc-font-meta {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ndc-taupe);
}

.ndc-font-card.is-active .ndc-font-meta {
  color: var(--ndc-peach-text);
}

.ndc-font-check {
  color: var(--ndc-coral);
  font-weight: 700;
  font-size: 12px;
  display: none;
}

.ndc-font-card.is-active .ndc-font-check {
  display: inline;
}

.ndc-font-sample {
  font-size: 18px;
  line-height: 1.25;
  color: var(--ndc-burn);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ==========================================================================
   7. CUSTOM ARTWORK / LOGO UPLOAD
   ========================================================================== */
.ndc-artwork-upload-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--ndc-blush);
}

#ndc-live-engraver-root .ndc-clear-art-btn {
  background: #FFFFFF;
  color: var(--ndc-coral);
  border: 1px solid var(--ndc-blush);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.ndc-upload-box {
  position: relative;
  background: var(--ndc-page);
  border: 1.5px dashed var(--ndc-blush);
  border-radius: 1rem;
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.ndc-upload-box:hover {
  background: #FFFFFF;
  border-color: var(--ndc-coral);
}

.ndc-upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.ndc-upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.ndc-upload-main-text {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ndc-wine);
}

.ndc-upload-hint {
  font-size: 0.8rem;
  color: var(--ndc-taupe);
}

.ndc-upload-error {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--ndc-coral);
  font-weight: 600;
}

.ndc-artwork-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

/* ==========================================================================
   8. DRAWER FOOTER ("SAVE MY DESIGN" BUTTON)
   ========================================================================== */
.ndc-drawer-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--ndc-line);
  display: flex;
  justify-content: flex-end;
}

#ndc-live-engraver-root .ndc-done-btn {
  background: var(--ndc-wine);
  color: var(--ndc-page);
  border: none;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease;
}

#ndc-live-engraver-root .ndc-done-btn:hover {
  background: var(--ndc-coral);
}

.ndc-hidden {
  display: none !important;
}

/* Font 1–11 dropdown rows stay in the form for WooCommerce but out of sight */
.ndc-visually-hidden-row {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* WooCommerce "Clear" link, moved out of the hidden font row */
.ndc-moved-reset {
  display: inline-block;
  margin: 4px 0 8px;
  font-size: 0.85rem;
  color: var(--ndc-coral, #B44A45);
}

/* Dragging state */
body.ndc-is-dragging,
body.ndc-is-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

/* ==========================================================================
   9. PHONES
   ========================================================================== */
@media (max-width: 600px) {
  #ndc-live-engraver-root.ndc-engraver-card,
  #ndc-live-engraver-root.ndc-engraver-card:not(.ndc-is-collapsed) {
    padding: 16px;
  }

  .ndc-compact-trigger {
    flex-direction: column;
    align-items: stretch;
  }

  #ndc-live-engraver-root .ndc-trigger-action-btn,
  #ndc-live-engraver-root .ndc-done-btn {
    width: 100%;
    justify-content: center;
  }

  .ndc-stage-box {
    padding: 10px;
  }

  .ndc-font-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ndc-artwork-controls {
    grid-template-columns: 1fr;
  }
}

.ndc-stage-disclaimer {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--ndc-taupe);
}

/* =========================================================================
   1.5.x: curve handle, engraving area title, bespoke WhatsApp card
   ========================================================================= */

/* Curve handle: a small bar on the bottom edge, pulled up or down to curve the text */
.ndc-curve-handle {
  position: absolute;
  bottom: -12px;
  left: 50%;
  width: 26px;
  height: 12px;
  margin-left: -13px;
  background: #FFFFFF;
  border: 2px solid var(--ndc-coral);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  cursor: ns-resize;
  z-index: 25;
  touch-action: none;
}

.ndc-curve-handle::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 999px;
}

/* "Your engraving area" title above the photo */
#ndc-live-engraver-root .ndc-stage-title {
  margin: 0 0 12px;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ndc-wine);
  text-align: center;
}

/* Bespoke design card, just above "Save my design" */
.ndc-bespoke-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--ndc-cream);
  border: 1px solid var(--ndc-line);
  border-radius: 14px;
}

.ndc-bespoke-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ndc-bespoke-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ndc-wine);
}

.ndc-bespoke-text {
  font-family: 'Public Sans', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ndc-body);
}

.ndc-bespoke-fee {
  font-family: 'Public Sans', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ndc-taupe);
}

#ndc-live-engraver-root .ndc-bespoke-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ndc-rose);
  color: var(--ndc-rose-text);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

#ndc-live-engraver-root .ndc-bespoke-btn:hover,
#ndc-live-engraver-root .ndc-bespoke-btn:focus-visible {
  background: var(--ndc-coral);
  color: #FFFFFF;
}

@media (max-width: 480px) {
  .ndc-bespoke-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  #ndc-live-engraver-root .ndc-bespoke-btn {
    justify-content: center;
  }
}
