/*
 * Digicopy product configurator — presentation only.
 * Loaded after the theme stylesheet, on product pages. The opt-in class is
 * emitted only for the Engine purchase panel. Native controls, option order,
 * calculated values, visibility and checkout behaviour remain with the Engine.
 */

.dc-configurator-refresh {
  --dc-cfg-line: #e3e8f1;
  --dc-cfg-muted: #59657c;
  --dc-cfg-soft: #f6f8fc;
  --dc-cfg-gutter: 24px;
  border-color: var(--dc-cfg-line);
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(25, 40, 78, .07);
}

.dc-configurator-refresh .dc-product-summary-top {
  padding: 26px var(--dc-cfg-gutter) 22px;
}

.dc-configurator-refresh .dc-product-summary-top h1 {
  font-size: 28px;
  line-height: 1.22;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.dc-configurator-refresh .dc-product-category {
  font-size: 11px;
}

.dc-configurator-refresh .dc-product-price-large {
  margin: 18px 0 14px;
  padding-top: 20px;
  flex-wrap: wrap;
  column-gap: 7px;
}

.dc-configurator-refresh .dc-product-price-large > span {
  font-size: 12px;
  line-height: 1.45;
}

.dc-configurator-refresh .dc-product-price-large strong {
  font-size: 34px;
  line-height: 1.3;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.dc-configurator-refresh .dc-product-price-large em {
  color: var(--dc-cfg-muted);
  font-size: 13px;
  font-weight: 500;
}

.dc-configurator-refresh .dc-short-description {
  color: var(--dc-cfg-muted);
  font-size: 13px;
  line-height: 1.6;
}

.dc-configurator-refresh .dc-inline-trust {
  gap: 10px 16px;
  padding-top: 16px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--dc-cfg-muted);
}

.dc-configurator-refresh > .dc-engine-panel,
.dc-configurator-refresh > .dc-engine-woo-variations,
.dc-configurator-refresh > .dc-buy-assurances,
.dc-configurator-refresh > .dc-product-meta {
  margin-top: 0;
}

.dc-configurator-refresh .dc-engine-panel {
  border-color: var(--dc-cfg-line);
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-head {
  padding: 22px var(--dc-cfg-gutter) 18px !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-kicker,
.dc-configurator-refresh .dc-engine-panel .dcppe-x-kicker {
  font-size: 11px !important;
  line-height: 1.5;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-head h3 {
  font-size: 20px !important;
  line-height: 1.3 !important;
  letter-spacing: -.02em;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-head p {
  margin-top: 6px;
  font-size: 13px !important;
  line-height: 1.6 !important;
  color: var(--dc-cfg-muted) !important;
}

.dc-configurator-refresh .dc-step-heading {
  gap: 10px;
  margin-bottom: 12px;
}

.dc-configurator-refresh .dc-step-num {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  font-size: 13px;
}

.dc-configurator-refresh .dc-step-heading strong {
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -.015em;
}

.dc-configurator-refresh .dc-step-heading small {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--dc-cfg-muted);
}

.dc-configurator-refresh .dc-perso-heading {
  margin-top: 20px;
  padding: 12px 14px;
  border-color: var(--dc-cfg-line);
  border-radius: 14px;
  background: var(--dc-cfg-soft);
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroups {
  padding: 14px var(--dc-cfg-gutter) 18px !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup {
  margin-bottom: 22px !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:last-child {
  margin-bottom: 0 !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup + .dcppe-optgroup {
  margin-top: 24px !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup-label {
  margin-bottom: 12px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup-label small {
  font-size: 11px !important;
  line-height: 1.5;
  color: var(--dc-cfg-muted);
}

/* Keep Engine color groups and VillaTheme photo/card controls unchanged. */
.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opts {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt {
  min-height: 70px !important;
  padding: 10px 30px 10px 11px !important;
  border: 1px solid var(--dc-cfg-line) !important;
  border-radius: 11px !important;
  background: #fff !important;
  box-shadow: none !important;
  justify-content: flex-start !important;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  white-space: normal;
  font-family: Inter, Arial, sans-serif !important;
  line-height: 1.35;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt-name {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt em {
  font-family: Inter, Arial, sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  font-style: normal;
  line-height: 1.4;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt-img {
  width: 32px !important;
  height: 32px !important;
  flex-shrink: 0;
}

/* Explicit native visibility wins over both the plugin flex and our grid. */
.dc-configurator-refresh .dc-engine-panel .dcppe-opt[hidden],
.dc-configurator-refresh .dc-engine-panel .dcppe-tier[hidden] {
  display: none !important;
}

/* Image options keep the same Engine button and its selection indicator. */
.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt-image:has(> .dcppe-opt-img):not([hidden]) {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 3px;
  align-items: center;
  align-content: center;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt-image > .dcppe-opt-img {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt-image:has(> .dcppe-opt-img) > .dcppe-opt-name,
.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt-image:has(> .dcppe-opt-img) > em {
  grid-column: 2;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt-image > .dcppe-opt-conflict {
  grid-column: 1 / -1;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt.is-on {
  border-color: var(--dc-blue, #2743d6) !important;
  background: var(--dc-blue-soft, #eef1ff) !important;
  box-shadow: inset 0 0 0 1px var(--dc-blue, #2743d6) !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-qtylabel {
  padding: 0 var(--dc-cfg-gutter) 12px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-tiers {
  padding: 0 var(--dc-cfg-gutter) 18px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-tier {
  min-height: 64px !important;
  padding: 10px !important;
  border: 1px solid var(--dc-cfg-line) !important;
  border-radius: 11px !important;
  background: #fff !important;
  box-shadow: none !important;
  text-align: left;
  white-space: normal;
  font-family: Inter, Arial, sans-serif !important;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-tier.is-selected {
  border-color: var(--dc-blue, #2743d6) !important;
  background: var(--dc-blue-soft, #eef1ff) !important;
  box-shadow: inset 0 0 0 1px var(--dc-blue, #2743d6) !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-tier-q {
  display: block;
  margin-bottom: 0;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  color: var(--dc-blue-ink, #141a47);
  line-height: 1.3;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-tier-u {
  display: block;
  margin-top: 3px;
  margin-bottom: 0;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 11px !important;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--dc-cfg-muted);
  white-space: nowrap;
}

/* Engine polish makes this suffix a separate row; keep the whole unit price together. */
.dc-configurator-refresh .dc-engine-panel .dcppe-tier-u small {
  display: inline;
  margin: 0 0 0 2px;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-tier-u .woocommerce-Price-amount,
.dc-configurator-refresh .dc-engine-panel .dcppe-tier-u bdi {
  display: inline;
  font: inherit;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-tier-b {
  margin-top: 6px;
  padding: 3px 6px !important;
  font-size: 10px !important;
  line-height: 1.4;
}

/* Selection rings do not alter colors, thumbnails, availability or visibility. */
.dc-configurator-refresh .variable-items-wrapper .variable-item.selected,
.dc-configurator-refresh .variable-items-wrapper .variable-item[aria-checked="true"] {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--dc-blue, #2743d6) !important;
}

.dc-configurator-refresh .dc-engine-woo-heading strong {
  font-size: 16px;
  line-height: 1.5;
}

.dc-configurator-refresh .dc-engine-woo-heading small {
  font-size: 12px;
  color: var(--dc-cfg-muted);
}

.dc-configurator-refresh .dc-engine-woo-variations .reset_variations {
  margin-top: 12px;
  font-size: 12px;
  text-underline-offset: 3px;
  color: var(--dc-cfg-muted);
}

.dc-configurator-refresh .dc-engine-panel .dcppe-config {
  margin: 0 var(--dc-cfg-gutter) 20px !important;
  padding: 14px !important;
  border-radius: 12px !important;
  background: var(--dc-cfg-soft) !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-config strong,
.dc-configurator-refresh .dc-engine-panel .dcppe-config span {
  font-size: 12px !important;
  line-height: 1.5;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-side {
  border-top-color: var(--dc-cfg-line) !important;
  background: var(--dc-cfg-soft) !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-summary {
  padding: 24px var(--dc-cfg-gutter) !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-qtyline {
  margin-bottom: 12px !important;
  font-size: 13px !important;
  line-height: 1.6;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-qtyline b {
  font-size: 17px !important;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-price {
  margin-bottom: 8px !important;
  line-height: 1.35;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-unit {
  font-size: 34px !important;
  line-height: 1.2;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-total {
  font-size: 15px !important;
  line-height: 1.65;
  font-weight: 600;
  color: var(--dc-blue-ink, #141a47);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-econ,
.dc-configurator-refresh .dc-engine-panel .dcppe-x-days,
.dc-configurator-refresh .dc-engine-panel .dcppe-x-min {
  padding: 9px 11px !important;
  margin-bottom: 12px !important;
  font-size: 12px !important;
  line-height: 1.5;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-note,
.dc-configurator-refresh .dc-engine-panel .dcppe-mods {
  margin: 0 var(--dc-cfg-gutter) 20px !important;
  padding: 12px 14px !important;
  font-size: 12px !important;
  line-height: 1.6;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-x-note {
  margin-top: 12px !important;
  font-size: 12px !important;
  line-height: 1.6;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-wait-var {
  padding: 22px var(--dc-cfg-gutter) !important;
  font-size: 13px !important;
  line-height: 1.6;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-buy {
  gap: 10px;
  margin-top: 20px;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-buy-btn {
  min-height: 52px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  padding: 13px 16px;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-buy-now {
  min-height: 56px;
  box-shadow: 0 5px 14px rgba(39, 67, 214, .18);
}

.dc-configurator-refresh .dc-engine-panel .dcppe-wa-button:not(.dcppe-wa-link) {
  min-height: 54px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
}

.dc-configurator-refresh .dc-order-hint {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

.dc-configurator-refresh .dc-buy-assurances {
  gap: 16px;
  padding: 20px var(--dc-cfg-gutter);
}

.dc-configurator-refresh .dc-buy-assurances b {
  font-size: 12px;
}

.dc-configurator-refresh .dc-buy-assurances small {
  font-size: 11px;
  line-height: 1.5;
  color: var(--dc-cfg-muted);
}

.dc-configurator-refresh .dc-product-meta {
  padding: 14px var(--dc-cfg-gutter);
  font-size: 11px;
  line-height: 1.6;
}

/* Keep keyboard focus independent of the selected-state border. */
.dc-configurator-refresh button:focus-visible,
.dc-configurator-refresh a:focus-visible,
.dc-configurator-refresh input:focus-visible,
.dc-configurator-refresh select:focus-visible,
.dc-configurator-refresh [tabindex]:focus-visible {
  outline: 3px solid var(--dc-blue, #2743d6) !important;
  outline-offset: 3px;
}

.dc-configurator-refresh .dc-engine-panel .dcppe-opt[disabled],
.dc-configurator-refresh .dc-engine-panel .dcppe-opt[aria-disabled="true"],
.dc-configurator-refresh .dc-engine-panel .dcppe-tier[disabled],
.dc-configurator-refresh .dc-engine-panel .dcppe-tier[aria-disabled="true"],
.dc-configurator-refresh .dc-engine-panel .dcppe-buy-btn[disabled],
.dc-configurator-refresh .dc-engine-panel .dcppe-buy-btn[aria-disabled="true"],
.dc-configurator-refresh .dc-engine-panel .dcppe-buy-btn.is-blocked {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

@media (hover: hover) {
  .dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt:hover:not([disabled]):not([aria-disabled="true"]):not(.is-blocked):not(.is-on),
  .dc-configurator-refresh .dc-engine-panel .dcppe-tier:hover:not([disabled]):not([aria-disabled="true"]):not(.is-blocked):not(.is-selected) {
    border-color: var(--dc-blue, #2743d6) !important;
    box-shadow: 0 3px 10px rgba(25, 40, 78, .07) !important;
  }
}

@media (max-width: 560px) {
  .dc-configurator-refresh {
    --dc-cfg-gutter: 18px;
    border-radius: 18px;
  }

  .dc-configurator-refresh .dc-product-summary-top h1 {
    font-size: 25px;
  }

  .dc-configurator-refresh .dc-product-price-large strong,
  .dc-configurator-refresh .dc-engine-panel .dcppe-x-unit {
    font-size: 30px !important;
  }

  .dc-configurator-refresh .dc-engine-panel .dcppe-tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opts {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dc-configurator-refresh .dc-engine-panel .dcppe-optgroup:not(.is-color) .dcppe-opt {
    min-height: 64px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dc-configurator-refresh .dc-engine-panel .dcppe-opt,
  .dc-configurator-refresh .dc-engine-panel .dcppe-tier,
  .dc-configurator-refresh .dc-engine-panel .dcppe-buy-btn,
  .dc-configurator-refresh .dc-var-card {
    transition: none !important;
  }

  .dc-configurator-refresh .dc-order-hint.is-flash {
    animation: none;
  }
}
