/* ==========================================================================
   Safe Exam Browser (SEB) Universal Konfigurator – Stylesheet
   Version 1.0 — Lern mit Ben Design System
   ========================================================================== */

:root {
  --lmb-bg-dark: #0a0f1a;
  --lmb-bg-surface: #141b2d;
  --lmb-bg-surface-hover: #1a2338;
  --lmb-bg-card: rgba(20, 27, 45, 0.85);
  --lmb-border: rgba(255, 255, 255, 0.08);
  --lmb-border-focus: rgba(99, 102, 241, 0.5);
  --lmb-primary: #6366f1;
  --lmb-primary-hover: #4f46e5;
  --lmb-secondary: #10b981;
  --lmb-accent: #8b5cf6;
  --lmb-danger: #ef4444;
  --lmb-warning: #f59e0b;
  --lmb-text-main: #f8fafc;
  --lmb-text-muted: #94a3b8;
  --lmb-grad-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
  --lmb-shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  --lmb-shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  --lmb-radius-sm: 6px;
  --lmb-radius-md: 12px;
  --lmb-radius-lg: 20px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--lmb-bg-dark);
  color: var(--lmb-text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* ===== Header & Navigation ===== */
.app-header {
  background: rgba(10, 15, 26, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--lmb-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 0;
}

.header-container {
  width: 92%;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--lmb-text-main);
}

.header-brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--lmb-bg-surface);
  padding: 2px;
}

.brand-text {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--lmb-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--lmb-text-main);
}

/* ===== Main Container ===== */
.main-wrapper {
  flex: 1;
  width: 92%;
  max-width: 1300px;
  margin: 2rem auto 4rem;
}

/* ===== Hero Section ===== */
.hero-section {
  margin-bottom: 2.5rem;
  text-align: left;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 40%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.6rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--lmb-text-muted);
  max-width: 800px;
}

/* ===== 2-Column Grid Layout ===== */
.configurator-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .configurator-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Cards & Panels ===== */
.panel-card {
  background: var(--lmb-bg-card);
  border: 1px solid var(--lmb-border);
  border-radius: var(--lmb-radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--lmb-shadow-card);
  backdrop-filter: blur(16px);
}

.card-header {
  margin-bottom: 1.25rem;
}

.card-step-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lmb-primary);
  display: block;
  margin-bottom: 0.2rem;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--lmb-text-main);
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--lmb-text-muted);
  margin-top: 0.2rem;
}

/* ===== Preset Picker ===== */
.preset-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 520px) {
  .preset-picker {
    grid-template-columns: repeat(2, 1fr);
  }
}

