/* Bestell-App (Konfigurator): Styles, alle Regeln auf #bb-bestellung begrenzt. */

/* Layout: configurator steps left, sticky order summary right; one column on phones. */
#bb-bestellung {
  --bg: #f6f4f2; --surface: #ffffff; --surface-2: #f1ecea; --fg: #1b1e23; --muted: #5f6670; --line: #e3dedb;
  --accent: #b92121; --accent-ink: #ffffff; --accent-soft: #f6e3e3; --ok: #1f7a48; --warn: #a15c00; --err: #b3261e;
  --font: "Open Sans", "Segoe UI", system-ui, sans-serif;
  --radius: 10px;
}
#bb-bestellung * { box-sizing: border-box; }
#bb-bestellung { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.55; padding-inline: 16px; padding-block: 32px 64px; }
#bb-bestellung .wrap { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
#bb-bestellung header h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
#bb-bestellung header p { margin: 4px 0 0; color: var(--muted); }
#bb-bestellung header .wechsel { margin-top: 8px; font-size: 0.9rem; }
#bb-bestellung .eyebrow { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; font-weight: 700; color: var(--accent); }
#bb-bestellung .grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 920px) { #bb-bestellung .grid { grid-template-columns: minmax(0, 1fr); } }
#bb-bestellung .steps { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
#bb-bestellung .step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#bb-bestellung .step h2 { font-size: 1.15rem; margin: 0; display: flex; gap: 10px; align-items: baseline; }
#bb-bestellung .step h2 .n { color: var(--accent); font-variant-numeric: tabular-nums; font-size: 0.95rem; }
#bb-bestellung .hint { color: var(--muted); font-size: 0.86rem; margin: 0; }
#bb-bestellung a { color: var(--accent); }

/* Server selection: name on its own line, facts below, stock and price on the right */
#bb-bestellung .models { display: flex; flex-direction: column; gap: 8px; }
#bb-bestellung .model { text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; white-space: normal; min-width: 0; line-height: 1.4; display: grid; grid-template-columns: 22px minmax(0, 1fr) 6.5rem; grid-template-rows: auto auto; gap: 6px 16px; align-items: start; }
#bb-bestellung .model:hover, #bb-bestellung .model:focus { border-color: var(--muted); background: var(--surface); color: inherit; }
#bb-bestellung .model[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#bb-bestellung .model .pick { grid-row: 1 / 3; margin-top: 2px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); }
#bb-bestellung .model[aria-pressed="true"] .pick { border-color: var(--accent); background: radial-gradient(var(--accent) 45%, transparent 50%); }
#bb-bestellung .model .name { grid-column: 2; grid-row: 1; font-weight: 700; font-size: 1.02rem; }
#bb-bestellung .model .facts { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px 20px; font-size: 0.84rem; color: var(--muted); min-width: 0; }
#bb-bestellung .model .fact b { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--fg); }
#bb-bestellung .model .stock { grid-column: 3; grid-row: 2; align-self: start; text-align: right; }
#bb-bestellung .model .price { grid-column: 3; grid-row: 1; text-align: right; display: flex; flex-direction: column; line-height: 1.2; font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
#bb-bestellung .model .price small { font-weight: 400; color: var(--muted); font-size: 0.75rem; }
#bb-bestellung .stock { font-size: 0.8rem; font-weight: 700; color: var(--ok); }
@media (max-width: 720px) {
  #bb-bestellung .model { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-rows: auto auto auto; }
  #bb-bestellung .model .pick { grid-row: 1; }
  #bb-bestellung .model .facts { grid-column: 2 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #bb-bestellung .model .stock { grid-column: 2; grid-row: 3; text-align: left; }
  #bb-bestellung .model .price { grid-column: 3; grid-row: 1; }
}

