.akudeco-calc {
  --apc-accent: #B5E0CD;
  --apc-accent-bg: rgba(181, 224, 205, 0.13);
  --apc-cta-bg: #F9BB3E;
  --apc-cta-text: #fff;
  --apc-cta-disabled-bg: #f0f0f0;
  --apc-cta-disabled-text: #999;
  --apc-text: #000;
  --apc-muted: #999;
  --apc-border: #d5d5d5;
  --apc-bg-soft: #f3f3f3;
  --apc-radius: 5px;
  --apc-font: inherit;

  font-family: var(--apc-font);
  font-size: 14px;
  color: var(--apc-text);
  /* Extra breathing room below the whole widget so the Flatsome template USPs
     underneath don't sit too close to the calculator. */
  margin: 16px 0 32px;
}

/* Add-to-cart confirmation — shown at the top of the widget after a successful
   add via any path (calculator, direct, or sample). */
.akudeco-calc .apc-added {
  margin-bottom: 14px;
  padding: 11px 14px;
  background: #e8f7ef;
  border: 1px solid var(--apc-accent);
  border-radius: var(--apc-radius);
  font-size: 13.5px;
  line-height: 1.45;
  color: #1b6b43;
}

.akudeco-calc .apc-added-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 3px;
  border-radius: 50%;
  background: var(--apc-accent);
  color: #14502f;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.akudeco-calc .apc-added a {
  color: #14502f;
  font-weight: 700;
  text-decoration: underline;
  white-space: nowrap;
}

/* ---- Mode accordion (Bereken vs Direct bestellen) ---- */
.akudeco-calc .apc-modes {
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e5e5;
  border-radius: var(--apc-radius);
  overflow: hidden;
}

/* "of" divider between the two sections — makes clear it is an either/or
   choice rather than sequential steps. */
.akudeco-calc .apc-or {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: #fff;
}

.akudeco-calc .apc-or::before,
.akudeco-calc .apc-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}

.akudeco-calc .apc-or span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--apc-muted);
}

.akudeco-calc .apc-mode-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 !important;
  background: #fff;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  font-family: var(--apc-font);
  font-size: 15px;
  font-weight: 700;
  color: var(--apc-text);
  text-align: left;
}

.akudeco-calc .apc-mode-title {
  flex: 1;
}

.akudeco-calc .apc-mode-chevron {
  display: inline-flex;
  color: var(--apc-muted);
  transition: transform 0.2s ease;
}

.akudeco-calc .apc-mode-head[aria-expanded="true"] .apc-mode-chevron {
  transform: rotate(180deg);
}

.akudeco-calc .apc-mode-body {
  padding: 14px;
  border-top: 1px solid #eee;
}

.akudeco-calc .apc-direct-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--apc-muted);
  line-height: 1.5;
}

/* ---- Icons ---- */
.akudeco-calc .apc-icon {
  background: var(--apc-accent);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--apc-text);
  flex: 0 0 auto;
}

/* Inline SVG icons inherit color via currentColor and are sized per slot. */
.akudeco-calc .apc-svg {
  display: block;
}

.akudeco-calc .apc-icon .apc-svg {
  width: 16px;
  height: 16px;
}

.akudeco-calc .apc-mode-chevron .apc-svg {
  width: 18px;
  height: 18px;
}

.akudeco-calc .apc-sample-icon .apc-svg {
  width: 18px;
  height: 18px;
}

/* ---- Calculator inputs ---- */
.akudeco-calc .apc-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.akudeco-calc .apc-field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.akudeco-calc .apc-label {
  font-size: 12px;
  color: #666;
  font-weight: 600;
  margin-bottom: 4px;
}

.akudeco-calc .apc-input-wrap {
  display: flex;
}

.akudeco-calc .apc-input {
  font-family: var(--apc-font);
  font-size: 14px;
  padding: 8px;
  height: 38px;
  border-radius: var(--apc-radius) 0 0 var(--apc-radius);
  border: 1px solid var(--apc-border);
  border-right: 0;
  flex: 1;
  outline: none;
  background: #fff;
  /* Override the theme's default input margin (Flatsome adds 1em) which
     otherwise breaks the calculator's input alignment. */
  margin-bottom: 0 !important;
}