.preset-btn {
  background: var(--lmb-bg-surface);
  border: 1px solid var(--lmb-border);
  color: var(--lmb-text-main);
  padding: 0.75rem 0.6rem;
  border-radius: var(--lmb-radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  text-align: center;
}

/* Icon-Kachel je Vorlage; Knopf-Akzent in der Farbe des jeweiligen Logos */
.preset-btn {
  --preset-accent: #818cf8;
}
.preset-btn[data-preset="ms-forms"] { --preset-accent: #29cbdc; }
.preset-btn[data-preset="google-forms"] { --preset-accent: #9575cd; }
.preset-btn[data-preset="lms"] { --preset-accent: #f7922d; }
.preset-btn[data-preset="lmb"] { --preset-accent: #facc15; }
.preset-btn[data-preset="custom"] { --preset-accent: #60a5fa; }

/* Heller Kachelgrund: das Moodle-Logo hat einen dunkelgrauen Hut, der sonst verschwindet. */
.preset-btn .icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--preset-accent) 70%, #0f172a);
  background: color-mix(in srgb, var(--preset-accent) 10%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--preset-accent) 40%, transparent);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.preset-btn .icon svg,
.preset-btn .icon img {
  display: block;
}

.preset-btn .icon-logo img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.preset-btn .icon-ben img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.preset-btn:hover {
  background: var(--lmb-bg-surface-hover);
  border-color: color-mix(in srgb, var(--preset-accent) 55%, transparent);
}

.preset-btn:hover .icon {
  transform: translateY(-1px);
}

.preset-btn.active {
  color: #ffffff;
  background: color-mix(in srgb, var(--preset-accent) 14%, transparent);
  border-color: var(--preset-accent);
  box-shadow: 0 0 15px color-mix(in srgb, var(--preset-accent) 35%, transparent);
}

.preset-btn.active .icon {
  border-color: var(--preset-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--preset-accent) 35%, transparent);
}


@media (prefers-reduced-motion: reduce) {
  .preset-btn:hover .icon {
    transform: none;
  }
}


/* ===== Forms & Fields ===== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-group.grid-2 {
    grid-template-columns: 1fr;
  }
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--lmb-text-main);
}

.form-label .optional {
  font-weight: 400;
  color: var(--lmb-text-muted);
  font-size: 0.8rem;
}

.input-control,
.select-control,
.textarea-control {
  width: 100%;
  background: rgba(10, 15, 26, 0.7);
  border: 1px solid var(--lmb-border);
  border-radius: var(--lmb-radius-sm);
  color: var(--lmb-text-main);
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-control:focus,
.select-control:focus,
.textarea-control:focus {
  outline: none;
  border-color: var(--lmb-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-control::placeholder {
  color: rgba(148, 163, 184, 0.4);
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
}

.input-with-button .input-control {
  flex: 1;
}

.btn-secondary-sm {
  background: var(--lmb-bg-surface);
  border: 1px solid var(--lmb-border);
  color: var(--lmb-text-main);
  padding: 0 0.85rem;
  border-radius: var(--lmb-radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-secondary-sm:hover {
  background: var(--lmb-bg-surface-hover);
  border-color: var(--lmb-primary);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--lmb-text-muted);
  margin-top: 0.35rem;
}

/* ===== Option Switches & Checkboxes ===== */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

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

.option-checkbox-card {
  background: rgba(10, 15, 26, 0.5);
  border: 1px solid var(--lmb-border);
  border-radius: var(--lmb-radius-md);
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-checkbox-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(10, 15, 26, 0.8);
}

.option-checkbox-card input[type="checkbox"] {
  accent-color: var(--lmb-primary);
  width: 17px;
  height: 17px;
  margin-top: 2px;
  cursor: pointer;
}

.option-info {
  display: flex;
  flex-direction: column;
}

.option-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lmb-text-main);
}

.option-desc {
  font-size: 0.72rem;
  color: var(--lmb-text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

/* ===== Whitelist Manager ===== */
.whitelist-container {
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid var(--lmb-border);
  border-radius: var(--lmb-radius-md);
  padding: 0.85rem;
}

.whitelist-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.whitelist-item {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 100px;
  padding: 0.25rem 0.65rem 0.25rem 0.75rem;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.whitelist-item code {
  color: #c7d2fe;
  font-family: monospace;
}

.btn-remove-domain {
  background: none;
  border: none;
  color: var(--lmb-text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.btn-remove-domain:hover {
  color: var(--lmb-danger);
}

/* ===== Output & Export Panel (Right Column) ===== */
.sticky-output-panel {
  position: sticky;
  top: 5rem;
}

.action-card {
  background: linear-gradient(145deg, rgba(20, 27, 45, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), var(--lmb-shadow-glow);
}

.btn-primary-large {
  width: 100%;
  background: var(--lmb-grad-primary);
  border: none;
  color: #ffffff;
  padding: 0.9rem 1.25rem;
  border-radius: var(--lmb-radius-md);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  transition: all 0.2s ease;
  margin-bottom: 1.25rem;
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

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

.export-grid-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.btn-action-outline {
  background: var(--lmb-bg-surface);
  border: 1px solid var(--lmb-border);
  color: var(--lmb-text-main);
  padding: 0.65rem 0.8rem;
  border-radius: var(--lmb-radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-action-outline:hover {
  background: var(--lmb-bg-surface-hover);
  border-color: var(--lmb-primary);
}

/* ===== QR-Code Preview Card ===== */
.qr-preview-box {
  background: #ffffff;
  padding: 1rem;
  border-radius: var(--lmb-radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1rem auto;
  max-width: 220px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.qr-code-container svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.qr-note {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.4rem;
}

/* ===== XML Code Accordion ===== */
.xml-accordion {
  border-top: 1px solid var(--lmb-border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.xml-accordion summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lmb-text-muted);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.xml-accordion summary:hover {
  color: var(--lmb-text-main);
}

.xml-code-wrapper {
  margin-top: 0.75rem;
  position: relative;
}

.xml-code-wrapper pre {
  background: #080c16;
  border: 1px solid var(--lmb-border);
  border-radius: var(--lmb-radius-sm);
  padding: 1rem;
  font-size: 0.75rem;
  font-family: 'Menlo', 'Consolas', monospace;
  color: #cbd5e1;
  max-height: 220px;
  overflow-y: auto;
}

/* ===== FAQ & Guide Section ===== */
.guide-section {
  margin-top: 4rem;
  border-top: 1px solid var(--lmb-border);
  padding-top: 3rem;
}

.guide-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.guide-card {
  background: var(--lmb-bg-card);
  border: 1px solid var(--lmb-border);
  border-radius: var(--lmb-radius-md);
  padding: 1.5rem;
}

.guide-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #a5b4fc;
}

.guide-card p {
  font-size: 0.875rem;
  color: var(--lmb-text-muted);
  line-height: 1.6;
}

/* ===== Toast Notification ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background: #065f46;
  border-color: #059669;
}

/* ==========================================================================
   Druck-Layout: Dozenten-Spickzettel (A4 Format)
   ========================================================================== */
.print-only {
  display: none;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-family: Arial, sans-serif !important;
  }

  .app-header,
  .hero-section,
  .configurator-grid,
  .guide-section,
  .lmb-footer,
  .dyslexia-toggle,
  .toast {
    display: none !important;
  }

  .print-only {
    display: block !important;
    padding: 1.5cm;
    max-width: 210mm;
    margin: 0 auto;
  }

  .print-header {
    border-bottom: 2px solid #000000;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  .print-header h1 {
    font-size: 1.8rem;
    color: #000000;
    margin-bottom: 0.2rem;
  }

  .print-header p {
    color: #555555;
    font-size: 0.9rem;
  }

  .print-section {
    margin-bottom: 1.5rem;
  }

  .print-section h2 {
    font-size: 1.1rem;
    border-bottom: 1px solid #cccccc;
    padding-bottom: 0.3rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .print-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .print-box {
    border: 1px solid #000000;
    padding: 1rem;
    border-radius: 4px;
    background: #fafafa;
  }

  .print-box .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #555555;
    font-weight: bold;
    display: block;
    margin-bottom: 0.25rem;
  }

  .print-box .value-large {
    font-size: 1.4rem;
    font-family: monospace;
    font-weight: bold;
    color: #000000;
    letter-spacing: 0.05em;
  }

  .print-qr-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px dashed #666666;
    padding: 1rem;
    border-radius: 4px;
  }

  .print-qr-code svg {
    width: 130px;
    height: 130px;
  }

  .print-instructions ol {
    margin-left: 1.25rem;
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .print-footer {
    margin-top: 2rem;
    border-top: 1px solid #dddddd;
    padding-top: 0.75rem;
    font-size: 0.75rem;
    color: #777777;
    display: flex;
    justify-content: space-between;
  }
}

/* ==========================================================================
   Ergänzungen v2 – Checkliste, Callouts, Whitelist-Tags, Hilfselemente
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Callouts (Hinweisboxen im Formular) ===== */
.callout {
  border-radius: var(--lmb-radius-md);
  padding: 0.75rem 0.9rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--lmb-text-muted);
  margin-bottom: 1rem;
  border: 1px solid var(--lmb-border);
  background: rgba(10, 15, 26, 0.5);
}

.callout strong {
  color: var(--lmb-text-main);
}

.callout code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.78rem;
  background: rgba(99, 102, 241, 0.14);
  border-radius: 4px;
  padding: 1px 5px;
  color: #c7d2fe;
}

.callout-info {
  border-left: 3px solid var(--lmb-primary);
}

.callout-warn {
  border-left: 3px solid var(--lmb-warning);
  background: rgba(245, 158, 11, 0.07);
}

/* ===== Live-Checkliste im Export-Panel ===== */
.validation-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.validation-list:empty {
  display: none;
}

.validation-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 0.45rem 0.6rem;
  border-radius: var(--lmb-radius-sm);
  border: 1px solid var(--lmb-border);
  background: rgba(10, 15, 26, 0.5);
  color: var(--lmb-text-muted);
}

.validation-icon {
  flex-shrink: 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.validation-item.is-error {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.09);
  color: #fecaca;
}

.validation-item.is-warn {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
  color: #fde68a;
}

.validation-item.is-ok {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.07);
  color: #a7f3d0;
}

.btn-primary-large.has-error {
  filter: grayscale(0.35);
}

/* ===== Whitelist-Ergänzungen ===== */
.domain-tag {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  border-radius: 100px;
  padding: 1px 6px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.domain-tag.is-preset {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

.domain-tag.is-custom {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.whitelist-empty {
  font-size: 0.8rem;
  color: var(--lmb-warning);
  padding: 0.35rem 0;
}

.whitelist-footer {
  margin-top: 0.6rem;
  display: flex;
  justify-content: flex-end;
}

/* ===== Kleine Ghost-Buttons ===== */
.btn-ghost-sm {
  background: none;
  border: 1px solid var(--lmb-border);
  color: var(--lmb-text-muted);
  border-radius: var(--lmb-radius-sm);
  padding: 0.3rem 0.7rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost-sm:hover {
  color: var(--lmb-text-main);
  border-color: var(--lmb-border-focus);
  background: rgba(99, 102, 241, 0.1);
}

/* ===== QR-Platzhalter ===== */
.qr-placeholder {
  font-size: 0.78rem;
  line-height: 1.5;
  /* Die QR-Box ist weiss – der Platzhaltertext muss dunkel bleiben. */
  color: #475569;
  text-align: center;
  padding: 1.4rem 0.75rem;
  border: 1px dashed #cbd5e1;
  border-radius: var(--lmb-radius-md);
}

.qr-placeholder strong {
  color: #0f172a;
}

/* ===== Fusszeile des Export-Panels ===== */
.panel-footer-actions {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--lmb-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

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

/* ===== Diverses ===== */
.field-hint code {
  font-family: 'Menlo', 'Consolas', monospace;
  color: #c7d2fe;
}

.guide-card a {
  color: #a5b4fc;
}

kbd {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.75rem;
  border: 1px solid var(--lmb-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.05);
}

.btn-action-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.preset-btn:focus-visible,
.btn-ghost-sm:focus-visible,
.btn-secondary-sm:focus-visible,
.btn-action-outline:focus-visible,
.btn-primary-large:focus-visible,
.option-checkbox-card:focus-within {
  outline: 2px solid var(--lmb-primary);
  outline-offset: 2px;
}

.preset-btn:focus-visible {
  outline-color: var(--preset-accent);
}

/* Der Kopier-Button liegt im <summary>: eigener Klickbereich, kein Aufklappen */
.xml-accordion summary #btn-copy-xml {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ==========================================================================
   Layout-Fix: XML-Vorschau darf die Seite nicht breiter machen
   Ein <pre> ohne overflow-x erzwingt seine min-content-Breite (>700px) und
   sprengt auf dem Handy das Grid – deshalb scrollt es innerhalb der Box.
   ========================================================================== */
.xml-code-wrapper,
.config-form-col,
.config-output-col {
  min-width: 0;
}

.xml-code-wrapper pre {
  overflow: auto;
  max-width: 100%;
}

.xml-code-wrapper code {
  white-space: pre;
}

.whitelist-item code,
.sticky-output-panel input[readonly] {
  word-break: break-all;
}

/* ==========================================================================
   Link- & QR-Modus (Opt-in)
   Standardfall ist bewusst schlicht: herunterladen und verteilen. Wer Link
   und QR-Code will, schaltet sie hier frei – die Wahl bleibt gespeichert.
   ========================================================================== */
/* Autoren-Regeln wie ".btn-action-outline { display: flex }" schlagen die
   UA-Regel fuer [hidden] – deshalb hier explizit durchsetzen. */
[hidden] {
  display: none !important;
}

.download-hint {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--lmb-text-muted);
  text-align: center;
  margin: 0.75rem 0 1rem;
}

.export-grid-actions.is-single {
  grid-template-columns: 1fr;
}

.linkmode-toggle {
  margin-top: 1rem;
}

.linkmode-toggle .option-desc {
  line-height: 1.45;
}

.card-step-badge.is-optional {
  color: var(--lmb-text-muted);
}

#step-hosting {
  border-color: rgba(99, 102, 241, 0.35);
}

@media print {
  /* Ohne Link-Modus bleibt der QR-Bereich leer – dann keinen leeren Rahmen drucken. */
  .print-qr-code:empty {
    display: none;
  }

  #print-link-block[hidden] {
    display: none;
  }
}

/* ==========================================================================
   Automatischer Freigabe-Status + Poweruser-Klappe (Schritt 3)
   Die Whitelist regelt sich selbst; sichtbar ist nur noch ein Satz Status.
   ========================================================================== */
.auto-status-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--lmb-radius-md);
  border: 1px solid var(--lmb-border);
  background: rgba(10, 15, 26, 0.5);
}

.auto-status-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.auto-status-title {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--lmb-text-main);
}

.auto-status-detail {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--lmb-text-muted);
  margin-top: 0.15rem;
}

.auto-status-count {
  font-size: 0.72rem;
  color: var(--lmb-text-muted);
  margin-top: 0.4rem;
  opacity: 0.8;
}

.auto-status-action {
  margin-top: 0.65rem;
}

.auto-status-box.is-ok {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.auto-status-box.is-ok .auto-status-icon,
.auto-status-box.is-ok .auto-status-title {
  color: #6ee7b7;
}

.auto-status-box.is-warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.09);
}

.auto-status-box.is-warn .auto-status-icon,
.auto-status-box.is-warn .auto-status-title {
  color: #fcd34d;
}

.auto-status-box.is-error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
}

.auto-status-box.is-error .auto-status-icon,
.auto-status-box.is-error .auto-status-title {
  color: #fca5a5;
}

/* ===== Aufklappbarer Poweruser-Bereich ===== */
.advanced-disclosure {
  margin-top: 1rem;
  border-top: 1px solid var(--lmb-border);
  padding-top: 0.85rem;
}

.advanced-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--lmb-text-muted);
  list-style: none;
  padding: 0.35rem 0;
  border-radius: var(--lmb-radius-sm);
  transition: color 0.2s ease;
}

.advanced-disclosure > summary::-webkit-details-marker {
  display: none;
}

.advanced-disclosure > summary:hover,
.advanced-disclosure[open] > summary {
  color: var(--lmb-text-main);
}

.advanced-disclosure > summary:focus-visible {
  outline: 2px solid var(--lmb-primary);
  outline-offset: 2px;
}

.disclosure-hint {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--lmb-text-muted);
  background: rgba(148, 163, 184, 0.14);
  border-radius: 100px;
  padding: 2px 8px;
  flex-shrink: 0;
}

