/* Library of exercises and sessions (package Q part 2). */
.library-filters { display: grid; gap: 10px; }
.library-search { display: flex; gap: 8px; }
.library-search input { flex: 1 1 auto; min-width: 0; }
.library-filter-grid { gap: 4px 12px; }
.library-filter-grid .field { margin: 0; }
.library-count { margin: 12px 0 8px; }
.library-target { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.drill-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.drill-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.drill-card.is-hidden { opacity: .7; border-style: dashed; }
.drill-thumb { display: block; background: #2a7d4c; aspect-ratio: 16 / 10; overflow: hidden; }
.drill-thumb svg { display: block; width: 100%; height: 100%; max-width: none; border-radius: 0; }
.drill-thumb-empty { display: grid; place-items: center; height: 100%; font-size: 2.4rem; }
.drill-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1 1 auto; }
.drill-title { font-size: 1rem; margin: 0; line-height: 1.3; }
.drill-title a { color: var(--ink); text-decoration: none; }
.drill-title a:hover { text-decoration: underline; }
.drill-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.drill-meta { margin: 0; }
.drill-use { margin-top: auto; padding-top: 6px; }
.drill-lang { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 12px; }
.drill-lang .inline-form { display: inline; }
.drill-actions .row { gap: 8px; }
.drill-use-form { flex: 1 1 auto; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.drill-use-form select { flex: 1 1 14em; min-width: 0; width: 100%; max-width: 420px; }
.drill-report { margin-top: 8px; }
.drill-report summary { cursor: pointer; color: var(--muted); }
.drill-report form { max-width: 520px; margin-top: 6px; }
.drill-block + .drill-block { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.drill-settings { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 12px 0 0; }
.drill-settings legend { font-weight: 600; padding: 0 4px; }
.drill-hide { max-width: 560px; margin-top: 10px; }
.drill-save { display: inline-block; position: relative; }
.drill-save summary { list-style: none; cursor: pointer; }
.drill-save summary::-webkit-details-marker { display: none; }
.drill-save[open] .drill-save-form { position: absolute; z-index: 20; right: 0; top: calc(100% + 4px); width: min(320px, 90vw); }
.drill-save-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; }
.drill-save-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.drill-save-form .check { display: flex; gap: 6px; align-items: flex-start; justify-content: flex-start; font-size: .9rem; text-align: left; }
.drill-save-form .check input { flex: 0 0 auto; width: auto; margin: 3px 0 0; }
.session-table input.short { width: 5em; }
.library-admin-hide input { min-width: 12em; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
@media (max-width: 600px) {
  .drill-save[open] .drill-save-form { position: static; width: 100%; margin-top: 6px; }
}
.library-deepl summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.library-deepl[open] summary { margin-bottom: 8px; }
.library-deepl form { max-width: 760px; }
.library-deepl-usage { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
.library-deepl-usage dd { margin: 0; }
@media (max-width: 600px) {
  .library-deepl-usage { grid-template-columns: 1fr; }
}
/* An own picture as the thumbnail of a card (17.11.2026). */
.drill-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; background: #fff; }

/* Import of the repository from a file (19.11.2026): what was left out or changed. */
.library-import-notes summary { cursor: pointer; font-weight: 600; }
.library-import-notes ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }

/* Tags (19.11.2026): chips to tick in the editor, links on the cards and the page of a drill. */
.drill-tags-field { border: 0; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.drill-tags-field legend { font-weight: 600; padding: 0; margin-bottom: 2px; }
.drill-tags-field .hint { margin: 0; }
.tag-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag-group-name { flex: 0 0 100%; }
.tag-check { position: relative; display: inline-flex; cursor: pointer; }
.tag-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tag-check span { display: inline-block; padding: 4px 12px; min-height: 32px; line-height: 22px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .9rem; }
.tag-check:hover span { border-color: var(--brand); }
.tag-check input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tag-check input:checked + span::before { content: '✓ '; }
.tag-check input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.drill-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.drill-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-size: .8rem; text-decoration: none; }
a.drill-tag:hover { border-color: var(--brand); color: var(--brand); }
.drill-tag.is-on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
