/* ==========================================================================
   choice_group – single / multiple choice as option cards (share mode) or
   pills (inheritance, filter chips). Buttons with role radio/checkbox.
   ========================================================================== */
.choice_group { display: flex; flex-direction: column; gap: 8px; }
.choice_group_caption { font-size: var(--fs-13); font-weight: var(--w-bold); margin-bottom: 2px; }
.choice_group_item {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%;
  border: 2px solid var(--q-bright); background: var(--q-white); border-radius: var(--radius-lg); padding: 14px 18px;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.choice_group_item:hover { border-color: var(--q-medium); }
.choice_group_item_active, .choice_group_item[aria-checked="true"] { border-color: var(--q-highlight-1); background: var(--q-highlight-4); }
.choice_group_item_indicator { width: 18px; height: 18px; flex: none; margin-top: 2px; border-radius: 50%; border: 2px solid var(--q-medium); background: var(--q-white); box-shadow: inset 0 0 0 3px var(--q-white); }
.choice_group_item_active .choice_group_item_indicator, .choice_group_item[aria-checked="true"] .choice_group_item_indicator { border-color: var(--q-highlight-1); background: var(--q-highlight-1); }
.choice_group_item_body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.choice_group_item_title { font-size: var(--fs-14); font-weight: var(--w-bold); color: var(--q-highlight-2); }
.choice_group_item_description { font-size: var(--fs-12); color: var(--q-dark); }

/* Pills */
.choice_group_pills { flex-direction: row; flex-wrap: wrap; }
.choice_group_pills .choice_group_item { width: auto; border-radius: var(--radius-pill); padding: 9px 18px; font-size: var(--fs-13); font-weight: var(--w-bold); color: var(--q-highlight-2); align-items: center; }
.choice_group_pills .choice_group_item_active, .choice_group_pills .choice_group_item[aria-checked="true"], .choice_group_pills .choice_group_item[aria-pressed="true"] { background: var(--q-highlight-1); border-color: var(--q-highlight-1); }
.choice_group_pills_small .choice_group_item { padding: 6px 14px; font-size: var(--fs-12); }
/* optional symbol in front of a pill, e.g. + / ✓ of multiple choice chips (setup wizard, T235) */
.choice_group_pills .choice_group_item:has(.choice_group_item_icon) { gap: 8px; padding-left: 14px; }
.choice_group_item_icon { width: 12px; height: 12px; flex: none; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.choice_group_item:disabled { cursor: not-allowed; }

/* Cards (T262, "Freigabe erstellen" › Zugang): option cards side by side with a round symbol; the chosen card has a navy
   frame and a lime symbol – as in the reference 28.09.2026 */
.choice_group_cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.choice_group_cards .choice_group_item { padding: 14px 16px; cursor: pointer; font: inherit; }
.choice_group_cards .choice_group_item[aria-checked="true"], .choice_group_cards .choice_group_item_active { border-color: var(--q-highlight-2); background: var(--q-highlight-4); }
.choice_group_cards .choice_group_item:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.choice_group_item_symbol { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--q-highlight-4); color: var(--q-highlight-2); transition: background var(--dur-fast) ease; }
.choice_group_item[aria-checked="true"] .choice_group_item_symbol, .choice_group_item_active .choice_group_item_symbol { background: var(--q-highlight-1); }
.choice_group_item_symbol .choice_group_item_icon { width: 16px; height: 16px; }
.choice_group_cards .choice_group_item_description { line-height: 1.4; }
/* T331: round check on the right of a card with multiple choice (role checkbox, "KI-Analyse starten") */
.choice_group_item_check { position: relative; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--q-medium); background: var(--q-white); transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease; }
.choice_group_item_check::after { content: ""; position: absolute; inset: 3px; background: var(--q-highlight-2); -webkit-mask: var(--mask-check) center / contain no-repeat; mask: var(--mask-check) center / contain no-repeat; opacity: 0; transition: opacity var(--dur-fast) ease; }
.choice_group_item[aria-checked="true"] .choice_group_item_check, .choice_group_item_active .choice_group_item_check { border-color: var(--q-highlight-1); background: var(--q-highlight-1); }
.choice_group_item[aria-checked="true"] .choice_group_item_check::after, .choice_group_item_active .choice_group_item_check::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .choice_group_item, .choice_group_item_symbol, .choice_group_item_check, .choice_group_item_check::after { transition: none; } }