.advanced-body {
  margin-top: 1rem;
}

/* ==========================================================================
   SEB V2: Schutzstufe, Passwortschutz, Hosting, Verwaltung
   ========================================================================== */
.mono {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.8rem;
}

.protection-note {
  border-radius: var(--lmb-radius-md);
  border: 1px solid var(--lmb-border);
  border-left: 3px solid var(--lmb-warning);
  background: rgba(245, 158, 11, 0.07);
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.9rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--lmb-text-muted);
}

.protection-note.is-info {
  border-left-color: var(--lmb-primary);
  background: rgba(99, 102, 241, 0.07);
}

.protection-note strong {
  display: block;
  color: var(--lmb-text-main);
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}

.protection-note .protection-general {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  opacity: 0.85;
}

.encrypt-toggle {
  margin-bottom: 0.75rem;
}

.encrypt-panel {
  margin: -0.25rem 0 1rem;
  padding: 0.8rem 0.85rem;
  border-radius: var(--lmb-radius-md);
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.06);
}

.encrypt-panel .input-control {
  letter-spacing: 0.08em;
}

.field-error {
  font-size: 0.75rem;
  color: #fca5a5;
  margin-top: 0.35rem;
}

/* Hosting-Auswahl */
.hosting-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

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

.option-checkbox-card input[type="radio"] {
  accent-color: var(--lmb-primary);
  width: 17px;
  height: 17px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.hosting-choice-card:has(input:checked) {
  border-color: var(--lmb-primary);
  background: rgba(99, 102, 241, 0.1);
}

.hosting-badge {
  display: inline-block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  border-radius: 100px;
  padding: 1px 7px;
  margin-left: 0.3rem;
  vertical-align: middle;
  background: rgba(139, 92, 246, 0.22);
  color: #ddd6fe;
}

.hosting-badge.is-free {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.hosting-license-box {
  border-radius: var(--lmb-radius-md);
  border: 1px solid var(--lmb-border);
  padding: 0.7rem 0.85rem;
  margin-bottom: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--lmb-text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.hosting-license-box p {
  flex: 1 1 220px;
}

.hosting-license-box .btn-secondary-sm {
  padding: 0.45rem 0.85rem;
}

.hosting-license-box.is-ok {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
  color: #a7f3d0;
}

.hosting-license-box.is-locked {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.08);
}

.duration-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

@media (max-width: 420px) {
  .duration-picker {
    grid-template-columns: repeat(2, 1fr);
  }
}

.duration-btn {
  background: var(--lmb-bg-surface);
  border: 1px solid var(--lmb-border);
  color: var(--lmb-text-main);
  padding: 0.55rem 0.4rem;
  border-radius: var(--lmb-radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.duration-btn:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.duration-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--lmb-primary);
}

.duration-btn:focus-visible {
  outline: 2px solid var(--lmb-primary);
  outline-offset: 2px;
}

.duration-until {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--lmb-text-muted);
}

.duration-until .input-control {
  max-width: 11rem;
  padding: 0.45rem 0.6rem;
  color-scheme: dark;
}

#hosting-replace-box {
  margin-bottom: 1rem;
}

