/* ── DBM Konfigurator v1.2 – Frontend CSS ── */
#dbm-konfigurator-root * { box-sizing: border-box; margin: 0; padding: 0; }

#dbm-konfigurator-root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #e6e9ed;
  border-radius: 16px;
  overflow: hidden;
  max-width: 820px;
  margin: 0 auto;
}

#dbm-konfigurator-root .dbm-kf-wrapper {
  background: #ffffff;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(130,132,191,0.13);
}

/* ── HEADER ── */
.dbm-kf-header {
  background: linear-gradient(135deg, #8284bf 0%, #6a6ca8 100%);
  padding: 26px 32px 22px;
}
.dbm-kf-header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dbm-kf-logo {
  height: 40px;
  width: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
.dbm-kf-header-text { flex: 1; min-width: 0; }
.dbm-kf-header h2 {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 3px;
  line-height: 1.2;
}
.dbm-kf-header p {
  font-size: 13px;
  color: rgba(255,255,255,0.82);
  margin: 0;
  line-height: 1.4;
}

/* ── STEP DOTS ── */
.dbm-kf-steps {
  display: flex;
  gap: 6px;
  padding: 18px 32px 0;
  background: #fff;
}
.dbm-kf-step-dot {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #d0d3dc;
  transition: background 0.25s;
}
.dbm-kf-step-dot.done   { background: #8284bf; }
.dbm-kf-step-dot.active { background: linear-gradient(90deg, #8284bf, #6a6ca8); }

/* ── BODY ── */
.dbm-kf-body {
  padding: 24px 32px 40px;
  background: #fff;
}
.dbm-kf-step-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aab0c4;
  margin-bottom: 5px;
}
.dbm-kf-step-title {
  font-size: 19px;
  font-weight: 700;
  color: #1e2038;
  margin-bottom: 5px;
  line-height: 1.3;
}
.dbm-kf-step-hint {
  font-size: 13px;
  color: #7a7f9a;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── PRICE BAR ── */
.dbm-kf-price-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f2f5;
  border: 1px solid #dde0e8;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 20px;
  gap: 12px;
}
.dbm-kf-price-bar span:first-child { font-size: 12px; color: #8a8fa8; }
.dbm-kf-price-val {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #8284bf, #6a6ca8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

/* ── MODULE GRID ── */
.dbm-kf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.dbm-kf-card {
  border: 1.5px solid #dde0e8;
  border-radius: 12px;
  padding: 15px 15px 13px;
  cursor: pointer;
  background: #f7f8fa;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  position: relative;
  user-select: none;
  display: flex;
  flex-direction: column;
}
.dbm-kf-card:hover {
  border-color: #8284bf;
  background: #ededf6;
  box-shadow: 0 2px 12px rgba(130,132,191,0.10);
}
.dbm-kf-card.selected {
  border-color: #8284bf;
  background: #eeeef8;
  box-shadow: 0 2px 14px rgba(130,132,191,0.16);
}

/* Checkbox top-right */
.dbm-kf-card-check {
  position: absolute;
  top: 11px; right: 11px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid #c8ccd8;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  z-index: 1;
}
.dbm-kf-card.selected .dbm-kf-card-check {
  background: #8284bf;
  border-color: #8284bf;
}
.dbm-kf-card-check svg { display: none; }
.dbm-kf-card.selected .dbm-kf-card-check svg { display: block; }

/* ── ICON (dot top-left) ── */
.dbm-kf-card-icon {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: currentColor;
  color: #8284bf;
  display: block;
  margin-bottom: 10px;
  flex-shrink: 0;
}

/* ── BADGE POSITIONS ── */
.dbm-kf-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 10px;        /* softer radius — stays inside card corner */
  background: #eeeef8;
  color: #8284bf;
  white-space: nowrap;
  line-height: 1.6;
}

/* pos-check: absolute, sits left of the checkbox — inside the card */
.dbm-kf-badge-wrap.pos-check {
  position: absolute;
  top: 12px;
  right: 38px;
  line-height: 1;
  z-index: 0;          /* behind the checkbox (z-index:1) */
}

/* pos-topleft: in-flow, replaces the icon dot row */
.dbm-kf-badge-wrap.pos-topleft {
  display: block;
  margin-bottom: 8px;
  position: static;
}

/* pos-bottomright: in-flow, right-aligned, after price */
.dbm-kf-badge-wrap.pos-bottomright {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* beside-name: inline after name text */
.dbm-kf-badge-wrap.pos-beside-name {
  display: inline;
  margin-left: 5px;
  vertical-align: middle;
}

.dbm-kf-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #2d2f4a;
  margin-bottom: 4px;
  padding-right: 26px; /* space for the checkbox circle top-right */
  line-height: 1.3;
}
.dbm-kf-card.selected .dbm-kf-card-name { color: #5254a0; }
.dbm-kf-card-desc {
  font-size: 11px;
  color: #8a8fa8;
  line-height: 1.5;
  margin-bottom: 10px;
  flex: 1;
}
.dbm-kf-card-price {
  font-size: 12px;
  font-weight: 600;
  color: #aab0c4;
  margin-top: auto;
}
.dbm-kf-card.selected .dbm-kf-card-price { color: #8284bf; }

/* ── OPTIONS LIST (subpages / design radio rows) ── */
.dbm-kf-options-list {
  margin-bottom: 20px;
}

/* ── OPTION ROWS ── */
.dbm-kf-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1.5px solid #dde0e8;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #f7f8fa;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 54px;
}
.dbm-kf-option:hover { border-color: #8284bf; background: #ededf6; }
.dbm-kf-option.selected { border-color: #8284bf; background: #eeeef8; }
.dbm-kf-radio {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid #c0c4d4;
  background: #fff;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.dbm-kf-option.selected .dbm-kf-radio { border-color: #8284bf; }
.dbm-kf-radio-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8284bf, #6a6ca8);
  display: none;
}
.dbm-kf-option.selected .dbm-kf-radio-dot { display: block; }
.dbm-kf-option-label { flex: 1; font-size: 14px; font-weight: 500; color: #4a4d6e; }
.dbm-kf-option.selected .dbm-kf-option-label { color: #2d2f4a; font-weight: 600; }
.dbm-kf-option-price { font-size: 12px; color: #aab0c4; font-weight: 500; white-space: nowrap; }
.dbm-kf-option.selected .dbm-kf-option-price { color: #8284bf; }

/* ── BUTTONS ── */
.dbm-kf-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 4px;
}
.dbm-kf-btn-back {
  flex: 1;
  padding: 15px 12px;
  border: 1.5px solid #c8ccd8;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: #7a7f9a;
  transition: all 0.15s;
  min-height: 52px;
}
.dbm-kf-btn-back:hover { background: #ededf6; border-color: #8284bf; color: #5254a0; }
.dbm-kf-btn-next {
  flex: 2;
  padding: 15px 12px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #8284bf, #6a6ca8);
  color: #fff;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
  min-height: 52px;
}
.dbm-kf-btn-next:hover { opacity: 0.90; }
.dbm-kf-btn-next:active { transform: scale(0.99); }

/* ── SUMMARY ── */
.dbm-kf-summary {
  background: #f0f2f5;
  border: 1px solid #dde0e8;
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 22px;
}
.dbm-kf-summary-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #1e2038;
  margin-bottom: 14px;
}
.dbm-kf-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  gap: 10px;
}
.dbm-kf-sum-row span:first-child { color: #7a7f9a; }
.dbm-kf-sum-row span:last-child  { color: #4a4d6e; font-weight: 500; white-space: nowrap; }
.dbm-kf-sum-row.total {
  border-top: 1.5px solid #dde0e8;
  margin-top: 10px;
  padding-top: 13px;
}
.dbm-kf-sum-row.total span:first-child { color: #1e2038; font-size: 14px; font-weight: 700; }
.dbm-kf-sum-row.total span:last-child {
  background: linear-gradient(135deg, #8284bf, #6a6ca8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 22px;
  font-weight: 800;
}

/* ── FORM ── */
.dbm-kf-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.dbm-kf-form-field { display: flex; flex-direction: column; gap: 6px; }
.dbm-kf-form-field.full { grid-column: 1 / -1; }
.dbm-kf-form-field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #7a7f9a;
}
.dbm-kf-form-field input {
  background: #f7f8fa;
  border: 1.5px solid #dde0e8;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: #2d2f4a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  font-family: inherit;
}
.dbm-kf-form-field input:focus {
  border-color: #8284bf;
  box-shadow: 0 0 0 3px rgba(130,132,191,0.12);
}
.dbm-kf-form-field input::placeholder { color: #b0b5c8; }

.dbm-kf-submit {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #8284bf, #6a6ca8);
  color: #fff;
  margin-top: 4px;
  transition: opacity 0.15s;
  letter-spacing: 0.01em;
  font-family: inherit;
  min-height: 52px;
}
.dbm-kf-submit:hover { opacity: 0.88; }
.dbm-kf-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.dbm-kf-note {
  font-size: 11px;
  color: #aab0c4;
  text-align: center;
  margin-top: 13px;
  line-height: 1.5;
}

/* ── SUCCESS ── */
.dbm-kf-success { text-align: center; padding: 48px 24px; }
.dbm-kf-success-icon {
  font-size: 48px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #8284bf, #6a6ca8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}
.dbm-kf-success h3 { font-size: 21px; font-weight: 700; color: #1e2038; margin-bottom: 8px; }
.dbm-kf-success p  { font-size: 14px; color: #7a7f9a; line-height: 1.6; }

/* ── ERROR ── */
.dbm-kf-error {
  background: #fdf0f0;
  border: 1.5px solid #e0b0b0;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 13px;
  color: #b94444;
  margin-top: 12px;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .dbm-kf-header { padding: 20px 18px 18px; }
  .dbm-kf-header h2 { font-size: 17px; }
  .dbm-kf-steps { padding: 14px 18px 0; }
  .dbm-kf-body { padding: 18px 18px 32px; }
  .dbm-kf-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dbm-kf-card { padding: 12px 12px 10px; }
  .dbm-kf-form-grid { grid-template-columns: 1fr; gap: 12px; }
  .dbm-kf-step-title { font-size: 16px; }
  .dbm-kf-btn-next, .dbm-kf-btn-back { font-size: 14px; padding: 14px 10px; min-height: 50px; }
  .dbm-kf-option { padding: 12px 14px; }
  .dbm-kf-price-val { font-size: 16px; }
}
@media (max-width: 380px) {
  .dbm-kf-grid { grid-template-columns: 1fr; }
  .dbm-kf-header-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}
