/* ==========================================================================
   KONFIGURATOR OZNAKOWANIA REKLAMOWEGO (MULTI-STEP WIZARD AI)
   Stylizacja: BEM / Clean Modern UI / High Contrast Aesthetics
   ========================================================================== */

/* CSS Variables */
:root {
  --color-bg-app: #f8fafc;
  --color-bg-form: #ffffff;
  --color-bg-input: #f1f5f9;
  --color-bg-input-focus: #ffffff;
  --color-border-input: #e2e8f0;
  
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  
  --color-primary: #0f172a;
  --color-primary-hover: #1e293b;
  --color-accent: #3b82f6;
  --color-accent-light: #eff6ff;
  
  --color-error: #ef4444;
  --color-error-bg: #fef2f2;
  --color-error-border: #fca5a5;
  
  --color-warning-bg: #fffbeb;
  --color-warning-text: #b45309;
  --color-warning-border: #fde68a;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.12);

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: var(--font-family);
  background-color: var(--color-bg-app);
  color: var(--color-text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* App Shell Container (Pełny ekran bez marginesów bocznych) */
.app-container {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
}

/* Main Wizard Container (Layout 25% / 75% na 100vh) */
.wizard {
  display: flex;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  background-color: var(--color-bg-form);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  border: none;
}

/* LEWA KOLUMNA: Formularz (25% szerokości z wewnętrznym scrollowaniem) */
.wizard__form-col {
  flex: 0 0 32vw;
  width: 32vw;
  min-width: 400px;
  max-width: 560px;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 22px 0 22px;
  background-color: var(--color-bg-form);
  position: relative;
  z-index: 2;
  overflow-y: auto;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.wizard__form-col::-webkit-scrollbar {
  width: 6px;
}

.wizard__form-col::-webkit-scrollbar-track {
  background: transparent;
}

.wizard__form-col::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.wizard__form-col::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.wizard__form-col::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

/* Header */
.wizard__header {
  margin-bottom: 32px;
}

.wizard__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 16px;
  background: var(--color-accent-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.wizard__brand-logo {
  color: var(--color-accent);
}

.wizard__title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text-main);
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.wizard__subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* Form Container */
.wizard__form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wizard__step {
  animation: fadeInStep var(--transition-normal);
}

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

/* Form Controls & Layout */
.form-group {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 8px;
}

.required {
  color: var(--color-error);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-main);
  background-color: var(--color-bg-input);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:hover {
  background-color: #e9ecef;
}

.form-control:focus {
  background-color: var(--color-bg-input-focus);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.08);
}

.form-control::placeholder {
  color: var(--color-text-light);
  font-weight: 400;
}

.form-control--textarea {
  resize: vertical;
  min-height: 110px;
}

/* Class dla dostępnego ukrywania elementów natywnych */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Select wrapper */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 44px;
}

.select-wrapper::after {
  display: none !important;
}

/* --- CUSTOM DROPDOWN COMPONENT --- */
.custom-select {
  position: relative;
  width: 100%;
  font-family: inherit;
}

/* Trigger (widoczny przycisk) */
.custom-select__trigger {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #E4E4E7;
  background-color: #ffffff;
  color: var(--color-text-main, #0f172a);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  text-align: left;
  user-select: none;
}

.custom-select__trigger:hover {
  border-color: #a1a1aa;
}

.custom-select__trigger:focus-visible,
.custom-select__trigger[aria-expanded="true"] {
  border-color: #0f172a;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1);
}

.custom-select__value {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}

.custom-select__value.is-placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.custom-select__chevron {
  width: 18px;
  height: 18px;
  margin-left: 12px;
  flex-shrink: 0;
  color: #64748b;
  transition: transform 0.25s ease, color 0.15s ease;
}

.custom-select__trigger[aria-expanded="true"] .custom-select__chevron {
  transform: rotate(180deg);
  color: #0f172a;
}

/* Stan błędu walidacji */
.form-group.has-error .custom-select__trigger {
  background-color: var(--color-error-bg, #fef2f2);
  border-color: var(--color-error-border, #ef4444);
}

/* Lista opcji */
.custom-select__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid #E4E4E7;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  list-style: none;
  margin: 0;

  /* Animacja wejścia (fade + translateY) */
  opacity: 0;
  transform: translateY(-6px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.custom-select {
  position: relative;
  z-index: 10;
}

.custom-select.is-open {
  z-index: 1000;
}

.custom-select.is-open .custom-select__list,
.custom-select__list.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

/* Scrollbar dla listy opcji */
.custom-select__list::-webkit-scrollbar {
  width: 6px;
}
.custom-select__list::-webkit-scrollbar-track {
  background: transparent;
}
.custom-select__list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.custom-select__list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.custom-select__list::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

/* Pojedyncza opcja */
.custom-select__option {
  padding: 11px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.custom-select__option:hover,
.custom-select__option.is-focused {
  background-color: #F4F4F5;
  color: #0f172a;
}

.custom-select__option[aria-selected="true"],
.custom-select__option.is-selected {
  background-color: #0f172a;
  color: #ffffff;
  font-weight: 600;
}

.custom-select__option[aria-selected="true"]:hover,
.custom-select__option.is-selected.is-focused {
  background-color: #0f172a;
  color: #ffffff;
}

/* Ikona ptaszka (check SVG) */
.custom-select__check {
  width: 16px;
  height: 16px;
  margin-left: 8px;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.15s ease, transform 0.15s ease;
  color: #ffffff;
}

.custom-select__option[aria-selected="true"] .custom-select__check,
.custom-select__option.is-selected .custom-select__check {
  opacity: 1;
  transform: scale(1);
}

/* Numeric input z jednostką */
.input-unit {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.input-unit input {
  padding: 12px 48px 12px 12px;
  min-width: 140px;
  flex: 1;
}

.input-unit__label {
  position: absolute;
  right: 12px;
  min-width: 60px;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  pointer-events: none;
  flex-shrink: 0;
}

.form-row .form-group .input-unit {
  width: 100%;
}

/* Komunikaty Błędów Walidacji */
.form-error {
  display: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-error);
  margin-top: 6px;
  animation: slideDown 0.2s ease-out;
}

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

.form-group.has-error .form-control {
  background-color: var(--color-error-bg);
  border-color: var(--color-error-border);
}

.form-group.has-error .form-error {
  display: block;
}

/* Strefa Uploadu Plików */
.upload-zone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  background-color: var(--color-bg-input);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.upload-zone:hover, .upload-zone.is-dragover {
  border-color: var(--color-primary);
  background-color: var(--color-accent-light);
}

.upload-zone__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-zone__icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border-radius: 50%;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.upload-zone__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 4px;
}

.upload-zone__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.upload-zone__highlight {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: underline;
}

.upload-zone__hint {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--color-text-light);
  font-weight: 500;
}

/* Podgląd miniatur wgranych plików */
.file-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.file-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  animation: fadeInStep 0.3s ease;
}

.file-card__thumb {
  width: 100%;
  height: 70px;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 6px;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-text-muted);
}

.file-card__name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-main);
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-card__size {
  font-size: 0.6875rem;
  color: var(--color-text-light);
}

.file-card__remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: var(--color-error);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* FOOTER NAWIGACYJNY (PRZYPIĘTY NA DOLE STICKY) */
.wizard__footer {
  position: sticky;
  bottom: 0;
  background-color: var(--color-bg-form);
  z-index: 10;
  margin-top: auto;
  padding-top: 16px;
  padding-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
}

/* Form Helper Hint */
.form-hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: -4px;
  margin-bottom: 12px;
  line-height: 1.45;
}