.btn-host {
  margin-top: 0.25rem;
}

.btn-host:disabled {
  opacity: 0.6;
  cursor: progress;
}

.hosting-status.is-error {
  color: #fca5a5;
}

.hosting-result {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--lmb-border);
}

.manage-link-box {
  border-radius: var(--lmb-radius-md);
  border: 2px solid rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.07);
  padding: 0.85rem;
}

.manage-link-warning {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #fde68a;
  margin-bottom: 0.6rem;
}

.manage-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

a.btn-ghost-sm {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.hosting-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hosting-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--lmb-radius-sm);
  border: 1px solid var(--lmb-border);
  background: rgba(10, 15, 26, 0.5);
  font-size: 0.8rem;
}

.hosting-list-item div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hosting-list-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hosting-list-item span {
  font-size: 0.72rem;
  color: var(--lmb-text-muted);
}

.hosting-list-item.is-revoked,
.hosting-list-item.is-expired {
  opacity: 0.6;
}

@media print {
  #print-file-password-box[hidden],
  #print-manage-block[hidden] {
    display: none;
  }
}

/* ===== Verwaltungsseite ===== */
.manage-wrapper {
  max-width: 760px;
}

.manage-card .status-pill {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  border-radius: 100px;
  padding: 2px 10px;
}

