/* Konfigurator topera — style (BRIEF sekcja 5). Prefiks klas: .wyp- */

:root {
  color-scheme: light;
  --wyp-ink: #241a12;
  --wyp-paper: #faf6f0;
  --wyp-accent: #b8672e;
  --wyp-border: #e4d9cb;
  --wyp-danger: #b3271e;
  --wyp-muted: #8a7c6c;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; min-width: 0; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--wyp-paper);
  color: var(--wyp-ink);
}

.wyp-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--wyp-border);
  flex-wrap: wrap;
}
.wyp-header__brand { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.wyp-header__brand span { color: var(--wyp-accent); }
.wyp-header__tag { font-size: 13px; color: var(--wyp-muted); }

.wyp-footer {
  padding: 16px 20px 32px;
  font-size: 12px;
  color: var(--wyp-muted);
  text-align: center;
}

.wyp-loading { padding: 40px; text-align: center; color: var(--wyp-muted); }

.wyp-app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .wyp-app { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .wyp-line__row, .wyp-row2 { grid-template-columns: 1fr; }
  .wyp-material-options { flex-wrap: wrap; }
}

/* --- Formularz --- */
.wyp-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--wyp-border);
  border-radius: 14px;
  padding: 18px;
}
.wyp-field { display: flex; flex-direction: column; gap: 6px; }
.wyp-field label { font-size: 12px; font-weight: 600; color: var(--wyp-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.wyp-field input[type="text"],
.wyp-field input[type="number"],
.wyp-field select {
  font: inherit;
  font-size: 15px;
  padding: 9px 10px;
  border: 1px solid var(--wyp-border);
  border-radius: 8px;
  background: #fff;
  color: var(--wyp-ink);
}
.wyp-field input:focus, .wyp-field select:focus { outline: 2px solid var(--wyp-accent); outline-offset: 1px; }

.wyp-line { border: 1px dashed var(--wyp-border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.wyp-line__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wyp-line__title { font-size: 12px; font-weight: 700; color: var(--wyp-accent); }

.wyp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.wyp-preset-fields { display: flex; flex-direction: column; gap: 10px; }
.wyp-preset-fields .wyp-chip[disabled] { opacity: 0.45; cursor: not-allowed; }

.wyp-material-options { display: flex; gap: 8px; }
.wyp-chip {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  border: 1px solid var(--wyp-border);
  border-radius: 8px;
  background: #fff;
  color: var(--wyp-ink);
  font: inherit;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}
.wyp-chip.is-active { border-color: var(--wyp-accent); background: #fbeee2; font-weight: 600; }

input[type="range"] { width: 100%; accent-color: var(--wyp-accent); }
.wyp-size-value { font-size: 13px; color: var(--wyp-muted); }

/* --- Podgląd --- */
.wyp-preview {
  background: #fff;
  border: 1px solid var(--wyp-border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 16px;
}
.wyp-stage {
  border-radius: 12px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: hidden;
}
.wyp-stage svg { width: min(90%, 420px); height: auto; max-height: 380px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); }

.wyp-stage.material-sklejka_3, .wyp-stage.material-sklejka_4 {
  background:
    repeating-linear-gradient(100deg, rgba(120,80,35,.10) 0 6px, transparent 6px 16px),
    linear-gradient(135deg, #d9b077, #b9895a);
}
.wyp-stage.material-sklejka_3 path, .wyp-stage.material-sklejka_4 path { fill: #3c2513; }

.wyp-stage.material-plexi_3, .wyp-stage.material-plexi_4 {
  background: linear-gradient(135deg, #dce8ee, #b9ccd6);
}
.wyp-stage.material-plexi_3 path, .wyp-stage.material-plexi_4 path { fill: #20343d; }

.wyp-dims { display: flex; justify-content: space-between; font-size: 13px; color: var(--wyp-muted); }
.wyp-price { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--wyp-border); padding-top: 12px; }
.wyp-price__value { font-size: 30px; font-weight: 700; color: var(--wyp-ink); }
.wyp-price__note { font-size: 12px; color: var(--wyp-muted); }

.wyp-warnings { display: flex; flex-direction: column; gap: 6px; }
.wyp-warning {
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff4e5;
  border: 1px solid #f0d9ad;
  color: #6b4c15;
}
.wyp-warning.is-error { background: #fdecea; border-color: #f3c1bb; color: var(--wyp-danger); }

/* --- Zamówienie --- */
.wyp-order-toggle {
  align-self: flex-start;
  background: var(--wyp-accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.wyp-order-toggle:disabled { background: var(--wyp-muted); cursor: not-allowed; }

.wyp-checkout { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--wyp-border); padding-top: 16px; }

.wyp-chip--disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.wyp-submit-order {
  background: var(--wyp-ink);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.wyp-submit-order:disabled { opacity: 0.6; cursor: not-allowed; }

.wyp-confirmation {
  border-top: 1px solid var(--wyp-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wyp-confirmation h3 { margin: 0; font-size: 16px; }
.wyp-payment-instructions {
  white-space: pre-wrap;
  font-family: inherit;
  background: #fbeee2;
  border: 1px solid var(--wyp-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