/* T460: options in ONE line (choiceOverflow, choice_group_row) – what does not fit moves behind "⋯" (choice_group_more,
   menu choice_group_menu); the options share the line, long labels end with "…". While measuring the options keep their
   natural width (choice_group_row_measuring). */
.choice_group.choice_group_row { display: flex; flex-direction: row; flex-wrap: nowrap; min-width: 0; }
.choice_group_row > .choice_group_item { flex: 1 1 auto; width: auto; min-width: 0; white-space: nowrap; }
.choice_group_row.choice_group_pills > .choice_group_item { flex: 0 1 auto; }
.choice_group_row > .choice_group_item[hidden] { display: none; }
.choice_group_row > .choice_group_item > .choice_group_item_title,
.choice_group_row > .choice_group_item > .choice_group_item_label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.choice_group_row_measuring > .choice_group_item, .choice_group_row_measuring.choice_group_pills > .choice_group_item { flex: none; }
/* T640: on the smartphone (choiceOverflow, up to 759 px) no "⋯" – every option with its whole label, the row is swiped
   sideways; a soft fade marks the edge where more options follow */
.choice_group.choice_group_row_swipe {
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; scroll-behavior: smooth;
  --swipe-fade-start: 0px; --swipe-fade-end: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--swipe-fade-start), #000 calc(100% - var(--swipe-fade-end)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--swipe-fade-start), #000 calc(100% - var(--swipe-fade-end)), transparent 100%);
}
.choice_group.choice_group_row_swipe::-webkit-scrollbar { display: none; }
.choice_group.choice_group_row_swipe_start { --swipe-fade-start: 28px; }
.choice_group.choice_group_row_swipe_end { --swipe-fade-end: 28px; }
@media (prefers-reduced-motion: reduce) { .choice_group.choice_group_row_swipe { scroll-behavior: auto; } }
.choice_group_row_swipe > .choice_group_item, .choice_group_row_swipe.choice_group_pills > .choice_group_item { flex: none; }
.choice_group_row_swipe > .choice_group_item > .choice_group_item_title, .choice_group_row_swipe > .choice_group_item > .choice_group_item_label { overflow: visible; }
.choice_group_row > .choice_group_more {
  position: relative; flex: none; width: 44px; min-width: 44px; padding: 0; justify-content: center; align-items: center;
  border-radius: var(--radius-pill); color: var(--q-highlight-2);
}
.choice_group_more_icon { width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.choice_group_row > .choice_group_more[aria-expanded="true"], .choice_group_row > .choice_group_more.choice_group_more_chosen { border-color: var(--q-highlight-2); background: var(--q-highlight-4); }
.choice_group_more_count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); border: 2px solid var(--q-white); background: var(--q-highlight-2); color: var(--q-white); font-size: 10px; font-weight: var(--w-bold); line-height: 1;
}
.choice_group_more_count[hidden] { display: none; }
.choice_group_menu .choice_group_menu_item { display: flex; align-items: center; gap: 11px; }
.choice_group_menu_item_box { width: 16px; height: 16px; flex: none; border-radius: 4px; border: 2px solid var(--q-medium); background: var(--q-white); }
.choice_group_menu_item[aria-checked="true"] .choice_group_menu_item_box { border-color: var(--q-highlight-2); background: var(--q-highlight-1) url("../../assets/icons/check_dark.svg") center / 10px no-repeat; }