.status-pill.is-active { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.status-pill.is-expired { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.status-pill.is-revoked { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

.manage-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.manage-fact {
  border: 1px solid var(--lmb-border);
  border-radius: var(--lmb-radius-sm);
  background: rgba(10, 15, 26, 0.5);
  padding: 0.6rem 0.75rem;
}

.manage-fact span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lmb-text-muted);
}

.manage-fact strong {
  font-size: 0.92rem;
}

.manage-share {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

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

.manage-share .qr-code-container {
  background: #fff;
  border-radius: var(--lmb-radius-md);
  padding: 0.5rem;
}

.manage-share .qr-code-container svg {
  width: 100%;
  height: auto;
  display: block;
}

.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  border-top: 1px solid var(--lmb-border);
  padding-top: 1rem;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fecaca;
  padding: 0.55rem 1rem;
  border-radius: var(--lmb-radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.22);
}

.manage-extend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.manage-extend label {
  font-size: 0.8rem;
  color: var(--lmb-text-muted);
}

.manage-extend .select-control {
  width: auto;
  padding: 0.5rem 0.7rem;
}

.manage-message {
  margin-top: 0.85rem;
  font-size: 0.82rem;
}

.manage-message.is-error { color: #fca5a5; }
.manage-message.is-ok { color: #6ee7b7; }

/* ==========================================================================
   Einfach / Erweitert, Hilfe auf Anfrage, Teaser
   ========================================================================== */
body[data-mode="simple"] [data-advanced] {
  display: none !important;
}

.hero-section {
  margin-bottom: 1.25rem;
}

.mode-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-bottom: 1.5rem;
}

.mode-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 100px;
  background: var(--lmb-bg-surface);
  border: 1px solid var(--lmb-border);
}

.mode-btn {
  background: none;
  border: 0;
  color: var(--lmb-text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1.1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.mode-btn:hover {
  color: var(--lmb-text-main);
}

.mode-btn.active {
  background: var(--lmb-primary);
  color: #ffffff;
}

.mode-btn:focus-visible {
  outline: 2px solid var(--lmb-primary);
  outline-offset: 2px;
}

.mode-desc {
  font-size: 0.8rem;
  color: var(--lmb-text-muted);
}

.input-lg {
  font-size: 1rem;
  padding: 0.85rem 1rem;
}

/* Hilfe nur auf Klick */
.label-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.label-row .form-label {
  margin-bottom: 0;
}

.help-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--lmb-border);
  background: transparent;
  color: var(--lmb-text-muted);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.help-btn:hover,
.help-btn[aria-expanded="true"] {
  color: var(--lmb-text-main);
  border-color: var(--lmb-primary);
  background: rgba(99, 102, 241, 0.15);
}

.help-btn:focus-visible {
  outline: 2px solid var(--lmb-primary);
  outline-offset: 2px;
}

.help-text {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--lmb-text-muted);
  margin-top: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-left: 2px solid var(--lmb-primary);
  background: rgba(99, 102, 241, 0.06);
  border-radius: 0 var(--lmb-radius-sm) var(--lmb-radius-sm) 0;
}

.help-text code {
  font-family: 'Menlo', 'Consolas', monospace;
  color: #c7d2fe;
}

.whitelist-footer {
  justify-content: space-between;
  align-items: center;
}

/* Checkliste: offener Schritt (neutral, nicht rot) */
.validation-item.is-todo {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.07);
  color: #c7d2fe;
}