/* Rows with quantity stepper, checkbox or select */
#bb-bestellung .rows { display: flex; flex-direction: column; }
#bb-bestellung .row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
#bb-bestellung .row:last-child { border-bottom: 0; }
#bb-bestellung .row.toggle { cursor: pointer; line-height: 1.55; font-weight: 400; }
#bb-bestellung .row .label { min-width: 0; }
#bb-bestellung .row .label small { display: block; color: var(--muted); font-size: 0.8rem; }
#bb-bestellung .row .p { font-variant-numeric: tabular-nums; font-size: 0.9rem; white-space: nowrap; color: var(--muted); }
#bb-bestellung .qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#bb-bestellung .qty button { font: inherit; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; border-radius: 0; background: var(--surface-2); color: var(--fg); cursor: pointer; font-size: 1.1rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
#bb-bestellung .qty button:hover:not(:disabled) { background: var(--line); color: var(--fg); }
#bb-bestellung .qty button:disabled { opacity: 0.35; cursor: not-allowed; }
#bb-bestellung .qty output { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; line-height: 44px; }
#bb-bestellung .bb-toggle { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
#bb-bestellung .bb-select { font: inherit; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); max-width: 100%; }
#bb-bestellung .seg { display: flex; flex-wrap: wrap; gap: 8px; }
#bb-bestellung .seg label { border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 0.9rem; display: flex; gap: 8px; align-items: center; }
#bb-bestellung .seg input { accent-color: var(--accent); margin: 0; }
#bb-bestellung .seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* Billing data, SEPA mandate and legal checkboxes */
#bb-bestellung .form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { #bb-bestellung .form { grid-template-columns: 1fr; } }
#bb-bestellung .form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; }
#bb-bestellung .form input, #bb-bestellung .form select, #bb-bestellung .form textarea { font: inherit; font-weight: 400; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); outline: 0; box-shadow: none; }
#bb-bestellung .form input:focus, #bb-bestellung .form select:focus, #bb-bestellung .form textarea:focus, #bb-bestellung .bb-select:focus { border-color: var(--muted); box-shadow: 0 0 0 3px rgba(27, 30, 35, 0.08); outline: 0; }
#bb-bestellung .form input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
#bb-bestellung .form label:has(input:disabled) { color: var(--muted); }
#bb-bestellung .form .full { grid-column: 1 / -1; }
#bb-bestellung .sepa { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 8px; background: var(--surface-2); }
#bb-bestellung .sepa h3 { font-size: 1rem; margin: 0; }
#bb-bestellung .sepa .mandat { font-size: 0.86rem; margin: 0; }
#bb-bestellung .check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; line-height: 1.5; }
#bb-bestellung .check input { margin: 2px 0 0; margin-top: calc((1lh - 17px) / 2); width: 17px; height: 17px; accent-color: var(--accent); flex: 0 0 auto; } /* centred on the first text line; 2px for browsers without lh */
#bb-bestellung button:focus-visible, #bb-bestellung .check input:focus-visible, #bb-bestellung .bb-toggle:focus-visible, #bb-bestellung label:has(input[type="radio"]:focus-visible) { outline: 2px solid var(--fg); outline-offset: 2px; }

