/* Luftfeuchte-Rechner Wizard — Comedes Branding */

:root {
  --lfr-primary: #1B4F9B;
  --lfr-accent:  #4A90D9;
  --lfr-light:   #EEF4FC;
  --lfr-border:  #C8DAEA;
  --lfr-surface: #F4F7FB;
  --lfr-text:    #1A2A3A;
  --lfr-muted:   #5D7A96;
  --lfr-radius:  10px;
}

/* ===================== WIZARD CONTAINER ===================== */

.lfr-wizard {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--lfr-text);
  box-sizing: border-box;
}

.lfr-wizard *,
.lfr-wizard *::before,
.lfr-wizard *::after {
  box-sizing: inherit;
}

/* ===================== STEP INDICATOR ===================== */

.lfr-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  gap: 0;
}

.lfr-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #D1DCE8;
  border: 2px solid #D1DCE8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--lfr-muted);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.lfr-step-dot.active {
  background: var(--lfr-primary);
  border-color: var(--lfr-primary);
  color: #fff;
}

.lfr-step-dot.done {
  background: var(--lfr-accent);
  border-color: var(--lfr-accent);
  color: #fff;
  font-size: 0;
}

.lfr-step-dot.done::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.lfr-step-line {
  flex: 1;
  height: 2px;
  background: #D1DCE8;
  max-width: 60px;
  transition: background 0.2s;
}

.lfr-step-line.done {
  background: var(--lfr-accent);
}

/* ===================== STEP HEADINGS ===================== */

.lfr-step-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--lfr-text);
  margin: 0 0 6px;
  line-height: 1.3;
}

.lfr-step-subtitle {
  font-size: 14px;
  color: var(--lfr-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.lfr-section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--lfr-text);
  margin: 20px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===================== INPUT GROUP ===================== */

.lfr-input-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lfr-label {
  font-size: 13px;
  color: var(--lfr-muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.lfr-input {
  border: 1.5px solid var(--lfr-border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--lfr-text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  appearance: none;
}

.lfr-input:focus {
  border-color: var(--lfr-primary);
}

.lfr-input.error {
  border-color: #D0021B;
}

.lfr-error-msg {
  font-size: 12px;
  color: #D0021B;
  margin-top: 4px;
  min-height: 16px;
  display: none;
}

.lfr-error-msg.visible {
  display: block;
}

/* ===================== GRIDS ===================== */

.lfr-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lfr-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lfr-grid-5 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===================== OPTION CARDS ===================== */

.lfr-option-card {
  border: 1.5px solid var(--lfr-border);
  border-radius: var(--lfr-radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.lfr-option-card:hover {
  border-color: var(--lfr-accent);
  background: var(--lfr-light);
}

.lfr-option-card.selected {
  border: 2px solid var(--lfr-primary);
  background: var(--lfr-light);
}

.lfr-option-icon {
  width: 40px;
  height: 40px;
  background: var(--lfr-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lfr-primary);
  flex-shrink: 0;
}

.lfr-option-icon svg {
  color: var(--lfr-primary);
}

.lfr-option-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--lfr-text);
  line-height: 1.3;
}

/* ===================== NAVIGATION ===================== */

.lfr-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}

.lfr-nav-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lfr-btn-primary,
.lfr-btn-secondary,
.lfr-btn-skip {
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.lfr-btn-primary {
  background: var(--lfr-primary);
  color: #fff;
  border: none;
}

.lfr-btn-primary:hover:not(:disabled) {
  background: var(--lfr-accent);
}

.lfr-btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lfr-btn-secondary {
  background: transparent;
  border: 1.5px solid var(--lfr-primary);
  color: var(--lfr-primary);
}

.lfr-btn-secondary:hover {
  background: var(--lfr-light);
}

.lfr-btn-skip {
  background: transparent;
  border: none;
  color: var(--lfr-muted);
  padding: 10px 12px;
}

.lfr-btn-skip:hover {
  color: var(--lfr-text);
  text-decoration: underline;
}

/* ===================== OPTIONAL BADGE ===================== */

.lfr-optional-badge {
  display: inline-block;
  background: var(--lfr-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

/* ===================== LOADING SPINNER ===================== */

.lfr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 16px;
}

.lfr-loading-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid var(--lfr-light);
  border-top-color: var(--lfr-primary);
  animation: lfr-spin 0.8s linear infinite;
}

@keyframes lfr-spin {
  to { transform: rotate(360deg); }
}

.lfr-loading-text {
  font-size: 14px;
  color: var(--lfr-muted);
}

/* ===================== RESULT LAYOUT ===================== */

.lfr-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.lfr-result-header {
  margin-bottom: 20px;
}

.lfr-result-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--lfr-text);
  margin: 0 0 4px;
}

.lfr-result-subtitle {
  font-size: 13px;
  color: var(--lfr-muted);
  margin: 0;
}

/* Device card */

.lfr-device-card {
  border: 2px solid var(--lfr-primary);
  border-radius: var(--lfr-radius);
  padding: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lfr-device-img {
  max-width: 180px;
  max-height: 180px;
  width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}

.lfr-device-img-placeholder {
  width: 120px;
  height: 120px;
  background: var(--lfr-surface);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  color: var(--lfr-muted);
}

.lfr-device-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--lfr-primary);
  margin: 0;
}

.lfr-device-power {
  font-size: 13px;
  color: var(--lfr-muted);
  margin: 0;
}

.lfr-device-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--lfr-text);
  margin: 4px 0;
}