.action-card .card-header {
  margin-bottom: 1rem;
}

.action-card .btn-primary-large {
  margin-bottom: 1rem;
}

.advanced-diff {
  font-size: 0.78rem;
  color: #fde68a;
  margin: -0.4rem 0 1rem;
  text-align: center;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #a5b4fc;
  text-decoration: underline;
  cursor: pointer;
}

.link-panel .qr-preview-box {
  margin-top: 0;
}

.link-panel .advanced-body {
  margin-top: 0.75rem;
}

.export-grid-actions {
  margin-bottom: 0.5rem;
}

.protection-disclosure .protection-note {
  margin: 0.6rem 0 0;
}

.disclosure-hint.is-free {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

/* Verteilen-Karte */
#step-share {
  border-color: rgba(99, 102, 241, 0.3);
}

#step-share .advanced-disclosure:first-of-type {
  margin-top: 1.25rem;
}

/* Teaser ohne Lizenz: unscharfe Vorschau + Angebot */
.share-teaser {
  position: relative;
  border-radius: var(--lmb-radius-md);
  border: 1px solid rgba(139, 92, 246, 0.35);
  overflow: hidden;
  min-height: 250px;
}

.teaser-preview {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem;
  filter: blur(5px) saturate(0.8);
  opacity: 0.55;
  user-select: none;
  pointer-events: none;
}