/* Podpowiedź bezpośrednio pod polem wymiarowym (głębokość, grubość) */
.input-unit + .form-hint {
  margin-top: 12px;
}

.wizard__step-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.wizard__step-divider {
  color: var(--color-text-light);
  font-weight: 400;
  margin: 0 1px;
}

.wizard__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn--primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-text-main);
  border: 1.5px solid var(--color-border-input);
}

.btn--secondary:hover {
  background-color: var(--color-bg-input);
  border-color: var(--color-text-muted);
}

/* PRAWA KOLUMNA: Duży panel podglądu (75% szerokości, 100vh) */
.wizard__visual-col {
  flex: 1 1 auto;
  width: calc(100vw - 32vw);
  height: 100vh;
  max-height: 100vh;
  position: relative;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 40px;
  color: #ffffff;
  overflow: hidden;
  box-sizing: border-box;
}

/* Krok 4: spokojniejsze, jednolite tło (premium one-pager) */
.wizard__visual-col:has(.step4-panel) {
  background: #0A0B0F;
}

.visual-col__main {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.visual-col__footer {
  flex-shrink: 0;
  margin-top: 16px;
  position: relative;
  z-index: 3;
}

.visual-col__footer .visual-card__footer {
  margin: 0;
}

.visual-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
}

