/* Event configurator – layout and global */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --color-bg: #1a1625;
  --color-surface: #252030;
  --color-surface-2: #2e2938;
  --color-text: #f5f0f7;
  --color-text-muted: #a89bb5;
  --color-accent: #e8b86d;
  --color-accent-dim: #c49a4a;
  --color-receipt-bg: #faf8f3;
  --color-receipt-text: #2d2a26;
  --color-receipt-border: #e5dfd4;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

/* Configurator layout */
.configurator__layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 100vh;
  gap: 0;
}

@media (max-width: 900px) {
  .configurator__layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
}

.configurator__receipt-wrap {
  background: var(--color-surface);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: sticky;
  top: 0;
  max-height: 100vh;
}

/* Mobile: receipt fixed at bottom of screen so prices are always visible */
@media (max-width: 900px) {
  .configurator__receipt-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    max-height: 45vh;
    padding: 0.75rem 1rem;
    z-index: 100;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
  }

  .configurator__layout {
    padding-bottom: min(380px, 50vh);
  }
}

.configurator__main {
  padding: 2rem 2.5rem 3rem;
  max-width: 720px;
  margin: 0 auto;
}


@media (max-width: 600px) {
  .configurator__main {
    padding: 1.25rem 1rem 2rem;
  }
}

/* Receipt – always visible, receipt-style */
.receipt {
  width: 100%;
  max-width: 320px;
  background: var(--color-receipt-bg);
  color: var(--color-receipt-text);
  border: 1px solid var(--color-receipt-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

@media (max-width: 900px) {
  .configurator__receipt-wrap .receipt {
    max-width: none;
  }
}

.receipt__header {
  padding: 1.25rem 1.25rem 0.5rem;
  border-bottom: 2px dashed var(--color-receipt-border);
  text-align: center;
}

.receipt__title {
  display: block;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.receipt__subtitle {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

.receipt__body {
  padding: 1rem 1.25rem 1.25rem;
}

.receipt__line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

.receipt__line--base {
  font-weight: 600;
  padding-bottom: 0.5rem;
}

.receipt__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt__value {
  font-family: var(--font-mono);
  font-weight: 500;
  flex-shrink: 0;
}

.receipt__value--total {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-accent-dim);
}

.receipt__lines .receipt__line {
  font-size: 0.85rem;
  padding: 0.25rem 0;
}

.receipt__divider {
  height: 1px;
  background: var(--color-receipt-border);
  margin: 0.5rem 0 0.4rem;
}

.receipt__line--total {
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}

.receipt__footer {
  padding: 0.6rem 1.25rem;
  background: #f0ebe2;
  border-top: 1px solid var(--color-receipt-border);
  text-align: center;
}

.receipt__footer-text {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

/* Progress dots */
.configurator__progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.configurator__progress-dot {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 2px solid var(--color-surface-2);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.configurator__progress-dot:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.configurator__progress-dot--active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
}

.configurator__progress-dot-inner {
  line-height: 1;
}

/* Step visual – full-size background image with gradient blend */
.configurator__visual-wrap {
  margin-bottom: 2rem;
  margin-left: -2.5rem;
  margin-right: -2.5rem;
}

@media (max-width: 600px) {
  .configurator__visual-wrap {
    margin-left: -1rem;
    margin-right: -1rem;
  }
}

.step-visual {
  --step-bg-image: none;
  position: relative;
  min-height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (min-width: 700px) {
  .step-visual {
    min-height: 380px;
  }
}

@media (min-width: 900px) {
  .step-visual {
    min-height: 420px;
  }
}

.step-visual__bg {
  position: absolute;
  inset: 0;
  background-image: var(--step-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.4s ease;
}

.step-visual__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 22, 37, 0.75) 0%,
    rgba(26, 22, 37, 0.5) 40%,
    rgba(26, 22, 37, 0.85) 100%
  );
  pointer-events: none;
}

.step-visual__content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.5rem;
  max-width: 90%;
}

.step-visual__icon {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.step-visual__title {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.step-visual__number {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Step content (forms and choices) */
.configurator__steps {
  position: relative;
  min-height: 200px;
}

.configurator__step {
  display: none;
  animation: stepIn 0.25s ease-out;
}

.configurator__step--active {
  display: block;
}

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

.step-content__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step-content__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.step-content__label {
  font-weight: 600;
  font-size: 0.95rem;
}

.step-content__input {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-surface-2);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.step-content__input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.step-content__input--number {
  max-width: 140px;
}

.step-content__choices {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.step-content__choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--color-surface);
  border: 2px solid var(--color-surface-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.step-content__choice:hover {
  border-color: var(--color-accent-dim);
  background: var(--color-surface-2);
}

.step-content__choice input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--color-accent);
}

.step-content__choice-label {
  flex: 1;
  font-weight: 500;
}

.step-content__choice-price {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-accent);
}

/* Navigation */
.configurator__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-surface-2);
}

.configurator__nav-btn {
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.configurator__nav-btn:hover:not(:disabled) {
  background: var(--color-accent);
  color: var(--color-bg);
}

.configurator__nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--color-surface-2);
  color: var(--color-text-muted);
}

/* Hide configurator data from view */
#configurator-data {
  display: none;
}
