/* ── Color Selector — cs- prefix ─────────────────────────────────────────── */

/* ── Animations ── */
@keyframes csReveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ── Root ── */
.cs-root {
  margin-top: 2px;
  font-family: var(--font, 'Instrument Sans', sans-serif);
}

.cs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

.cs-steps-col {
  display: grid;
  gap: 0.85rem;
}

/* ── Step card ── */
.cs-step {
  border: 1.5px solid var(--border, #DCE6F0);
  border-radius: 16px;
  padding: 1.1rem 1.1rem 1.2rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(26,46,87,0.06);
  animation: csReveal 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cs-step.cs-hidden { display: none !important; }

/* ── Accordion: collapsed state ── */
.cs-step.cs-collapsed {
  cursor: pointer;
  padding-bottom: 1.1rem;
}

.cs-step.cs-collapsed:hover {
  border-color: var(--sky, #407ED1);
}

.cs-step.cs-collapsed .cs-step-body {
  display: none;
}

.cs-step.cs-collapsed .cs-step-header {
  margin-bottom: 0;
}

.cs-step.cs-collapsed .cs-step-subtitle {
  display: none;
}

.cs-step-summary-line {
  display: none;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sky, #407ED1);
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.cs-step.cs-collapsed .cs-step-summary-line {
  display: flex;
}

.cs-step-number {
  transition: background 0.2s ease;
}

.cs-step.cs-collapsed .cs-step-number {
  background: var(--sky, #407ED1);
  font-size: 0.7rem;
}

.cs-step-chevron {
  display: none;
  color: var(--steel, #5B6B7A);
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.cs-step.cs-collapsed .cs-step-chevron {
  display: block;
  transform: rotate(-90deg);
}

.cs-step-header-text {
  flex: 1;
  min-width: 0;
}

/* ── Inline summary dots (primary / palette) ── */
.cs-summary-dot-inline {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
}

.cs-step-header {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}

.cs-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sky, #407ED1);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  flex: 0 0 auto;
  letter-spacing: -0.01em;
}

.cs-step-header h2 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy, #1A2E57);
  line-height: 1.2;
}

.cs-step-header p {
  margin: 0;
  color: var(--steel, #5B6B7A);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* ── Option grid ── */
.cs-option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.cs-option-grid.cs-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.cs-color-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ── Option cards ── */
.cs-option-card {
  border: 1.5px solid var(--border, #DCE6F0);
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.2rem;
  position: relative;
  overflow: hidden;
}

.cs-option-card:hover {
  border-color: var(--sky, #407ED1);
  box-shadow: 0 4px 16px rgba(64,126,209,0.12);
  transform: translateY(-1px);
}

.cs-option-card.cs-active {
  border-color: var(--sky, #407ED1);
  background: #f0f6ff;
  box-shadow: 0 0 0 3px rgba(64,126,209,0.12);
}


/* ── Featured start card (Empfohlen) ── */
.cs-option-card[data-cs-start="style"] {
  border-color: var(--navy, #1A2E57);
  background: #f7f9fc;
}

.cs-option-card[data-cs-start="style"]:hover {
  border-color: var(--sky, #407ED1);
  background: #f0f6ff;
}

.cs-option-card[data-cs-start="style"].cs-active {
  border-color: var(--sky, #407ED1);
  background: #f0f6ff;
}

/* ── Kicker badge ── */
.cs-option-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: var(--ice, #E0EDF9);
  color: var(--navy, #1A2E57);
  font-size: 0.7rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  letter-spacing: 0.01em;
}

.cs-option-card[data-cs-start="style"] .cs-option-kicker {
  background: var(--navy, #1A2E57);
  color: #fff;
}

.cs-option-card[data-cs-start="style"].cs-active .cs-option-kicker {
  background: var(--sky, #407ED1);
  color: #fff;
}

.cs-option-title {
  display: block;
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1.2;
  color: var(--navy, #1A2E57);
}

.cs-option-text {
  display: block;
  font-size: 0.78rem;
  color: var(--steel, #5B6B7A);
  line-height: 1.4;
}

/* ── Colour swatch cards ── */
.cs-color-swatch-card {
  align-items: center;
  gap: 0.45rem;
}

.cs-swatch {
  display: block;
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.09);
  flex-shrink: 0;
}

/* ── Mini-site preview inside palette cards ── */
.cs-mini-site {
  display: block;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 9px;
  overflow: hidden;
  width: 100%;
}

.cs-mini-nav {
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.4rem;
}

.cs-mini-logo, .cs-mini-menu,
.cs-mini-title, .cs-mini-text,
.cs-mini-button, .cs-mini-line {
  display: block;
  border-radius: 999px;
}

.cs-mini-logo  { width: 28px; height: 3px; }
.cs-mini-menu  { width: 16px; height: 3px; }

.cs-mini-hero {
  display: block;
  padding: 0.4rem 0.4rem;
}

.cs-mini-title  { width: 68%; height: 5px; margin-bottom: 0.25rem; }
.cs-mini-text   { width: 88%; height: 3px; margin-bottom: 0.4rem; opacity: 0.7; }
.cs-mini-button { width: 36px; height: 11px; }

.cs-mini-content {
  display: block;
  padding: 0.38rem 0.4rem;
}

.cs-mini-line { width: 26px; height: 3px; margin-bottom: 0.25rem; }

.cs-mini-copy { display: grid; gap: 0.16rem; }
.cs-mini-copy span { display: block; height: 2.5px; border-radius: 999px; opacity: 0.5; }
.cs-mini-copy span:first-child { width: 80%; }
.cs-mini-copy span:last-child  { width: 52%; }

/* ── Custom colour inputs ── */
.cs-custom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.cs-field label {
  display: block;
  margin-bottom: 0.28rem;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--navy, #1A2E57);
}

.cs-color-input {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cs-color-input input[type="color"] {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1.5px solid var(--border, #DCE6F0);
  border-radius: 10px;
  background: #fff;
  padding: 0.15rem;
  cursor: pointer;
}

.cs-color-input input[type="text"] {
  width: 100%;
  border: 1.5px solid var(--border, #DCE6F0);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--navy, #1A2E57);
}

.cs-color-input input:focus {
  outline: none;
  border-color: var(--sky, #407ED1);
  box-shadow: 0 0 0 3px rgba(64,126,209,0.12);
}

.cs-hint {
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: var(--ice, #E0EDF9);
  color: var(--steel, #5B6B7A);
  font-size: 0.8rem;
  line-height: 1.45;
}

.cs-status-box {
  display: none;
  margin-top: 0.65rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #fef3c7;
  color: #78350f;
  font-size: 0.8rem;
  line-height: 1.45;
}

/* ── Preview column ── */
.cs-preview-col {
  position: static;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.cs-preview-col.cs-preview--teaser,
.cs-preview-col.cs-preview--active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  animation: csPreviewReveal 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Teaser: hide full card, show teaser block */
.cs-preview-teaser { display: none; }
.cs-preview-col.cs-preview--teaser .cs-preview-teaser { display: block; }
.cs-preview-col.cs-preview--teaser .cs-preview-card   { display: none; }

/* Full preview: hide teaser, animate card in */
.cs-preview-col.cs-preview--active .cs-preview-teaser { display: none; }
.cs-preview-col.cs-preview--active .cs-preview-card {
  animation: csCardReveal 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes csCardReveal {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Teaser card ── */
.cs-preview-teaser {
  border: 1.5px solid var(--border, #DCE6F0);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 20px rgba(26,46,87,0.08);
}

.cs-teaser-strip {
  display: flex;
  height: 52px;
  width: 100%;
}

.cs-teaser-strip span {
  flex: 1;
  display: block;
}

.cs-teaser-body {
  padding: 1rem 1rem 1.1rem;
  text-align: center;
}

.cs-teaser-label {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--navy, #1A2E57);
  line-height: 1.2;
}

.cs-teaser-hint {
  margin: 0 0 0.85rem;
  font-size: 0.76rem;
  color: var(--steel, #5B6B7A);
  line-height: 1.4;
}

.cs-teaser-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--sky, #407ED1);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}

.cs-teaser-cta:hover {
  background: #2f6bbf;
  transform: translateY(-1px);
}

.cs-preview-card {
  border: 1.5px solid var(--border, #DCE6F0);
  border-radius: 16px;
  padding: 0.9rem;
  background: #fff;
  box-shadow: 0 4px 20px rgba(26,46,87,0.08);
  overflow: hidden;
}

.cs-preview-label {
  margin: 0 0 0.2rem;
  font-weight: 900;
  color: var(--steel, #5B6B7A);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cs-preview-hint {
  margin: 0 0 0.75rem;
  color: var(--steel, #5B6B7A);
  font-size: 0.76rem;
  line-height: 1.4;
}

/* ── Browser chrome ── */
.cs-browser-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.65rem;
  background: #f1f3f5;
  border-radius: 10px 10px 0 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.cs-browser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cs-browser-dot--red    { background: #ff5f57; }
.cs-browser-dot--yellow { background: #ffbd2e; }
.cs-browser-dot--green  { background: #28c840; }

.cs-browser-url {
  flex: 1;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 5px;
  padding: 0.18rem 0.5rem;
  font-size: 0.68rem;
  color: var(--steel, #5B6B7A);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Website preview ── */
.cs-website-preview {
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid rgba(0,0,0,0.07);
  border-top: none;
  transition: border-top-color 0.3s ease;
}

.cs-pv-nav {
  padding: 0.6rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: background 0.3s ease, color 0.3s ease;
}

.cs-pv-hero {
  padding: 0.85rem 0.75rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.cs-pv-hero h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  transition: color 0.3s ease, border-left-color 0.3s ease;
}

.cs-pv-hero p {
  margin: 0 0 0.6rem;
  font-size: 0.74rem;
  line-height: 1.4;
}

.cs-pv-hero button {
  border: 1.5px solid #d1d5db;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: default;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.cs-pv-content {
  padding: 0.75rem;
  font-size: 0.74rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.cs-pv-line {
  width: 36px;
  height: 3px;
  border-radius: 999px;
  margin-bottom: 0.5rem;
  transition: background 0.3s ease;
}

.cs-pv-content h4 {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 800;
  transition: color 0.3s ease;
}

.cs-pv-content p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.4;
}

/* ── Palette selected summary ── */
.cs-summary {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border, #DCE6F0);
  display: none;
}

.cs-summary.cs-summary--visible {
  display: block;
}

.cs-summary h3 {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--navy, #1A2E57);
}

.cs-summary-swatches { display: grid; gap: 0.35rem; }

.cs-summary-swatch {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0.45rem;
  align-items: center;
  padding: 0.38rem 0.45rem;
  border: 1px solid var(--border, #DCE6F0);
  border-radius: 9px;
  background: #fafbfc;
}

.cs-summary-dot {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(0,0,0,0.09);
  display: block;
  flex-shrink: 0;
}

.cs-summary-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--steel, #5B6B7A);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cs-summary-value {
  display: block;
  font-size: 0.78rem;
  color: var(--navy, #1A2E57);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ── Responsive ── */

/* On wide screens the preview is moved to <body> via JS to escape ancestor transforms */
body > .cs-preview-col {
  position: fixed;
  left: calc(50% + 360px);
  width: 300px;
  overflow-y: auto;
  z-index: 100;
}

@media (max-width: 600px) {
  .cs-option-grid {
    grid-template-columns: 1fr;
  }

  .cs-color-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cs-option-grid:has([data-cs-start]) {
    grid-template-columns: 1fr;
  }

  .cs-custom-grid {
    grid-template-columns: 1fr 1fr;
  }
}