/* Dynamiczna Galeria Zdjęć z Efektem Crossfade */
.gallery-container {
  position: absolute;
  inset: -36px -40px;
  z-index: 0;
  overflow: hidden;
  background-color: #0f172a;
}

.gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none;
}

.gallery-img.is-active {
  opacity: 1;
  z-index: 1;
}

.gallery-img.is-hidden {
  display: none;
}

.gallery-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  color: #94a3b8;
}

.gallery-fallback__icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.gallery-fallback__text {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #94a3b8;
}

/* Gradientowa nakładka chroniąca czytelność tekstów i badge */
.visual-card__overlay {
  position: absolute;
  inset: -36px -40px;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.65) 0%,
    rgba(15, 23, 42, 0.25) 40%,
    rgba(15, 23, 42, 0.9) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.visual-card__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.visual-card__badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.visual-card__spacer {
  flex: 1;
}

/* Podpis "Nasze realizacje" nad uniwersalnym slideshow (kroki 1-2) */
.gallery-caption {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gallery-caption__icon {
  display: flex;
  color: #93c5fd;
}

/* Lewitujący przycisk pauzy/play slideshow – prawy dolny róg obszaru galerii */
.gallery-pause-btn {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
  animation: galleryPauseBtnFloat 3s ease-in-out infinite;
}

.gallery-pause-btn:hover {
  background: rgba(0, 0, 0, 0.58);
  transform: translateY(-2px);
}

.gallery-pause-btn.is-paused {
  animation: none;
}

@keyframes galleryPauseBtnFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* Visual Stats Bar z półprzezroczystym czarnym tłem */
.visual-card__footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Visual Stats Bar */
.visual-card__footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 16px;
}

.visual-card__stat {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.visual-card__stat-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 2px;
}

.visual-card__stat-val {
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.35;
}

/* ==========================================================================
   KROK 4: PREMIUM MINIMALIZM (one-pager / studio architektoniczne)
   Jeden akcent cool off-white (#E8E6E1) wyłącznie w: badge rekomendacji,
   numeracji kroków oraz wartości orientacyjnego kosztu. Reszta monochromatyczna.
   ========================================================================== */
.step4-panel {
  --step4-accent: #E8E6E1;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 8px 8px 40px 0;
  color: rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 55%),
    #0A0B0F;
  border-radius: var(--radius-md);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.step4-panel::-webkit-scrollbar {
  width: 6px;
}

.step4-panel::-webkit-scrollbar-track {
  background: transparent;
}

.step4-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.step4-panel::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

.step4-section__title {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
}

/* Sekcje bez „kafelkowego” glassmorphism – czysta powierzchnia, hierarchia przez spacing */
.step4-section,
.step4-visual,
.recommendation-card,
.price-card {
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
}

/* --- SEKCJA 1: Podgląd wizualny --- */
.step4-visual__canvas-wrap {
  width: 100%;
}

.step4-visual__canvas {
  width: 100%;
  display: block;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0A0B0F;
}

.step4-visual__img {
  width: 100%;
  max-height: 480px;
  display: block;
  object-fit: contain;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0A0B0F;
}

