/* Eigene Dialog-Bausteine. Farben lassen sich über --rq-* an die Hauptseite anpassen. */
.rq-dialog {
  --rq-bg: #14111d;
  --rq-ink: #f8f5ff;
  --rq-muted: #c3b9d3;
  --rq-line: #51475f;
  --rq-accent: #c8b8ff;
  --rq-on-accent: #191126;
  box-sizing: border-box;
  color: var(--rq-ink);
  background: var(--rq-bg);
  border: 1px solid var(--rq-line);
  border-radius: 28px;
  width: min(820px, calc(100vw - 32px));
  max-height: min(90dvh, 940px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(24px, 5vw, 44px);
  margin: auto;
  box-shadow: 0 24px 120px #0009;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.65;
  color-scheme: dark;
  scrollbar-width: thin;
}
.rq-dialog::backdrop { background: rgb(4 2 10 / .8); backdrop-filter: blur(8px); }
body:has(.rq-dialog[open]) { overflow: hidden; }
.rq-dialog *, .rq-dialog *::before, .rq-dialog *::after { box-sizing: border-box; }
.rq-dialog [hidden] { display: none !important; }
.rq-dialog h2 { font-family: inherit; font-size: clamp(32px, 4vw, 46px); font-weight: 650; letter-spacing: -.035em; line-height: 1.14; margin: 14px 0 20px; color: var(--rq-ink); }
.rq-dialog h3 { font-family: inherit; font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 24px; color: var(--rq-ink); }
.rq-dialog h4 { font-size: clamp(26px, 3vw, 32px); letter-spacing: -.025em; line-height: 1.25; margin: 8px 0; color: var(--rq-ink); }
.rq-dialog p { margin: 0 0 16px; }
.rq-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.rq-kicker { font-size: 16px; font-weight: 650; color: var(--rq-accent); letter-spacing: .025em; }
.rq-close { flex: none; border: 1px solid var(--rq-line); background: transparent; color: var(--rq-ink); font-size: 28px; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; line-height: 1; }
.rq-intro { font-size: 20px; color: var(--rq-muted); max-width: 650px; }
.rq-dialog label { display: block; font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.rq-dialog input, .rq-dialog select, .rq-dialog textarea { font: inherit; color: var(--rq-ink); background: #211b2c; border: 1px solid var(--rq-line); border-radius: 14px; min-height: 48px; width: 100%; padding: 13px 15px; }
.rq-dialog textarea { resize: vertical; line-height: 1.6; display: block; }
.rq-dialog textarea::placeholder, .rq-dialog input::placeholder { color: #a89bb9; opacity: 1; }
.rq-dialog textarea:focus, .rq-dialog input:focus, .rq-dialog select:focus { border-color: var(--rq-accent); }
.rq-dialog button, .rq-dialog a { font-family: inherit; }
.rq-dialog :focus-visible { outline: 3px solid var(--rq-accent); outline-offset: 4px; }
.rq-dialog h3:focus { outline: none; }
.rq-dialog .rq-help { color: var(--rq-muted); font-size: 17px; margin-top: 12px; line-height: 1.65; }
.rq-optional { color: var(--rq-muted); font-size: 16px; font-weight: 400; margin-left: 6px; }
.rq-progress { margin: 26px 0 32px; font-size: 16px; color: var(--rq-muted); }
.rq-progress > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.rq-progress i { display: block; height: 3px; border-radius: 9px; background: var(--rq-line); }
.rq-progress i.current { background: var(--rq-accent); }
.rq-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; }
.rq-fields > * { min-width: 0; }
.rq-span { grid-column: 1 / -1; }
.rq-context-note { color: var(--rq-muted); padding: 16px 18px; border-left: 2px solid var(--rq-accent); margin-top: 22px !important; font-size: 17px; }
.rq-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin: 28px 0 4px; }
.rq-primary, .rq-secondary { display: inline-flex; gap: 14px; align-items: center; justify-content: center; min-height: 52px; padding: 15px 22px; border-radius: 100px; font-size: 18px; font-weight: 650; line-height: 1.4; cursor: pointer; text-decoration: none; text-align: center; }
.rq-primary { border: 1px solid var(--rq-accent); background: var(--rq-accent); color: var(--rq-on-accent); }
.rq-secondary { border: 1px solid var(--rq-line); background: transparent; color: var(--rq-ink); }
.rq-primary:hover { filter: brightness(1.06); }
.rq-secondary:hover, .rq-close:hover { background: #ffffff0b; }
.rq-recommendation { border: 1px solid var(--rq-line); background: #211b2c; border-radius: 20px; padding: 22px; margin-bottom: 24px; }
.rq-recommendation > p { color: var(--rq-muted); }
.rq-recommendation .rq-kicker { color: var(--rq-accent); }
.rq-recommendation .rq-price { color: var(--rq-accent); font-weight: 650; font-size: 20px; }
.rq-recommendation select { background: #14111d; }
.rq-example-note { font-size: 17px; padding: 18px 20px; border-radius: 15px; border: 1px solid var(--rq-line); color: var(--rq-muted); }
.rq-done-mark { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: var(--rq-bg); background: var(--rq-accent); font-size: 28px; margin: 14px 0 22px; }
.rq-error { color: #ffb4bd; font-size: 18px; margin-top: 20px !important; }
.rq-explainer { width: min(700px, calc(100vw - 32px)); }
.rq-explainer-copy { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.65; color: var(--rq-ink); margin-top: 24px !important; }
.rq-transfer { height: 3px; background: var(--rq-line); margin: 24px 0; border-radius: 8px; overflow: hidden; }
.rq-transfer span { display: block; height: 100%; background: var(--rq-accent); transform-origin: left; transform: scaleX(0); }
.rq-explainer[open] .rq-transfer span { animation: rq-transfer 12s linear both; }
@keyframes rq-transfer { to { transform: scaleX(1); } }
.rq-mode { display: flex; gap: 8px; margin: 20px 0 8px; }
.rq-mode button { min-height: 52px; padding: 15px 22px; border-radius: 100px; border: 1px solid var(--rq-line); color: var(--rq-muted); background: transparent; font-size: 18px; cursor: pointer; }
.rq-mode button[aria-pressed="true"] { border-color: var(--rq-accent); color: var(--rq-on-accent); background: var(--rq-accent); }
.rq-text-button { display: block; border: 0; background: none; color: var(--rq-accent); font: inherit; font-size: 17px; cursor: pointer; padding: 14px 0; min-height: 48px; text-decoration: underline; text-underline-offset: 4px; }
.rq-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 600px) {
  .rq-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 22px 18px; border-radius: 22px; }
  .rq-dialog::backdrop { backdrop-filter: none; }
  .rq-fields { grid-template-columns: 1fr; }
  .rq-actions { align-items: stretch; flex-direction: column-reverse; gap: 10px; }
  .rq-actions > * { width: 100%; }
  .rq-dialog h2 { padding-right: 0; }
  .rq-dialog label { font-size: 18px; }
  .rq-dialog .rq-help, .rq-context-note, .rq-example-note, .rq-text-button { font-size: 16px; }
  .rq-mode { flex-wrap: wrap; }
  .rq-mode button { flex: 1; }
  .rq-recommendation { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .rq-explainer[open] .rq-transfer span { animation: none; transform: scaleX(1); }
  .rq-dialog *, .rq-dialog *::before, .rq-dialog *::after { scroll-behavior: auto !important; transition: none !important; }
}