.akudeco-calc .apc-suffix {
  background: var(--apc-bg-soft);
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--apc-border);
  border-radius: 0 var(--apc-radius) var(--apc-radius) 0;
  color: #666;
}

.akudeco-calc .apc-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--apc-radius);
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 10px;
}

.akudeco-calc .apc-warning a {
  color: var(--apc-text);
  font-weight: 600;
}

.akudeco-calc .apc-results {
  background: var(--apc-accent-bg);
  border: 1px solid var(--apc-accent);
  border-radius: var(--apc-radius);
  padding: 10px 14px;
  margin-bottom: 14px;
}

.akudeco-calc .apc-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 13px;
}

.akudeco-calc .apc-row.apc-total {
  border-top: 1px solid var(--apc-accent);
  margin-top: 4px;
  padding: 6px 0 0;
  font-size: 15px;
  font-weight: 700;
}

/* ---- Add-to-cart buttons ---- */
.akudeco-calc .apc-cta-primary {
  width: 100%;
  margin: 0 !important;
  background: var(--apc-cta-bg);
  color: var(--apc-cta-text);
  font-weight: 700;
  font-size: 15px;
  padding: 12px;
  border: 0;
  border-radius: var(--apc-radius);
  font-family: var(--apc-font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.akudeco-calc .apc-cta-primary:disabled {
  background: var(--apc-cta-disabled-bg);
  color: var(--apc-cta-disabled-text);
  cursor: not-allowed;
}

.akudeco-calc .apc-cta-inline {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  font-size: 14px;
  /* Keep "Toevoegen — € X" on a single line; the narrow qty field beside it
     (fixed width below) leaves enough room even on small phones. */
  white-space: nowrap;
}

.akudeco-calc .apc-reserve {
  margin: 8px 0 0;
  font-size: 12px;
  color: #6b6b6b;
  font-style: italic;
}

.akudeco-calc .apc-error {
  margin: 10px 0 0;
  padding: 8px 12px;
  font-size: 13px;
  background: #fde8e8;
  border: 1px solid #e0b4b4;
  border-radius: var(--apc-radius);
  color: #8a1f1f;
}

.akudeco-calc .apc-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--apc-muted);
  line-height: 1.5;
}

.akudeco-calc .apc-manual-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.akudeco-calc .apc-manual-row .apc-input {
  /* Fixed narrow width — a number input's intrinsic min-width otherwise eats
     half the row on mobile and forces the button text to wrap. */
  flex: 0 0 84px;
  width: 84px;
  min-width: 0;
  height: 46px;
  text-align: center;
  border-radius: var(--apc-radius);
  border: 1px solid var(--apc-border);
}

/* ---- Footer (sample button + offerte link) ---- */
.akudeco-calc .apc-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.akudeco-calc .apc-sample-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1.5px solid var(--apc-accent);
  border-radius: var(--apc-radius);
  background: var(--apc-accent-bg);
  color: var(--apc-text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.akudeco-calc .apc-sample-btn:hover {
  background: var(--apc-accent);
}

.akudeco-calc .apc-sample-icon {
  display: inline-flex;
}

/* Offerte notice bar — always visible inside the calculator (between the
   inputs and the results), same amber style as the old height warning. */
.akudeco-calc .apc-offerte-bar {
  display: block;
  margin-bottom: 14px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--apc-radius);
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--apc-text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.akudeco-calc .apc-offerte-bar:hover {
  background: #ffeeba;
}

.akudeco-calc .apc-offerte-bar strong {
  font-weight: 700;
}

@media (max-width: 540px) {
  .akudeco-calc .apc-inputs { flex-direction: column; }
}

/* ---- Offerte modal ---- */
.akudeco-calc-modal {
  border: 0;
  border-radius: var(--apc-radius, 5px);
  padding: 0;
  max-width: 520px;
  width: calc(100% - 32px);
}

.akudeco-calc-modal::backdrop { background: rgba(0, 0, 0, 0.45); }

.akudeco-calc-modal .apc-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
}

.akudeco-calc-modal .apc-modal-body { padding: 32px 24px 24px; }

@media (max-width: 540px) {
  .akudeco-calc-modal { width: 100%; height: 100%; max-width: 100%; }
}