.step4-visual__neutral {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px;
}

.step4-visual__logo-only {
  max-width: 55%;
  max-height: 220px;
  object-fit: contain;
}

.step4-visual__empty {
  text-align: center;
  padding: 44px 24px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.step4-visual__empty-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* --- Generowanie wizualizacji AI (monochromatycznie, bez amber) --- */
.ai-viz {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-viz__beta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ai-viz__beta-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 2px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ai-viz__beta-note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
}

.ai-viz__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: flex-start;
}

.ai-viz__btn.btn--secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background-color: rgba(255, 255, 255, 0.04);
}

.ai-viz__btn.btn--secondary:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  background-color: rgba(255, 255, 255, 0.08);
}

.ai-viz__btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
}

.ai-viz__spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  animation: aiVizSpin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes aiVizSpin {
  to { transform: rotate(360deg); }
}

.ai-viz__label {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}

.ai-viz__image {
  width: 100%;
  max-height: 480px;
  display: block;
  object-fit: contain;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0A0B0F;
}

.ai-viz__error {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* --- SEKCJA 2: Spec sheet (jedna karta-tabela) --- */
.config-sheet {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  padding: 4px 22px;
}

.config-sheet__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.config-sheet__row:last-child {
  border-bottom: none;
}

.config-sheet__label {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.01em;
}

.config-sheet__value {
  text-align: right;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.45;
  word-break: break-word;
}

/* --- SEKCJA 3: Wykryte uwagi --- */
.issues-card {
  background: transparent;
}

.issues-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.issues-list__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.issues-list__item:last-child {
  border-bottom: none;
}

.issues-list__icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
}

.issues-card--complete {
  background: transparent;
  border: none;
  padding: 0;
}

.issues-card__complete {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.5;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
}

.issues-card__complete-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --- SEKCJA 4: Rekomendacja --- */
.recommendation-card {
  background: rgba(255, 255, 255, 0.02);
  border-top: 2px solid var(--step4-accent);
  border-radius: 0;
  padding: 28px 0 0;
}

.recommendation-card__header {
  margin-bottom: 18px;
}

.recommendation-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--step4-accent);
  background: transparent;
  border: none;
  padding: 0;
}

.recommendation-card__badge svg {
  flex-shrink: 0;
}

.recommendation-card__text {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 28px;
}

.recommendation-card__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: pret-step;
}

.recommendation-card__steps li {
  position: relative;
  padding-left: 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.55;
  counter-increment: pret-step;
}

.recommendation-card__steps li::before {
  content: counter(pret-step) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--step4-accent);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.recommendation-card__contact {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.recommendation-card__contact-prompt {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 8px;
  font-weight: 400;
}

.recommendation-card__contact-lines {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.55;
  margin: 0;
  font-weight: 400;
}

.recommendation-card__link {
  color: #ffffff;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  transition: text-decoration-color 0.2s ease;
}

.recommendation-card__link:hover {
  text-decoration-color: rgba(255, 255, 255, 0.8);
}

/* --- SEKCJA 5: Orientacyjny koszt --- */
.price-card {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.price-card .step4-section__title {
  margin-bottom: 12px;
}

.price-card__value {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--step4-accent);
  line-height: 1.15;
  margin: 0;
}

.price-card__disclaimer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
  margin: 14px 0 0;
  font-weight: 400;
}

@media (max-width: 900px) {
  .step4-panel {
    gap: 32px;
    padding: 0 0 32px;
  }

  .config-sheet__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .config-sheet__value {
    text-align: left;
  }

  .price-card__value {
    font-size: 28px;
  }
}

/* Utility Helpers */
.is-hidden {
  display: none !important;
}

/* ==========================================================================
   RESPONSYWNOŚĆ (Ekrany < 900px)
   Układ dwukolumnowy przechodzi w jednokolumnowy, prawa kolumna u góry/zwinie
   ========================================================================== */