/* Order summary */
#bb-bestellung aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 130px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; } /* below the sticky site header (113 px) */
@media (max-width: 920px) { #bb-bestellung aside { position: static; } }
#bb-bestellung aside h2 { margin: 0; font-size: 1.05rem; }
#bb-bestellung table.total { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 0; border: 0; border-top: 1px solid var(--line); }
#bb-bestellung table.total th, #bb-bestellung table.total td { padding: 3px 0; border: 0; background: none; font-size: 0.86rem; color: var(--muted); vertical-align: baseline; }
#bb-bestellung table.total th { text-align: left; font-weight: 400; padding-right: 12px; }
#bb-bestellung table.total td { text-align: right; white-space: nowrap; }
#bb-bestellung table.total tr:first-child th, #bb-bestellung table.total tr:first-child td { padding-top: 8px; color: var(--fg); }
#bb-bestellung table.total tr.rabatt th, #bb-bestellung table.total tr.rabatt td { color: var(--ok); font-weight: 600; }
#bb-bestellung table.total tr.sub th, #bb-bestellung table.total tr.sub td { border-top: 1px solid var(--line); padding-top: 5px; color: var(--fg); font-weight: 600; }
#bb-bestellung table.total tr.gross th, #bb-bestellung table.total tr.gross td { border-top: 2px solid var(--fg); padding-top: 6px; color: var(--fg); font-weight: 800; font-size: 1.05rem; }
#bb-bestellung .folge { margin: 0; font-size: 0.82rem; color: var(--muted); }
#bb-bestellung .folge:empty, #bb-bestellung .erste:empty { display: none; }
#bb-bestellung .erste { margin: 0; font-size: 0.9rem; font-weight: 700; }
#bb-bestellung .lines { display: flex; flex-direction: column; gap: 4px; font-size: 0.86rem; border-top: 2px solid var(--accent); padding-top: 10px; }
@media (min-width: 921px) { #bb-bestellung .lines { max-height: 320px; overflow-y: auto; } }
#bb-bestellung .lines div { display: flex; justify-content: space-between; gap: 12px; }
#bb-bestellung .lines span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
#bb-bestellung .seg .rabatt { color: var(--ok); font-weight: 700; }
#bb-bestellung .msgs { display: flex; flex-direction: column; gap: 6px; font-size: 0.84rem; }
#bb-bestellung .msg { padding: 8px 10px; border-radius: 8px; border-left: 3px solid; background: var(--surface-2); }
#bb-bestellung .msg.err { border-color: var(--err); }
#bb-bestellung .msg.warn { border-color: var(--warn); }
#bb-bestellung .msg.ok { border-color: var(--ok); }
#bb-bestellung .btn { font: inherit; font-weight: 700; border: 0; border-radius: 8px; padding: 12px 16px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
#bb-bestellung .btn:disabled { opacity: 0.45; cursor: not-allowed; }
#bb-bestellung aside a.btn { text-align: center; text-decoration: none; }
#bb-bestellung .ssh { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; }
#bb-bestellung .ssh[hidden], #bb-bestellung .check[hidden] { display: none; }
#bb-bestellung .ssh input, #bb-bestellung .ssh textarea { font: inherit; font-weight: 400; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); outline: 0; }
#bb-bestellung .ssh.mono textarea { font: 0.82rem/1.4 ui-monospace, Consolas, monospace; }
#bb-bestellung .ssh input:focus, #bb-bestellung .ssh textarea:focus { border-color: var(--muted); box-shadow: 0 0 0 3px rgba(27, 30, 35, 0.08); }
#bb-bestellung .rows > .ssh { padding: 10px 0; }
#bb-bestellung .field-hint { padding-top: 10px; }
#bb-bestellung .rows > .field-title { padding-top: 14px; font-size: 0.95rem; }
#bb-bestellung .rows > .field-title:first-child { padding-top: 0; }
#bb-bestellung .field-title + .field-hint { padding-top: 2px; }
#bb-bestellung .laufzeit { display: flex; flex-direction: column; gap: 8px; }
#bb-bestellung .laufzeit[hidden], #bb-bestellung #laufzeitHinweis:empty { display: none; }
#bb-bestellung h3 { font-size: 1rem; margin: 0; }
#bb-bestellung .call { margin: 0; font-size: 0.86rem; text-align: center; color: var(--muted); }

/* List fields: one card per person, mailbox or domain */
#bb-bestellung .liste { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; }
#bb-bestellung .liste-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
#bb-bestellung .liste-nr { flex: 0 0 6rem; align-self: center; font-weight: 700; font-size: 0.85rem; }
#bb-bestellung .liste-row label { flex: 1 1 10rem; display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; font-weight: 600; min-width: 0; }
#bb-bestellung .liste-row input { font: inherit; font-weight: 400; font-size: 0.9rem; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); outline: 0; min-width: 0; }
#bb-bestellung .liste-row input:focus { border-color: var(--muted); box-shadow: 0 0 0 3px rgba(27, 30, 35, 0.08); }
#bb-bestellung .liste-row .bb-select { padding: 8px 6px; }
#bb-bestellung .liste-add { font: inherit; font-size: 0.85rem; font-weight: 600; min-height: 44px; padding: 0 14px; border: 1px dashed var(--muted); border-radius: 8px; background: var(--surface); color: var(--fg); cursor: pointer; align-self: flex-start; }
#bb-bestellung .liste-add:hover { background: var(--surface-2); }
#bb-bestellung .liste-del { flex: 0 0 44px; margin-left: auto; align-self: flex-end; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
#bb-bestellung .liste-del:hover { color: var(--err); background: var(--surface); }
#bb-bestellung .liste-status { flex: 0 0 auto; align-self: flex-end; margin: 0; padding-bottom: 10px; font-size: 0.85rem; white-space: nowrap; }
#bb-bestellung .liste-status.available { color: var(--ok); font-weight: 600; }
#bb-bestellung .liste-status.unknown { color: var(--warn); }
#bb-bestellung .liste-status.checking { color: var(--muted); }
#bb-bestellung .liste-status.checking::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: bb-spin 0.8s linear infinite; }
@keyframes bb-spin { to { transform: rotate(360deg); } }
@media (max-width: 560px) { #bb-bestellung .liste-nr, #bb-bestellung .liste-row label { flex-basis: 100%; } }

/* Product overview on /bestellen/ without a product */
#bb-bestellung .produkte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
#bb-bestellung .produkte a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px 20px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); color: var(--fg); text-decoration: none; }
#bb-bestellung .produkte a:hover, #bb-bestellung .produkte a:focus-visible { border-color: var(--accent); }
#bb-bestellung .produkte span { color: var(--muted); font-size: 0.86rem; }
@media (max-width: 560px) {
  #bb-bestellung .row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  #bb-bestellung .row .p { grid-column: 1; grid-row: 2; white-space: normal; }
  #bb-bestellung .row > :last-child { grid-column: 2; grid-row: 1 / 3; }
  #bb-bestellung .row:has(> .bb-select) { grid-template-columns: minmax(0, 1fr); }
  #bb-bestellung .row:has(> .bb-select) > .p { display: none; }
  #bb-bestellung .row > .bb-select:last-child { grid-column: 1; grid-row: auto; width: 100%; }
}

/* Withdrawal and cancellation pages */
#bb-bestellung.vertrag .wrap { max-width: 760px; }
#bb-bestellung .confirm { display: flex; flex-direction: column; gap: 8px; }
#bb-bestellung .confirm[hidden], #bb-bestellung .form[hidden] { display: none; }
#bb-bestellung .confirm h2 { font-size: 1.05rem; margin: 0; }
#bb-bestellung .confirm dl { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 0.9rem; }
#bb-bestellung .confirm dt { color: var(--muted); }
#bb-bestellung .confirm dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#bb-bestellung .actions [hidden] { display: none; }
#bb-bestellung .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#bb-bestellung .back { font: inherit; font-size: 0.9rem; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); cursor: pointer; }
#bb-bestellung .form select { font: inherit; font-weight: 400; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); }
@media (max-width: 560px) { #bb-bestellung .confirm dl { grid-template-columns: minmax(0, 1fr); } }