.teaser-qr {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 10px;
  padding: 6px;
}

.teaser-qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

.teaser-lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

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

.teaser-field {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.75rem;
  background: rgba(10, 15, 26, 0.7);
  border: 1px solid var(--lmb-border);
  border-radius: var(--lmb-radius-sm);
  padding: 0.45rem 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teaser-field.is-short {
  max-width: 12rem;
}

.teaser-btn {
  align-self: flex-start;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fecaca;
  border-radius: var(--lmb-radius-sm);
  padding: 0.3rem 0.7rem;
}

.teaser-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
  background: linear-gradient(180deg, rgba(10, 15, 26, 0.35), rgba(20, 27, 45, 0.85));
}

.teaser-lock {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ddd6fe;
  background: rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.5);
  margin-bottom: 0.6rem;
}

.teaser-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--lmb-text-main);
}

.teaser-text {
  font-size: 0.82rem;
  color: var(--lmb-text-muted);
  margin: 0.2rem 0 0.9rem;
  max-width: 26rem;
}

.teaser-cta.btn-primary-large {
  width: auto;
  padding: 0.7rem 1.8rem;
  font-size: 0.95rem;
  margin: 0;
}

.teaser-sub {
  font-size: 0.72rem;
  color: var(--lmb-text-muted);
  margin-top: 0.55rem;
}

.teaser-error {
  color: #fca5a5;
}