@media (max-width: 900px) {
  body {
    padding: 12px;
    align-items: flex-start;
  }

  .app-container {
    min-height: auto;
  }

  .wizard {
    flex-direction: column-reverse; /* Prawa kolumna trafia nad lub pod wg uznania */
    min-height: auto;
  }

  .wizard__form-col {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
    padding: 24px 16px;
  }

  .wizard__visual-col {
    flex: 0 0 auto;
    max-width: 100%;
    padding: 24px 20px;
    min-height: 200px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PŁYWAJĄCY PANEL (DRAWER) ZESTAWIENIA PARAMETRÓW
   ========================================================================== */

.summary-drawer-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.summary-drawer-toggle:hover {
  transform: scale(1.05);
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(96, 165, 250, 0.5);
}

/* Gdy przycisk podsumowania jest widoczny, zarezerwuj miejsce w nagłówku edytora (krok 3),
   żeby nie zasłaniał badge „EDYCJA” / „ZATWIERDZONA”. */
.wizard__visual-col:has(.summary-drawer-toggle:not(.is-hidden)) .pos-editor-main__header {
  padding-right: 64px;
}

.summary-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 15, 0.55);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.summary-drawer-overlay:not(.is-hidden) {
  opacity: 1;
  visibility: visible;
}

.summary-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(430px, 92vw);
  height: 100vh;
  background: linear-gradient(135deg, #0b0f1a 0%, #12172a 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.45);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #ffffff;
}

.summary-drawer.is-open {
  transform: translateX(0);
}

.summary-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-drawer__heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-drawer__title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-drawer__title-accent {
  color: var(--color-accent);
}

.summary-drawer__subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.42);
  margin: 0;
}

.summary-drawer__close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.summary-drawer__close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transform: scale(1.05);
}

.summary-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* --- Grid kart drawera: 2 kolumny, karta featured na całą szerokość --- */
.summary-drawer__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: start;
}

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

.drawer-card {
  position: relative;
  grid-column: span 1;
  height: auto;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 16px 15px 17px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  animation: drawerCardIn 0.4s ease both;
}

.summary-drawer__grid .drawer-card:nth-child(1) { animation-delay: 0ms; }
.summary-drawer__grid .drawer-card:nth-child(2) { animation-delay: 60ms; }
.summary-drawer__grid .drawer-card:nth-child(3) { animation-delay: 120ms; }
.summary-drawer__grid .drawer-card:nth-child(4) { animation-delay: 180ms; }
.summary-drawer__grid .drawer-card:nth-child(5) { animation-delay: 240ms; }
.summary-drawer__grid .drawer-card:nth-child(6) { animation-delay: 300ms; }

@media (hover: hover) {
  .drawer-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
  }
}

.drawer-card--featured {
  grid-column: 1 / -1;
  padding: 18px 20px 19px 21px;
}

.drawer-card--empty {
  opacity: 0.55;
  border-top-style: dashed;
  border-right-style: dashed;
  border-bottom-style: dashed;
}

