/* Widgets shared by the account and staff forms (needs the pages' colour variables). */

/* Dropdown */
section:focus-within { z-index: 3; } /* keep an open dropdown above the next card */
.combo { position: relative; }
.combo input { padding-right: 36px; cursor: pointer; }
.combo::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px; pointer-events: none;
  border-right: 2px solid var(--lavender); border-bottom: 2px solid var(--lavender); transform: rotate(45deg); transition: transform .15s; }
.combo:has(input[aria-expanded="true"])::after { transform: rotate(225deg); margin-top: -2px; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); max-height: 260px; overflow-y: auto; margin: 0; padding: 6px;
  list-style: none; background: #150f27; border: 1px solid #4a3480; border-radius: 11px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(197, 150, 240, .06), 0 0 30px rgba(123, 60, 220, .18);
  scrollbar-width: thin; scrollbar-color: #4a3480 transparent; }
.combo-list li { padding: 8px 11px; border-radius: 7px; cursor: pointer; color: #ddd5f0; }
.combo-list li:hover { background: rgba(123, 60, 220, .22); color: #fff; }
.combo-list li.active { background: linear-gradient(90deg, rgba(123, 60, 220, .55), rgba(123, 60, 220, .25)); color: #fff; }
.combo-list li.divider { margin-bottom: 7px; position: relative; }
.combo-list li.divider::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -4px; border-bottom: 1px solid var(--line); }
.combo-list.up { top: auto; bottom: calc(100% + 6px); } /* opens upward near the bottom of the screen */
.combo-list li.none, .combo-list li.hint { color: var(--muted); cursor: default; background: none; font-size: 12.5px; }
.combo-list li.hint { padding-bottom: 2px; }

/* Language chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 99px; background: rgba(123, 60, 220, .18);
  border: 1px solid #4a3480; color: #eadcff; font-size: 14px; animation: chipIn .18s ease; }
@keyframes chipIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.chip-name { font-weight: 600; margin-right: 6px; }
.chip button { font: inherit; cursor: pointer; border: 0; color: inherit; background: none; }
.chip-level { font-size: 12px; padding: 3px 8px; border-radius: 99px; color: var(--lavender); background: rgba(10, 8, 20, .5); }
.chip-level:hover { background: rgba(10, 8, 20, .85); }
.chip-x { width: 24px; height: 24px; border-radius: 50%; font-size: 17px; line-height: 1; color: #bfaee0; }
.chip-x:hover { background: rgba(255, 107, 138, .2); color: #ff9db3; }
.lang-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.levels { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); }
.levels button { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border: 0; border-radius: 7px; padding: 8px 11px; color: var(--muted); background: none; white-space: nowrap; }
.levels button.on { color: #fff; background: linear-gradient(180deg, #8a4ce6, var(--accent)); }
@media (max-width: 640px) { .lang-add { grid-template-columns: 1fr; } .levels { overflow-x: auto; } }

/* Spellcheck hints */
.spell { margin-top: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid #4a3480; background: rgba(123, 60, 220, .12); font-size: 13px; }
.spell-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lavender); margin-bottom: 4px; }
.spell-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 3px 0; color: var(--muted); }
.spell-row s { color: #ffb3c3; text-decoration-thickness: 1.5px; }
.spell-arrow { color: var(--muted); }
.spell button { font: inherit; font-size: 12.5px; cursor: pointer; border-radius: 99px; padding: 2px 10px; }
.spell-fix { color: #fff; background: rgba(123, 60, 220, .55); border: 1px solid #6a45b5; font-weight: 600; }
.spell-fix:hover { background: rgba(123, 60, 220, .85); }
.spell-ignore { color: var(--muted); background: none; border: 1px solid var(--line); margin-left: auto; }
.spell-ignore:hover { color: var(--text); border-color: #43307a; }

/* Field messages, counters and the greyed-out Next button */
.fmeta { display: flex; justify-content: space-between; gap: 12px; margin-top: 5px; font-size: 12px; color: var(--muted); }
.fmeta:not(:has(span:not(:empty))) { display: none; } /* no gap until there is a message or counter */
.fmeta .fmsg { color: var(--danger); }
.fmeta .fcount { margin-left: auto; font-variant-numeric: tabular-nums; }
.nav-hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; min-height: 1.4em; }
.wiz-nav button.primary:disabled { opacity: .38; filter: grayscale(.75); box-shadow: none; cursor: not-allowed; }
.wiz-nav button.primary:disabled:hover { filter: grayscale(.75); }
.wiz-nav button.primary:disabled .arrow { transform: none; }