.lfr-btn-shop {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--lfr-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  margin-top: auto;
}

.lfr-btn-shop:hover {
  background: var(--lfr-accent);
  color: #fff;
  text-decoration: none;
}

/* Values table */

.lfr-values-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid var(--lfr-border);
  border-radius: 8px;
  overflow: hidden;
}

.lfr-values-table th {
  background: var(--lfr-surface);
  color: var(--lfr-muted);
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lfr-values-table td {
  padding: 9px 12px;
  color: var(--lfr-text);
}

.lfr-values-table tr:nth-child(even) td {
  background: var(--lfr-surface);
}

.lfr-values-table tr:nth-child(odd) td {
  background: #fff;
}

.lfr-values-table td:last-child {
  font-weight: 600;
  text-align: right;
}

/* Lueftung box */

.lfr-lueftung-box {
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.lfr-lueftung-box.empfohlen {
  background: #EDF7ED;
  border: 1px solid #A8D5A8;
  color: #2A6B2A;
}

.lfr-lueftung-box.nicht-empfohlen {
  background: #FFFBEA;
  border: 1px solid #F0D070;
  color: #7A5F00;
}

.lfr-lueftung-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.lfr-lueftung-text {
  line-height: 1.5;
}

/* Alternatives */

.lfr-alternatives-section {
  margin-top: 24px;
}

.lfr-alternatives-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--lfr-text);
  margin: 0 0 12px;
}

.lfr-alternatives {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.lfr-alt-card {
  border: 1px solid var(--lfr-border);
  border-radius: var(--lfr-radius);
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lfr-alt-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--lfr-text);
  margin: 0;
}

.lfr-alt-power {
  font-size: 12px;
  color: var(--lfr-muted);
  margin: 0;
}

.lfr-alt-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--lfr-text);
  margin: 2px 0;
}

.lfr-alt-link {
  font-size: 12px;
  color: var(--lfr-primary);
  text-decoration: none;
  font-weight: 600;
  margin-top: auto;
}

.lfr-alt-link:hover {
  text-decoration: underline;
}

/* Error state */

.lfr-api-error {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-radius: 8px;
  padding: 16px 20px;
  color: #991B1B;
  font-size: 14px;
  text-align: center;
}

/* ===================== STEP CONTENT ===================== */

.lfr-step-content {
  display: none;
}

.lfr-step-content.active {
  display: block;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 600px) {
  .lfr-step-title {
    font-size: 17px;
  }

  .lfr-grid-2 {
    grid-template-columns: 1fr;
  }

  .lfr-grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .lfr-grid-5 {
    grid-template-columns: 1fr 1fr;
  }

  .lfr-result-grid {
    grid-template-columns: 1fr;
  }

  .lfr-alternatives {
    grid-template-columns: 1fr;
  }

  .lfr-step-line {
    max-width: 28px;
  }

  .lfr-step-dot {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }
}