@media (max-width: 480px) {
  .teaser-preview {
    flex-direction: column;
    align-items: stretch;
  }
  .share-teaser {
    min-height: 300px;
  }
}

/* Anleitung: eingeklappt, auf Wunsch */
details.guide-section > summary.guide-title {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  margin-bottom: 0;
  color: var(--lmb-text-muted);
}

details.guide-section > summary.guide-title::-webkit-details-marker {
  display: none;
}

details.guide-section > summary.guide-title::before {
  content: '▸';
  transition: transform 0.2s ease;
}

details.guide-section[open] > summary.guide-title {
  color: var(--lmb-text-main);
  margin-bottom: 1.5rem;
}

details.guide-section[open] > summary.guide-title::before {
  transform: rotate(90deg);
}

details.guide-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
}

/* Plattform: Statuszeile bzw. Login-Frage unter der Adresse */
.platform-status:empty {
  display: none;
}

.platform-status {
  margin-top: 0.6rem;
}

.platform-line {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--lmb-text-muted);
}

.platform-line strong {
  color: var(--lmb-text-main);
}

.platform-icon {
  color: #6ee7b7;
  margin-right: 0.35rem;
}

.platform-change {
  font-size: 0.78rem;
  margin-left: 0.25rem;
}

.login-question {
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.07);
  border-radius: var(--lmb-radius-md);
  padding: 0.75rem 0.85rem;
}

.login-question-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lmb-text-main);
  margin-bottom: 0.55rem;
}

.login-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.login-choice {
  background: var(--lmb-bg-surface);
  border: 1px solid var(--lmb-border);
  color: var(--lmb-text-main);
  border-radius: 100px;
  padding: 0.4rem 0.85rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-choice:hover {
  border-color: rgba(99, 102, 241, 0.5);
}

.login-choice.active {
  background: var(--lmb-primary);
  border-color: var(--lmb-primary);
  color: #ffffff;
}

.login-choice:focus-visible {
  outline: 2px solid var(--lmb-primary);
  outline-offset: 2px;
}

.login-other {
  margin-top: 0.55rem;
  font-size: 0.75rem;
}

/* Einfacher Modus: Plattform-Knöpfe nur auf «ändern» */
body[data-mode="simple"] .preset-group:not(.is-revealed) {
  display: none;
}

body[data-mode="advanced"] .platform-change {
  display: none;
}

/* Icon der erkannten Plattform rechts im Adressfeld (nur einfacher Modus) */
.url-field {
  position: relative;
}

.url-platform-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  color: #3b82f6;
  pointer-events: none;
}

.url-platform-icon img,
.url-platform-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.url-platform-icon.icon-ben img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

body[data-mode="simple"] .input-control.has-platform-icon {
  padding-right: 52px;
}

body[data-mode="advanced"] .url-platform-icon {
  display: none;
}

/* ===== QR-Code teilen: Umschalter https:// ↔ sebs:// (seb-qr.js) ===== */
.qr-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--lmb-bg-surface);
  border: 1px solid var(--lmb-border);
  border-radius: var(--lmb-radius-sm);
}

.qr-mode-switch button {
  background: none;
  border: 1px solid transparent;
  color: var(--lmb-text-muted);
  padding: 0.45rem 0.5rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qr-mode-switch button small {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.75;
}

.qr-mode-switch button:hover {
  color: var(--lmb-text-main);
}

.qr-mode-switch button.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--lmb-primary);
  color: var(--lmb-text-main);
}

.qr-mode-switch button:focus-visible {
  outline: 2px solid var(--lmb-primary);
  outline-offset: 2px;
}

.qr-mode-switch + .field-hint {
  margin-bottom: 0.9rem;
}

.qr-share {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.1rem;
}

.qr-share-code {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.qr-share-code[hidden] {
  display: none;
}

.qr-share:has(> .qr-share-code[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.qr-share-code .qr-code-container,
.manage-share .qr-code-container {
  background: #fff;
  border-radius: var(--lmb-radius-md);
  padding: 0.5rem;
}

.qr-share-code .qr-code-container svg {
  width: 100%;
  height: auto;
  display: block;
}

.qr-share-link-label {
  margin-top: 0.1rem;
}

.link-panel .qr-mode-switch + .field-hint {
  margin-bottom: 0;
}

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

  .qr-share-code {
    max-width: 220px;
    margin: 0 auto;
    width: 100%;
  }
}