.drawer-card__status {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.drawer-card__status--ok {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.drawer-card__status--pending {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.drawer-card__icon {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  line-height: 0;
}

.drawer-card__label {
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.drawer-card__value {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  word-break: break-word;
}

.drawer-card__value--featured {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding-right: 70px;
}

.drawer-card__value--compact {
  font-size: 0.84rem;
  font-weight: 600;
}

.drawer-card__meta {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.48);
  font-weight: 500;
  margin-top: 5px;
  line-height: 1.4;
}

/* --- System kolorów accent per kategoria --- */
.drawer-card--indigo { border-left-color: rgba(99, 102, 241, 0.55); }
.drawer-card--indigo .drawer-card__icon,
.drawer-card--indigo .drawer-card__label { color: #818cf8; }
.drawer-card--indigo:hover { border-left-color: #818cf8; }

.drawer-card--violet { border-left-color: rgba(167, 139, 250, 0.5); }
.drawer-card--violet .drawer-card__icon,
.drawer-card--violet .drawer-card__label { color: #a78bfa; }
.drawer-card--violet:hover { border-left-color: #a78bfa; }

.drawer-card--terracotta { border-left-color: rgba(251, 146, 60, 0.5); }
.drawer-card--terracotta .drawer-card__icon,
.drawer-card--terracotta .drawer-card__label { color: #fb923c; }
.drawer-card--terracotta:hover { border-left-color: #fb923c; }

.drawer-card--amber { border-left-color: rgba(251, 191, 36, 0.5); }
.drawer-card--amber .drawer-card__icon,
.drawer-card--amber .drawer-card__label { color: #fbbf24; }
.drawer-card--amber:hover { border-left-color: #fbbf24; }

.drawer-card--magenta { border-left-color: rgba(244, 114, 182, 0.5); }
.drawer-card--magenta .drawer-card__icon,
.drawer-card--magenta .drawer-card__label { color: #f472b6; }
.drawer-card--magenta:hover { border-left-color: #f472b6; }

.drawer-card--teal { border-left-color: rgba(45, 212, 191, 0.5); }
.drawer-card--teal .drawer-card__icon,
.drawer-card--teal .drawer-card__label { color: #2dd4bf; }
.drawer-card--teal:hover { border-left-color: #2dd4bf; }

.drawer-card--empty .drawer-card__label {
  opacity: 0.65;
}

@media (max-width: 480px) {
  .summary-drawer__grid {
    grid-template-columns: 1fr;
  }

  .drawer-card--featured {
    grid-column: 1 / -1;
  }

  .drawer-card__value--featured {
    font-size: 1.3rem;
    padding-right: 60px;
  }
}

body.drawer-open {
  overflow: hidden;
}

/* ==========================================================================
   EDYTOR POZYCJONOWANIA LOGO – KROK 3
   Lewa kolumna: tylko krótka informacja. Pełny edytor renderowany w prawym,
   dużym panelu (patrz sekcja .pos-editor-main niżej).
   ========================================================================== */

.pos-editor3-mount {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  transition: grid-template-rows 0.3s ease, opacity 0.3s ease, margin-bottom 0.3s ease;
}

.pos-editor3-mount.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-bottom: 24px;
}

.pos-editor3-mount > .pos-editor-notice {
  min-height: 0;
  transform: translateY(-10px);
  transition: transform 0.3s ease;
}

.pos-editor3-mount.is-visible > .pos-editor-notice {
  transform: translateY(0);
}

.pos-editor-notice {
  border: 1.5px solid var(--color-accent);
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.pos-editor-notice__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin: 0 0 4px;
}

.pos-editor-notice__text {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   EDYTOR POZYCJONOWANIA LOGO – DUŻY PANEL (PRAWA KOLUMNA, KROK 3)
   Zajmuje tę samą przestrzeń, w której w krokach 1-2 wyświetla się galeria.
   ========================================================================== */

@keyframes visualPanelFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.visual-panel-fade {
  animation: visualPanelFadeIn 0.3s ease;
}

/* Placeholder w prawym panelu kroku 3, dopóki nie wgrano obu wymaganych plików – zastępuje
   galerię referencyjną, monochromatyczny, spójny z pos-editor-main i krokiem 4. */
.pos-editor-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  gap: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.pos-editor-placeholder__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
}

.pos-editor-placeholder__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.pos-editor-placeholder__text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.55;
  margin: 0;
  max-width: 380px;
}

.pos-editor-main {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pos-editor-main__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.pos-editor-main__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.pos-editor-main__title svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.55);
}

.pos-editor-main__badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.pos-editor-main__badge.is-done {
  background: #ffffff;
  color: #0A0B0F;
  border-color: #ffffff;
}

.pos-editor-main__canvas-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pos-editor-main__canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0A0B0F;
  touch-action: none;
}

.pos-editor-main__thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
  flex-shrink: 0;
}

.pos-editor-main__thumb {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: #1e293b;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.pos-editor-main__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pos-editor-main__thumb.is-active {
  border-color: #ffffff;
}

.pos-editor-main__thumb:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.pos-editor-main__controls {
  margin-top: 20px;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}

.pos-editor-main .range-field__label-row label {
  color: #e2e8f0;
}

.pos-editor-main .range-field__badge {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.pos-editor-main__hint {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
  text-align: center;
}

.pos-editor-main__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.pos-editor-main__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.pos-editor-main__btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e2e8f0;
}

.pos-editor-main__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.pos-editor-main__btn--primary {
  background: #ffffff;
  border: 1px solid #ffffff;
  color: #0A0B0F;
}

.pos-editor-main__btn--primary:hover {
  background: rgba(255, 255, 255, 0.85);
}

.pos-editor-main__locked-bar {
  margin-top: 20px;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.pos-editor-main__locked-bar span {
  flex: 1;
}

.pos-editor-main__locked-bar .pos-editor-main__btn--ghost {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 0.75rem;
}

/* Wariant "pominięto" – odróżniony przerywaną obwódką, wciąż monochromatyczny */
.pos-editor-main__locked-bar--warning {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.28);
  border-style: dashed;
  color: rgba(255, 255, 255, 0.75);
}

.pos-editor-main__badge.is-skipped {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Delikatna, ostrzegawcza podpowiedź nad linkiem "Pomiń pozycjonowanie logo" */
.pos-editor-main__skip-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.45;
  text-align: center;
  margin: 6px auto 0;
  max-width: 480px;
}

.pos-editor-main__skip-link {
  display: block;
  margin: 6px auto 0;
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.4);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.pos-editor-main__skip-link:hover {
  color: #e2e8f0;
}

/* Banner walidacji – widoczny tylko, gdy użytkownik próbuje przejść dalej bez
   zatwierdzenia/pominięcia pozycji logo (patrz showPosEditorValidationError w script.js) */
.pos-editor-main__validation-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.8438rem;
  font-weight: 600;
  line-height: 1.4;
  flex-shrink: 0;
}

.pos-editor-main__validation-error svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.pos-editor-main__validation-error.is-shaking {
  animation: posEditorErrorShake 0.4s ease;
}

@keyframes posEditorErrorShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* --- Pole suwaka (etykieta + badge z wartością + custom range) --- */
.range-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.range-field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.range-field__label-row label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-main);
}

.range-field__badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 2px 9px;
  border-radius: var(--radius-full);
}

/* --- Custom range slider (usuwa natywny wygląd przeglądarki) --- */
.range-slider {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--color-accent) 0%, var(--color-accent) var(--value, 50%), #e2e8f0 var(--value, 50%), #e2e8f0 100%);
  outline: none;
  cursor: pointer;
  margin: 4px 0;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--color-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.range-slider::-webkit-slider-thumb:hover,
.range-slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
}

.range-slider::-moz-range-track {
  background: transparent;
  height: 6px;
  border-radius: 999px;
}

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--color-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.range-slider::-moz-range-thumb:hover,
.range-slider::-moz-range-thumb:active {
  transform: scale(1.15);
}

.range-slider:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.range-slider:disabled::-webkit-slider-thumb {
  cursor: not-allowed;
}

.range-slider:disabled::-moz-range-thumb {
  cursor: not-allowed;
}

/* Edytor pozycjonowania (krok 3) jest monochromatyczny – nadpisujemy niebieski --color-accent
   na biel, zgodnie z estetyką kroku 4 (podsumowania). */
.pos-editor-main .range-slider {
  background: linear-gradient(to right, #ffffff 0%, #ffffff var(--value, 50%), rgba(255, 255, 255, 0.18) var(--value, 50%), rgba(255, 255, 255, 0.18) 100%);
}

.pos-editor-main .range-slider::-webkit-slider-thumb {
  border-color: #ffffff;
}

.pos-editor-main .range-slider::-moz-range-thumb {
  border-color: #ffffff;
}

@media (max-width: 900px) {
  .summary-drawer-toggle {
    top: 16px;
    right: 16px;
  }

  .wizard__visual-col {
    padding-bottom: 20px;
  }
}
