/*
  pl-pages.css : PAF-IAST Central Library, Koha OPAC theme "pafiast".
  Page family "pages": every other public page. Loaded (after pl-base.css) only by these templates:
    opac-library, opac-shelves (public view), opac-basket (cart popup), opac-downloadcart, opac-search-history
    (anonymous), opac-tags, opac-auth (login page), opac-password-recovery, opac-reset-password, opac-blocked,
    errors/errorpage, maintenance, opac-course-reserves, opac-course-details, opac-showreviews, opac-browser,
    opac-browse, opac-tags_subject, opac-page, opac-overdrive-search, ilsdi.

  Contents
    0.  Shared patterns: page title, empty states, segmented tabs, pill toolbars, DataTables controls, tables
    1.  Library page (#opac-library)
    2.  Lists (#opac-lists, #opac-userlists: public lists, list contents)
    3.  Cart popup (#basket) and download cart popup (#opac-downloadcart)
    4.  Search history (#opac-search-history)
    5.  Tags (#opac-tags) and subject cloud (#opac-tags-subject)
    6.  Sign-in pages: login (#opac-login-page, also used by opac-reset-password), password recovery, blocked record
    7.  Error pages (body.error: 400 / 401 / 402 / 403 / 404 / 500)
    8.  Maintenance (#opac_maintenance)
    9.  Course reserves and course details
    10. Recent comments (#opac-showreviews)
    11. Browse (#opac-browser), CMS pages (#opac-page-N), OverDrive (#overdrive-results-page), ILS-DI (#opac_ilsdi)
    12. Responsive
    13. Reduced motion, print

  Rules: every selector is scoped under .pl-theme (the patron account pages, served without it, are untouched).
  Reuses the --pl-* tokens of pl-base.css and never redefines them. Koha markup is restyled, never relied on to
  change: ids/classes used by Koha JS (.close = window.close, #floating hc-sticky, .cb, .deleteshelf, .clearsh,
  DataTables) keep their behaviour. Icons come from Koha's own Font Awesome 6 font; images only from the theme
  (images/pl). Motion uses transform/opacity only.
*/

/* =========================================================
   0. SHARED PATTERNS
   ========================================================= */

/* 0.1 Page title: the plain navy heading of the search pages (pl-base size, 18px below), no rule under it;
   the approved design accents titles with eyebrow labels, not bars */
.pl-theme .main :where(.maincontent, #ilsdi, [id^="errormsg"]) > h1:not(.sr-only),
.pl-theme .main :where(body#opac-browser .row > [class*="col"]) > h1 {
  margin-bottom: 18px;
}

/* 0.2 Empty states: the home page's icon tile above a short, centred message on a soft dashed panel.
   .pl-empty is a hook for empty-state copy the templates may add later (see the core requests); unused until then. */
.pl-theme .main .pl-empty,
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .tab-content > .tab-pane.active:not(:has(table)),
body#opac-search-history.pl-theme #searchhistory :is(#biblio_tab, #authority_tab) > p,
body#opac-search-history.pl-theme #searchhistory > p,
body#opac-password-recovery.pl-theme #password-recovery > .alert-info:not(:has(*)),
body#opac-tags-subject.pl-theme #subjectcloud > .alert-info,
body#opac-browser.pl-theme #userbrowser > .warning,
body#opac-browser.pl-theme .main .row > [class*="col"] > h1 + .alert-info,
body#opac-course-details.pl-theme #course_reserves > .alert-info {
  /* block, not flex: some messages mix text and links (browser warning) and must flow as one paragraph */
  display: block;
  margin: 8px 0 4px;
  padding: 40px 24px 38px;
  border: 1px dashed var(--pl-line-strong);
  border-radius: var(--pl-radius);
  background: var(--pl-bg-soft);
  color: var(--pl-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  text-align: center;
}
.pl-theme .main .pl-empty::before,
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .tab-content > .tab-pane.active:not(:has(table))::before,
body#opac-search-history.pl-theme #searchhistory :is(#biblio_tab, #authority_tab) > p::before,
body#opac-search-history.pl-theme #searchhistory > p::before,
body#opac-password-recovery.pl-theme #password-recovery > .alert-info:not(:has(*))::before,
body#opac-tags-subject.pl-theme #subjectcloud > .alert-info::before,
body#opac-browser.pl-theme #userbrowser > .warning::before,
body#opac-browser.pl-theme .main .row > [class*="col"] > h1 + .alert-info::before,
body#opac-course-details.pl-theme #course_reserves > .alert-info::before,
.pl-theme .main table.dataTable tbody td.dataTables_empty::before {
  content: "\f05a";
  content: "\f05a" / "";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(31, 95, 168, .14), rgba(20, 61, 110, .06));
  color: var(--pl-navy);
  font: 900 22px/1 "Font Awesome 6 Free";
}
:is(body#opac-tags-subject, body#opac-browser, body#opac-course-details, body#opac-password-recovery).pl-theme .alert :where(p:last-child) {
  margin-bottom: 0;
}

/* 0.3 Segmented tabs (lists, search history): pill track, white active pill */
body:is(#opac-lists, #opac-userlists, #opac-search-history).pl-theme .main .nav-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  margin: 0 0 22px;
  padding: 4px;
  border: 1px solid var(--pl-line);
  border-radius: 999px;
  background: var(--pl-bg-soft);
}
body:is(#opac-lists, #opac-userlists, #opac-search-history).pl-theme .main .nav-tabs .nav-item {
  margin: 0;
}
body:is(#opac-lists, #opac-userlists, #opac-search-history).pl-theme .main .nav-tabs .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pl-muted);
  font: 600 14px/1.2 var(--pl-sans);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--pl-ease), color .2s var(--pl-ease), box-shadow .2s var(--pl-ease);
}
body:is(#opac-lists, #opac-userlists, #opac-search-history).pl-theme .main .nav-tabs .nav-link:hover,
body:is(#opac-lists, #opac-userlists, #opac-search-history).pl-theme .main .nav-tabs .nav-link:focus-visible {
  background: rgba(255, 255, 255, .7);
  color: var(--pl-navy);
}
body:is(#opac-lists, #opac-userlists, #opac-search-history).pl-theme .main .nav-tabs .nav-link.active {
  background: var(--pl-bg);
  color: var(--pl-navy);
  box-shadow: 0 1px 2px rgba(10, 29, 56, .08), 0 6px 14px -8px rgba(10, 29, 56, .35);
  cursor: default;
}
body:is(#opac-lists, #opac-userlists, #opac-search-history).pl-theme .main .tab-content {
  padding-top: 0;
}

/* 0.4 Toolbars (cart, search history, list contents): soft panels holding pill actions */
.pl-theme .main :is(#toolbar, .selections-toolbar) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0 0 10px;
  padding: 7px 8px;
  border: 1px solid var(--pl-line);
  border-radius: 14px;
  background: var(--pl-bg-soft);
  font-size: 14px;
  vertical-align: baseline;
}
.pl-theme .main .selections-toolbar .check_control,
.pl-theme .main .selections-toolbar .links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
/* opac.css draws "|" separators with ::before; one hairline replaces them */
.pl-theme .main .selections-toolbar .check_control::before,
.pl-theme .main .selections-toolbar .selections::before {
  content: none;
}
.pl-theme .main .selections-toolbar .links {
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--pl-line-strong);
}
.pl-theme .main .selections-toolbar .selections {
  padding: 0 4px;
  color: var(--pl-muted);
  font-size: 13px;
  font-weight: 600;
}
.pl-theme .main :is(#toolbar, .selections-toolbar) :is(a.btn, button.btn, .dt-button),
.pl-theme .main .dt-buttons .dt-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--pl-navy);
  font: 600 13.5px/1.2 var(--pl-sans);
  text-decoration: none;
  text-shadow: none;
  white-space: nowrap;
  box-shadow: none;
  transition: background-color .2s var(--pl-ease), border-color .2s var(--pl-ease), color .2s var(--pl-ease);
}
.pl-theme .main :is(#toolbar, .selections-toolbar) :is(a.btn, button.btn, .dt-button):hover,
.pl-theme .main :is(#toolbar, .selections-toolbar) :is(a.btn, button.btn, .dt-button):focus-visible,
.pl-theme .main :is(#toolbar, .selections-toolbar) .show > a.btn,
.pl-theme .main .dt-buttons .dt-button:hover,
.pl-theme .main .dt-buttons .dt-button:focus-visible {
  background: var(--pl-bg);
  border-color: var(--pl-line);
  color: var(--pl-navy-dark);
  text-decoration: none;
}
.pl-theme .main :is(#toolbar, .selections-toolbar) :is(a, button) i.fa,
.pl-theme .main :is(#toolbar, .selections-toolbar) :is(a, button) i.fa-solid,
.pl-theme .main .dt-buttons .dt-button::before {
  color: var(--pl-blue);
}
.pl-theme .main :is(#toolbar, .selections-toolbar) a.remove:hover,
.pl-theme .main :is(#toolbar, .selections-toolbar) a.remove:hover i.fa {
  color: #b42318;
}
.pl-theme .main :is(#toolbar, .selections-toolbar) :is(a, button).disabled,
.pl-theme .main :is(#toolbar, .selections-toolbar) :is(a, button)[disabled] {
  color: var(--pl-muted);
  opacity: .5;
}
.pl-theme .main :is(#toolbar, .selections-toolbar) :is(a, button).disabled i.fa {
  color: inherit;
}
.pl-theme .main :is(#toolbar, .selections-toolbar) .dropdown-toggle::after {
  margin-left: 2px;
  opacity: .7;
}
.pl-theme .main #toolbar .caret {
  display: none;
}
.pl-theme .main :is(#toolbar, .selections-toolbar) .dt-buttons {
  display: inline-flex;
  margin: 0;
}

/* 0.5 DataTables controls: pill search field, ghost pill buttons */
.pl-theme .main .dataTables_wrapper .top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 12px;
}
.pl-theme .main .dataTables_wrapper .top .table_controls {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
}
/* Koha's entries slot is often empty: without this the controls float to the middle of the row */
.pl-theme .main .dataTables_wrapper .top .table_entries:empty {
  display: none;
}
.pl-theme .main .dataTables_wrapper .dataTables_filter {
  float: none;
  margin: 0;
  text-align: left;
}
.pl-theme .main .dataTables_wrapper .dataTables_filter label {
  margin: 0;
  font-weight: 500;
}
.pl-theme .main .dataTables_wrapper .dataTables_filter input[type="search"] {
  display: inline-block;
  width: 260px;
  max-width: 100%;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 16px 0 40px;
  border: 1px solid var(--pl-line-strong);
  border-radius: 999px;
  background: var(--pl-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2352627a' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6'/%3E%3C/svg%3E") no-repeat 15px center;
  color: var(--pl-ink);
  font: 500 14px/1.2 var(--pl-sans);
  box-shadow: none;
}
.pl-theme .main .dataTables_wrapper .dataTables_filter input[type="search"]:focus {
  border-color: var(--pl-blue);
  box-shadow: 0 0 0 4px rgba(31, 95, 168, .14);
  outline: none;
}
.pl-theme .main .dataTables_wrapper .dt-buttons {
  gap: 2px;
}
.pl-theme .main .dataTables_wrapper .dt-buttons .dt-button {
  min-height: 36px;
  color: var(--pl-blue);
}
.pl-theme .main .dataTables_wrapper .dt_button_clear_filter.disabled {
  opacity: .45;
}
/* Responsive "+" control of collapsed rows (phones): a small round button, navy when the row is open */
.pl-theme .main table.dataTable.dtr-column > tbody > tr > td.dtr-control::before {
  /* opac.css adds padding and a grey gradient image to this control: both reset */
  width: 18px;
  height: 18px;
  margin-top: -10px;
  margin-left: -10px;
  padding: 0;
  border: 1px solid var(--pl-line-strong);
  border-radius: 50%;
  background-color: var(--pl-bg);
  background-image: none;
  color: var(--pl-navy);
  font: 700 15px/18px var(--pl-sans);
  text-align: center;
  text-indent: 0;
  box-shadow: 0 1px 2px rgba(10, 29, 56, .08);
}
.pl-theme .main table.dataTable.dtr-column > tbody > tr.parent > td.dtr-control::before {
  border-color: var(--pl-navy);
  background-color: var(--pl-navy);
  background-image: none;
  color: #fff;
}
.pl-theme .main table.dataTable > tbody > tr.child ul.dtr-details > li {
  border-bottom-color: var(--pl-line);
}
.pl-theme .main table.dataTable > tbody > tr.child span.dtr-title {
  color: var(--pl-muted);
  font-size: 12.5px;
  font-weight: 600;
}

/* 0.6 Tables: a calm white frame, horizontal hairlines only, soft header row */
.pl-theme .main :is(table.historyt, #course_reserves_table, #course-items-table, #itemst, #usershelves .tab-pane > table.table) {
  margin-bottom: 14px;
  border: 1px solid var(--pl-line);
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: 14px;
  background: var(--pl-bg);
}
.pl-theme .main :is(table.historyt, #course_reserves_table, #course-items-table, #itemst, #usershelves .tab-pane > table.table) :is(th, td) {
  padding: 12px 14px;
  border: 0;
  border-top: 1px solid var(--pl-line);
  vertical-align: top;
}
.pl-theme .main :is(table.historyt, #course_reserves_table, #course-items-table, #itemst, #usershelves .tab-pane > table.table) thead th {
  padding-top: 11px;
  padding-bottom: 11px;
  border-top: 0;
  border-bottom: 1px solid var(--pl-line-strong);
  background-color: var(--pl-bg-soft);
  color: var(--pl-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pl-theme .main :is(table.historyt, #course_reserves_table, #course-items-table, #itemst, #usershelves .tab-pane > table.table) thead th:first-child {
  border-top-left-radius: 13px;
}
/* DataTables Responsive hides trailing columns (th.dtr-hidden): round the last visible cell */
.pl-theme .main :is(table.historyt, #course_reserves_table, #course-items-table, #itemst, #usershelves .tab-pane > table.table) thead th:not(.dtr-hidden):not(:has(~ th:not(.dtr-hidden))) {
  border-top-right-radius: 13px;
}
.pl-theme .main :is(table.historyt, #course_reserves_table, #course-items-table, #itemst, #usershelves .tab-pane > table.table) tbody tr:first-child > :is(td, th) {
  border-top: 0;
}
.pl-theme .main :is(table.historyt, #course_reserves_table, #course-items-table, #itemst) tbody tr:last-child > td:first-child {
  border-bottom-left-radius: 13px;
}
.pl-theme .main :is(table.historyt, #course_reserves_table, #course-items-table, #itemst) tbody tr:last-child > td:not(.dtr-hidden):not(:has(~ td:not(.dtr-hidden))) {
  border-bottom-right-radius: 13px;
}
.pl-theme .main :is(table.historyt, #course_reserves_table, #course-items-table, #itemst).table-striped tbody > tr:nth-child(odd) > td {
  background-color: #fafbfd;
}
.pl-theme .main :is(table.historyt, #itemst) td.selectcol {
  width: 44px;
  text-align: center;
}
.pl-theme .main :is(table.historyt, #itemst) td.selectcol input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  vertical-align: middle;
  cursor: pointer;
}
/* DataTables sort arrows: opac.css pins them low (100% 75-80%) with no room reserved, so they crowd short labels
   ("Year"); here they sit centred on the label line with their own space */
.pl-theme .main table.dataTable thead :is(.sorting, .sorting_asc, .sorting_desc) {
  cursor: pointer;
}
.pl-theme .main :is(table.historyt, #course_reserves_table, #course-items-table, #itemst, #usershelves .tab-pane > table.table) thead th:is(.sorting, .sorting_asc, .sorting_desc) {
  padding-right: 30px;
  background-position: right 10px center;
}
/* "No data available in table" */
.pl-theme .main table.dataTable tbody td.dataTables_empty {
  padding: 40px 16px 38px;
  background: var(--pl-bg) !important;
  color: var(--pl-muted);
  font-size: 14.5px;
  text-align: center;
}
.pl-theme .main table.dataTable tbody td.dataTables_empty::before {
  margin: 0 auto 12px;
}
/* wide tables scroll inside their own wrapper, never the page */
.pl-theme .main :is(#itemst_wrapper, #course_reserves_table_wrapper, #course-items-table_wrapper),
.pl-theme .main .dataTables_wrapper:has(> table.historyt) {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 0.7 Small round RSS links next to headings and searches */
.pl-theme .main h1 a.rsssearchlink,
.pl-theme .main h1 a.rss-list-link {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: 8px;
  border-radius: 50%;
  background: #fff2e5;
  color: #d9670b;
  font-size: 13px;
  vertical-align: middle;
  text-decoration: none;
  transition: background-color .2s var(--pl-ease);
}
.pl-theme .main h1 a.rsssearchlink:hover,
.pl-theme .main h1 a.rss-list-link:hover {
  background: #ffe2c4;
}
/* opac.css paints .fa.fa-rss as a white glyph on an orange square; inside the round button it is just the glyph */
.pl-theme .main :is(h1, .historyt) :is(a.rsssearchlink, a.rss-list-link) .fa {
  width: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  text-shadow: none;
}

/* =========================================================
   1. LIBRARY PAGE (#opac-library)
   ========================================================= */
/* the library name sits on a navy band with the PAF-IAST mark: a complete header even when Koha holds no address */
body#opac-library.pl-theme #library_info > h1 {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 112px;
  margin: 0 0 22px;
  padding: 28px 32px 28px 116px;
  border-bottom: 3px solid var(--pl-gold);
  border-radius: 16px;
  background: linear-gradient(135deg, #1a4a82 0%, var(--pl-navy-dark) 55%, var(--pl-navy-ink) 100%);
  color: #fff;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -.02em;
  box-shadow: 0 24px 40px -30px rgba(10, 29, 56, .7);
  overflow: hidden;
}
body#opac-library.pl-theme #library_info > h1::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 28px;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #fff url("../../images/pl/paf-iast-mark.png") no-repeat center / 48px auto;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .6);
  transform: translateY(-50%);
}
body#opac-library.pl-theme #library_info > h1::after {
  /* a faint library-building watermark in the band's corner, in place of the gold title rule */
  content: "\f19c";
  content: "\f19c" / "";
  position: absolute;
  top: 50%;
  right: 34px;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 0;
  background: none;
  color: rgba(255, 255, 255, .09);
  font: 900 92px/1 "Font Awesome 6 Free";
  transform: translateY(-50%) rotate(-6deg);
  pointer-events: none;
}
/* contact facts (address, phone, fax, website) as icon rows */
body#opac-library.pl-theme #library_info > .row > [class*="col-"] {
  flex: 1 1 auto;
  max-width: 760px;
}
body#opac-library.pl-theme #library_info :is(.branchaddress, .branchphone, .branchfax, .branchurl) {
  position: relative;
  margin: 0 0 12px;
  padding: 2px 0 2px 48px;
  min-height: 36px;
  color: var(--pl-ink);
  font-size: 15px;
  line-height: 1.6;
}
body#opac-library.pl-theme #library_info :is(.branchaddress, .branchphone, .branchfax, .branchurl)::before {
  content: "\f3c5";
  content: "\f3c5" / "";
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(31, 95, 168, .14), rgba(20, 61, 110, .06));
  color: var(--pl-navy);
  font: 900 14px/1 "Font Awesome 6 Free";
}
body#opac-library.pl-theme #library_info .branchphone::before {
  content: "\f095";
  content: "\f095" / "";
}
body#opac-library.pl-theme #library_info .branchfax::before {
  content: "\f1ac";
  content: "\f1ac" / "";
}
body#opac-library.pl-theme #library_info .branchurl::before {
  content: "\f0ac";
  content: "\f0ac" / "";
}
body#opac-library.pl-theme #library_info .branchaddress:not(:has(*)) {
  display: none;
}
body#opac-library.pl-theme #library_info .branchurl a {
  overflow-wrap: anywhere;
}
body#opac-library.pl-theme #library_info > .row:not(:has(.branchaddress *, .branchphone, .branchfax, .branchurl, .library_description)) {
  display: none;
}
body#opac-library.pl-theme #library_info .library_description {
  margin-top: 18px;
  padding: 20px 22px;
  border: 1px solid var(--pl-line);
  border-radius: 14px;
  background: var(--pl-bg-soft);
}
body#opac-library.pl-theme #library_info .library_description > hr {
  display: none;
}
body#opac-library.pl-theme #library_info .library_description img {
  max-width: 100%;
  height: auto;
}
/* several libraries: one card per library */
body#opac-library.pl-theme #library_info .section_library {
  margin: 0 0 14px;
  padding: 20px 22px 8px;
  border: 1px solid var(--pl-line);
  border-radius: 14px;
  background: var(--pl-bg);
}
body#opac-library.pl-theme #library_info .section_library > h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
body#opac-library.pl-theme #library_info .section_library > h2 a {
  color: var(--pl-navy);
  text-decoration: none;
}
body#opac-library.pl-theme #library_info .section_library > h2 a:hover {
  color: var(--pl-blue);
  text-decoration: underline;
}

/* =========================================================
   2. LISTS (#opac-lists, #opac-userlists)
   ========================================================= */
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .tab-content > .tab-pane.active:not(:has(table)) {
  /* block children only (alert, p): a column so the message reads before the call to action */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .tab-content > .tab-pane.active:not(:has(table))::before {
  content: "\f03a";
  content: "\f03a" / "";
  margin: 0;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .tab-content > .tab-pane.active:not(:has(table)) > p {
  order: 1;
  margin: 0;
  color: var(--pl-navy);
  font-size: 16px;
  font-weight: 600;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .tab-content > .tab-pane.active:not(:has(table)) > .alert {
  order: 2;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: none;
}
/* "Log in to create a new list": a navy pill wherever it appears */
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .alert-info > a[href*="op=add_form"]:only-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--pl-navy);
  color: #fff;
  font: 600 14.5px/1.2 var(--pl-sans);
  text-decoration: none;
  transition: background-color .2s var(--pl-ease);
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .alert-info > a[href*="op=add_form"]:only-child::before {
  content: "\f2f6";
  content: "\f2f6" / "";
  font: 900 13px/1 "Font Awesome 6 Free";
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .alert-info > a[href*="op=add_form"]:only-child:hover,
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .alert-info > a[href*="op=add_form"]:only-child:focus-visible {
  background: var(--pl-navy-dark);
  color: #fff;
}
/* the same call to action outside an empty panel (lists exist, or no list operation) */
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .tab-pane:has(table) > .alert-info:has(> a[href*="op=add_form"]:only-child),
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves > .alert-info:has(> a[href*="op=add_form"]:only-child) {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: none;
}
/* lists table: list name in navy, quiet meta columns */
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .tab-pane > table.table td:first-child a {
  color: var(--pl-navy);
  font-weight: 600;
  text-decoration: none;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .tab-pane > table.table td:first-child a:hover {
  color: var(--pl-blue);
  text-decoration: underline;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .tab-pane > table.table td:not(:first-child) {
  color: var(--pl-muted);
}
/* list contents (op=view of a public list) */
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves > h1 + p {
  margin: -8px 0 14px;
  color: var(--pl-muted);
  font-size: 14px;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #toolbar {
  justify-content: space-between;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #toolbar .list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #toolbar .sep {
  display: none;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #toolbar #sorting-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  float: none;
  margin: 0;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #toolbar #sorting-form label {
  margin: 0;
  color: var(--pl-muted);
  font-size: 13px;
  font-weight: 600;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #toolbar #sorting-form select {
  min-height: 36px;
  border-radius: 999px;
  font-size: 14px;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #toolbar #sorting-form .btn {
  min-height: 36px;
  padding: 0 16px;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #listcontents {
  border-collapse: separate;
  border-spacing: 0;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #listcontents td {
  padding: 18px 10px;
  border-top: 1px solid var(--pl-line);
  vertical-align: top;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #listcontents tr:first-child td {
  border-top: 0;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #listcontents .coverimages {
  float: right;
  margin: 0 0 8px 16px;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #listcontents .coverimages img {
  max-width: 76px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 14px -8px rgba(10, 29, 56, .5);
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #listcontents a.title {
  color: var(--pl-navy);
  font-size: 16px;
  font-weight: 600;
}
body:is(#opac-lists, #opac-userlists).pl-theme #usershelves #listcontents .results_summary .label {
  color: var(--pl-muted);
  font-weight: 600;
}

/* =========================================================
   3. CART POPUP (#basket) AND DOWNLOAD CART POPUP (#opac-downloadcart)
   ========================================================= */
/* opened by basket.js in an 820x450 window with no header: the card carries a small brand title */
body#basket.pl-theme,
body#opac-downloadcart.pl-theme {
  border-top: 3px solid var(--pl-navy);
}
body#basket.pl-theme .main,
body#opac-downloadcart.pl-theme .main {
  padding: 14px 16px 18px;
}
body#basket.pl-theme #userbasket > h1,
body#opac-downloadcart.pl-theme #userdownloadcart > h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 21px;
  letter-spacing: -.02em;
}
body#basket.pl-theme #userbasket > h1::before,
body#opac-downloadcart.pl-theme #userdownloadcart > h1::before {
  content: "";
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--pl-bg-soft) url("../../images/pl/paf-iast-mark.png") no-repeat center / 27px auto;
  box-shadow: inset 0 0 0 1px var(--pl-line);
}
body#basket.pl-theme #userbasket > h1::after,
body#opac-downloadcart.pl-theme #userdownloadcart > h1::after {
  /* the brand mark leads the title in the popups: no gold rule under it */
  display: none;
}
/* the sticky toolbar (hc-sticky on #floating) stays opaque over the table while scrolling */
body#basket.pl-theme #floating {
  z-index: 5;
  background: var(--pl-bg);
}
body#basket.pl-theme #floating.floating {
  padding-top: 8px;
  box-shadow: 0 12px 18px -16px rgba(10, 29, 56, .5);
}
/* the popup window is small (820x450): compact toolbars keep the table in view */
body#basket.pl-theme .main :is(#toolbar, .selections-toolbar) {
  gap: 2px;
  padding: 4px 6px;
  border-radius: 12px;
}
body#basket.pl-theme .main :is(#toolbar, .selections-toolbar) :is(a.btn, button.btn, .dt-button) {
  min-height: 32px;
  padding: 0 9px;
  font-size: 13px;
}
body#basket.pl-theme #toolbar {
  margin-bottom: 6px;
}
body#basket.pl-theme #toolbar .btn-group {
  margin: 0;
}
/* "Hide window" keeps class close (global.js: window.close) */
body#basket.pl-theme #toolbar a.close {
  float: none;
  opacity: 1;
  font-size: 13.5px;
  font-weight: 600;
  text-shadow: none;
}
body#basket.pl-theme #toolbar .dropdown-menu {
  min-width: 230px;
  margin-top: 6px;
}
body#basket.pl-theme .selections-toolbar {
  margin-bottom: 14px;
}
/* brief view: the cart table */
body#basket.pl-theme #itemst a.bib_opener {
  color: var(--pl-navy);
  font-weight: 600;
  text-decoration: none;
}
body#basket.pl-theme #itemst a.bib_opener:hover,
body#basket.pl-theme #itemst a.bib_opener:focus-visible {
  color: var(--pl-blue);
  text-decoration: underline;
}
body#basket.pl-theme #itemst td {
  font-size: 14px;
}
body#basket.pl-theme #itemst td:nth-child(3),
body#basket.pl-theme #itemst td:nth-child(4) {
  color: var(--pl-muted);
}
body#basket.pl-theme #itemst td ul,
body#basket.pl-theme form#bookbag_form table.table td ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
body#basket.pl-theme #itemst td li,
body#basket.pl-theme form#bookbag_form table.table td li {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.5;
}
body#basket.pl-theme #itemst td li:last-child,
body#basket.pl-theme form#bookbag_form table.table td li:last-child {
  margin-bottom: 0;
}
body#basket.pl-theme :is(#itemst, form#bookbag_form) .shelvingloc {
  color: var(--pl-muted);
}
body#basket.pl-theme :is(#itemst, form#bookbag_form) .item-status.available {
  color: #1f7a45;
  font-weight: 600;
}
body#basket.pl-theme :is(#itemst, form#bookbag_form) .item-status:not(.available) {
  color: #9a5b00;
  font-weight: 600;
}
/* verbose view ("More details"): one titled block per record */
body#basket.pl-theme form#bookbag_form > h2 {
  /* block with a hanging indent: the h2 mixes a checkbox, title spans and the author text */
  display: block;
  margin: 22px 0 10px;
  padding: 18px 0 0 28px;
  border-top: 1px solid var(--pl-line);
  color: var(--pl-navy);
  font-size: 17px;
  line-height: 1.35;
  text-indent: -28px;
}
body#basket.pl-theme form#bookbag_form > h2:first-of-type {
  margin-top: 4px;
  padding-top: 0;
  border-top: 0;
}
body#basket.pl-theme form#bookbag_form > h2 input.cb {
  width: 17px;
  height: 17px;
  margin: 0 11px 0 0;
  text-indent: 0;
  vertical-align: -2px;
}
body#basket.pl-theme form#bookbag_form > table.table {
  margin-bottom: 6px;
  border: 1px solid var(--pl-line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  font-size: 14px;
}
body#basket.pl-theme form#bookbag_form > table.table :is(th, td) {
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--pl-line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
body#basket.pl-theme form#bookbag_form > table.table tr:first-child > :is(th, td) {
  border-top: 0;
}
/* square cell backgrounds would paint over the frame's rounded corners */
body#basket.pl-theme form#bookbag_form > table.table tr:first-child > :first-child {
  border-top-left-radius: 13px;
}
body#basket.pl-theme form#bookbag_form > table.table tr:first-child > :last-child {
  border-top-right-radius: 13px;
}
body#basket.pl-theme form#bookbag_form > table.table tr:last-child > :first-child {
  border-bottom-left-radius: 13px;
}
body#basket.pl-theme form#bookbag_form > table.table tr:last-child > :last-child {
  border-bottom-right-radius: 13px;
}
body#basket.pl-theme form#bookbag_form > table.table th[scope="row"] {
  width: 170px;
  color: var(--pl-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
body#basket.pl-theme form#bookbag_form > table.table td p {
  margin: 0 0 4px;
}
body#basket.pl-theme form#bookbag_form > table.table td p:last-child {
  margin-bottom: 0;
}
/* empty cart opened by URL */
body#basket.pl-theme #itemst td.dataTables_empty::before {
  content: "\f07a";
  content: "\f07a" / "";
}

/* download cart: format picker */
body#opac-downloadcart.pl-theme #userdownloadcart form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 4px 0 8px;
  padding: 16px;
  border: 1px solid var(--pl-line);
  border-radius: 14px;
  background: var(--pl-bg-soft);
}
body#opac-downloadcart.pl-theme #userdownloadcart #format {
  flex: 1 1 220px;
  min-width: 0; /* a select's intrinsic width would otherwise push past the panel on narrow windows */
  max-width: 320px;
  min-height: 44px;
  border-radius: 999px;
  padding-left: 18px;
}
body#opac-downloadcart.pl-theme #userdownloadcart fieldset.action {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
}
body#opac-downloadcart.pl-theme #userdownloadcart input[type="submit"] {
  min-height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--pl-navy);
  color: #fff;
  font: 600 15px/1 var(--pl-sans);
  cursor: pointer;
  transition: background-color .2s var(--pl-ease);
}
body#opac-downloadcart.pl-theme #userdownloadcart input[type="submit"]:hover,
body#opac-downloadcart.pl-theme #userdownloadcart input[type="submit"]:focus-visible {
  background: var(--pl-navy-dark);
}
body#opac-downloadcart.pl-theme #userdownloadcart a.close {
  float: none;
  color: var(--pl-blue);
  font-size: 14px;
  font-weight: 600;
  opacity: 1;
  text-shadow: none;
}
body#opac-downloadcart.pl-theme #userdownloadcart > p {
  margin: 10px 0 0;
}

/* =========================================================
   4. SEARCH HISTORY (#opac-search-history, logged out)
   ========================================================= */
body#opac-search-history.pl-theme #searchhistory h2 {
  margin: 4px 0 14px;
  font-size: 18px;
}
body#opac-search-history.pl-theme #searchhistory :is(#biblio_tab, #authority_tab) > p::before,
body#opac-search-history.pl-theme #searchhistory > p::before {
  content: "\f1da";
  content: "\f1da" / "";
}
/* the hairline before "Previous sessions": an anonymous history only ever has the current session */
body#opac-search-history.pl-theme #searchhistory :is(#current_biblio, #current_authority) + hr {
  display: none;
}
body#opac-search-history.pl-theme #searchhistory :is(#current_biblio, #current_authority, #previous_biblio, #previous_authority):not(:has(*)) {
  display: none;
}
/* one line per search: checkbox, date, query (with its round RSS button) and count share a centre line */
body#opac-search-history.pl-theme #searchhistory .historyt tbody td {
  vertical-align: middle;
}
body#opac-search-history.pl-theme #searchhistory .historyt td:nth-child(2) label {
  margin: 0;
  color: var(--pl-muted);
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
body#opac-search-history.pl-theme #searchhistory .historyt td:nth-child(3) a:not(.rsssearchlink) {
  color: var(--pl-navy);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
body#opac-search-history.pl-theme #searchhistory .historyt td:nth-child(3) a:not(.rsssearchlink):hover {
  color: var(--pl-blue);
  text-decoration: underline;
}
body#opac-search-history.pl-theme #searchhistory .historyt a.rsssearchlink {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  border-radius: 50%;
  background: #fff2e5;
  color: #d9670b;
  font-size: 11px;
  vertical-align: 1px;
  text-decoration: none;
}
body#opac-search-history.pl-theme #searchhistory .historyt td:nth-child(4) {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
body#opac-search-history.pl-theme #searchhistory .remove-selected {
  min-height: 40px;
  padding: 0 20px;
  font-size: 14px;
}
body#opac-search-history.pl-theme #searchhistory .remove-selected.disabled {
  opacity: .45;
  pointer-events: none;
}

/* =========================================================
   5. TAGS (#opac-tags) AND SUBJECT CLOUD (#opac-tags-subject)
   ========================================================= */
/* the "tags to show" form becomes one soft row; with no tag cloud it is the page's centred panel */
body#opac-tags.pl-theme #usertags > form.form-inline {
  display: block;
}
body#opac-tags.pl-theme #usertags > form.form-inline > fieldset {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid var(--pl-line);
  border-radius: 16px;
  background: var(--pl-bg-soft);
}
body#opac-tags.pl-theme #usertags > form.form-inline .form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
body#opac-tags.pl-theme #usertags > form.form-inline label {
  margin: 0;
  color: var(--pl-ink);
  font-size: 14.5px;
  font-weight: 600;
}
body#opac-tags.pl-theme #usertags > form.form-inline input[name="limit"] {
  width: 84px;
  min-height: 40px;
  margin: 0 !important;
  border-radius: 999px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
body#opac-tags.pl-theme #usertags > form.form-inline input[type="submit"] {
  min-height: 40px;
  padding: 0 20px;
  font-size: 14px;
}
body#opac-tags.pl-theme #usertags > form.form-inline p {
  margin: 0;
  font-size: 14px;
}
body#opac-tags.pl-theme #usertags > form.form-inline a.loginModal-trigger {
  font-weight: 600;
}
body#opac-tags.pl-theme #usertags:not(:has(#tagcloud)) > form.form-inline > fieldset {
  align-items: center;
  padding: 36px 24px 32px;
  border-style: dashed;
  border-color: var(--pl-line-strong);
  border-radius: var(--pl-radius);
  text-align: center;
}
body#opac-tags.pl-theme #usertags:not(:has(#tagcloud)) > form.form-inline > fieldset::before {
  content: "\f02c";
  content: "\f02c" / "";
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(31, 95, 168, .14), rgba(20, 61, 110, .06));
  color: var(--pl-navy);
  font: 900 22px/1 "Font Awesome 6 Free";
}
body#opac-tags.pl-theme #usertags:not(:has(#tagcloud)) > form.form-inline .form-inline {
  justify-content: center;
}
/* Koha prints no sentence when the cloud is empty, so the panel says it (a row of its own above the form) */
body#opac-tags.pl-theme #usertags:not(:has(#tagcloud)) > form.form-inline .form-inline::before {
  content: "No tags have been added yet.";
  flex: 1 1 100%;
  margin: 2px 0 6px;
  color: var(--pl-navy);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
}
/* tag cloud: pills, sized by Koha's tagweight0-9 classes */
body#opac-tags.pl-theme #tagcloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 8px;
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid var(--pl-line);
  border-radius: 16px;
  background: var(--pl-bg);
  text-align: left;
}
body#opac-tags.pl-theme #tagcloud .tag {
  padding: 0;
  line-height: 1.2;
}
body#opac-tags.pl-theme #tagcloud .tag > a {
  display: inline-block;
  padding: .3em .85em;
  border: 1px solid var(--pl-line);
  border-radius: 999px;
  background: var(--pl-bg-soft);
  color: var(--pl-navy);
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s var(--pl-ease), border-color .2s var(--pl-ease), color .2s var(--pl-ease);
}
body#opac-tags.pl-theme #tagcloud .tag > a:hover,
body#opac-tags.pl-theme #tagcloud .tag > a:focus-visible {
  border-color: var(--pl-navy);
  background: var(--pl-navy);
  color: #fff;
}
body#opac-tags.pl-theme #usertags .dialog.message {
  margin: 0 0 14px;
  padding: .85rem 1.1rem;
  border: 1px solid #cbe8d4;
  border-left: 4px solid #2f8f5b;
  border-radius: var(--pl-radius-sm);
  background: #eef8f1;
  color: #14532d;
}

/* subject cloud */
body#opac-tags-subject.pl-theme #subjectcloud > .alert-info::before {
  content: "\f0c2";
  content: "\f0c2" / "";
}
body#opac-tags-subject.pl-theme #subjectcloud > fieldset {
  margin: 0 0 16px;
  padding: 14px 18px;
  border: 1px solid var(--pl-line);
  border-radius: 14px;
  background: var(--pl-bg-soft);
}
body#opac-tags-subject.pl-theme #subjectcloud > fieldset legend {
  width: auto;
  margin: 0;
  padding: 0 6px;
  font-size: 14px;
}
body#opac-tags-subject.pl-theme #subjectcloud > fieldset p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}
body#opac-tags-subject.pl-theme #subjectcloud > fieldset input[type="text"] {
  width: 76px;
  text-align: center;
}
body#opac-tags-subject.pl-theme #subjectcloud > a {
  display: inline-block;
  margin: 0 4px 8px 0;
  padding: .2em .75em;
  border-radius: 999px;
  background: var(--pl-bg-soft);
  color: var(--pl-navy);
  text-decoration: none;
}
body#opac-tags-subject.pl-theme #subjectcloud > a:hover {
  background: var(--pl-navy);
  color: #fff;
}

/* =========================================================
   6. SIGN-IN PAGES
   ========================================================= */
/* Login (opac-auth.tt) and expired-password reset (opac-reset-password.tt) share body#opac-login-page and
   #opac-auth; the password recovery and blocked-record pages use the same centred card on the soft page */
body:is(#opac-login-page, #opac-password-recovery, #opac-blocked).pl-theme .main {
  max-width: calc(var(--pl-wrap) - 2 * var(--pl-gutter));
  margin-top: 30px;
  margin-bottom: 64px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body:is(#opac-login-page, #opac-password-recovery, #opac-blocked).pl-theme .main .breadcrumbs {
  margin-bottom: 20px;
}
body:is(#opac-login-page, #opac-password-recovery, #opac-blocked).pl-theme .main .breadcrumb {
  justify-content: center;
}
body:is(#opac-login-page, #opac-blocked).pl-theme .main .row.justify-content-center > [class*="col-"] {
  flex: 0 1 480px;
  max-width: 480px;
}
body:is(#opac-login-page, #opac-blocked).pl-theme :is(#opac-auth, #opac-blocked-message),
body#opac-password-recovery.pl-theme .main .maincontent {
  position: relative;
  padding: 36px 38px 32px;
  border: 1px solid var(--pl-line);
  border-radius: var(--pl-radius);
  background: var(--pl-bg);
  box-shadow: var(--pl-shadow);
}
/* the PAF-IAST mark heads the card, as in the header's login modal */
body:is(#opac-login-page, #opac-blocked).pl-theme :is(#opac-auth, #opac-blocked-message)::before,
body#opac-password-recovery.pl-theme .main .maincontent::before {
  content: "";
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: url("../../images/pl/paf-iast-mark.png") no-repeat center / contain;
}
body:is(#opac-login-page, #opac-blocked).pl-theme :is(#opac-auth, #opac-blocked-message) > h1,
body#opac-password-recovery.pl-theme .main .maincontent > h1 {
  margin: 0 0 22px;
  font-size: clamp(22px, 2.2vw, 27px);
  text-align: center;
}
/* a message card without a form (opac-reset-password.tt when resetting is disabled): its h1 is a whole sentence,
   so it reads as a message rather than a page title */
body#opac-login-page.pl-theme #opac-auth:not(:has(form)) > h1 {
  margin-bottom: 18px;
  font-size: clamp(19px, 1.7vw, 21px);
  line-height: 1.3;
  letter-spacing: -.015em;
}
body#opac-login-page.pl-theme #opac-auth:not(:has(form)) :is(> p, #resetpassword p) {
  margin: 0;
  color: var(--pl-muted);
  font-size: 15px;
  text-align: center;
}
/* login form */
body#opac-login-page.pl-theme #opac-auth fieldset.brief {
  margin: 0;
  padding: 0;
  border: 0;
}
body:is(#opac-login-page, #opac-password-recovery).pl-theme .maincontent .form-group {
  margin: 0 0 16px;
}
body:is(#opac-login-page, #opac-password-recovery).pl-theme .maincontent fieldset.brief label {
  display: block;
  margin: 0 0 7px;
  padding: 0;
  color: var(--pl-ink);
  font: 600 13.5px/1.3 var(--pl-sans);
}
body:is(#opac-login-page, #opac-password-recovery).pl-theme .maincontent .form-control {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--pl-line-strong);
  border-radius: var(--pl-radius-sm);
  background: var(--pl-bg);
  color: var(--pl-ink);
  font: 500 15px/1.2 var(--pl-sans);
}
body:is(#opac-login-page, #opac-password-recovery).pl-theme .maincontent .form-control:focus {
  border-color: var(--pl-blue);
  box-shadow: 0 0 0 4px rgba(31, 95, 168, .14);
}
body:is(#opac-login-page, #opac-password-recovery).pl-theme .maincontent fieldset.action {
  margin: 0;
  padding: 6px 0 0;
}
body:is(#opac-login-page, #opac-password-recovery).pl-theme .maincontent fieldset.action input[type="submit"] {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 22px;
  font-size: 15.5px;
}
/* jquery.validate messages on the reset form */
body#opac-login-page.pl-theme #opac-auth label.error {
  margin: 6px 0 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 500;
}
/* "Don't have a password yet?" / "Don't have a library card?" (or OpacLoginInstructions) */
body#opac-login-page.pl-theme #nologininstructions {
  margin: 26px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--pl-line);
  color: var(--pl-muted);
  font-size: 14px;
}
body#opac-login-page.pl-theme #nologininstructions h2 {
  margin: 0 0 4px;
  color: var(--pl-navy);
  font-size: 15px;
  letter-spacing: -.01em;
}
body#opac-login-page.pl-theme #nologininstructions p {
  margin: 0 0 14px;
  line-height: 1.55;
}
body#opac-login-page.pl-theme #nologininstructions > :last-child,
body#opac-login-page.pl-theme #nologininstructions p:last-child {
  margin-bottom: 0;
}
body#opac-login-page.pl-theme :is(#forgotpassword, #registrationinstructions, #resetpassword) {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
body#opac-login-page.pl-theme :is(#forgotpassword, #registrationinstructions) p {
  margin: 0;
}
body#opac-login-page.pl-theme #opac-auth > p,
body#opac-login-page.pl-theme #opac-auth > ul {
  color: var(--pl-muted);
  text-align: center;
}
body#opac-login-page.pl-theme #opac-auth > ul {
  padding: 0;
  list-style: none;
}
body#opac-login-page.pl-theme #opac-auth :is(#openid_connect, [id^="provider_"]) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  float: none;
}
body#opac-login-page.pl-theme #opac-auth .alert {
  font-size: 14px;
}
body#opac-login-page.pl-theme #opac-auth .alert h2 {
  font-size: 16px;
}
/* password recovery: the column becomes the card (with or without an OpacNav column beside it) */
body#opac-password-recovery.pl-theme .main .row {
  justify-content: center;
}
body#opac-password-recovery.pl-theme .main .maincontent {
  flex: 0 1 480px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
body#opac-password-recovery.pl-theme #password-recovery > .alert-info:not(:has(*)) {
  margin: 0;
  padding: 30px 22px 28px;
  font-size: 15.5px;
}
body#opac-password-recovery.pl-theme #password-recovery > .alert-info:not(:has(*))::before {
  content: "\f084";
  content: "\f084" / "";
}
body#opac-password-recovery.pl-theme #password-recovery form > p {
  color: var(--pl-muted);
}
/* blocked record */
body#opac-blocked.pl-theme #opac-blocked-message {
  text-align: center;
}
body#opac-blocked.pl-theme #opac-blocked-message::before {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(180, 35, 24, .12), rgba(180, 35, 24, .05));
  color: #b42318;
  content: "\f023";
  content: "\f023" / "";
  display: grid;
  place-items: center;
  font: 900 24px/1 "Font Awesome 6 Free";
}
body#opac-blocked.pl-theme #opac-blocked-message > p {
  color: var(--pl-muted);
  font-size: 15.5px;
}
body#opac-blocked.pl-theme #opacsuppressionmessage {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--pl-bg-soft);
  text-align: left;
}

/* =========================================================
   7. ERROR PAGES (errors/errorpage.tt: body#error400 ... #error500.error)
   ========================================================= */
body.error.pl-theme [id^="errormsg"] {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 980px;
  padding: 6px 260px 8px 0;
}
/* "Error 404" (the first h2) moves above the title as a gold eyebrow */
body.error.pl-theme [id^="errormsg"] > h2:first-of-type {
  order: -1;
  align-self: flex-start;
  margin: 0 0 14px;
  padding: 5px 12px 4px;
  border-radius: 999px;
  background: #fff1d6;
  color: #7a4f05;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
body.error.pl-theme [id^="errormsg"] > h1 {
  margin-bottom: 18px;
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -.03em;
  line-height: 1.15;
}
body.error.pl-theme [id^="errormsg"] > p {
  margin: 0 0 8px;
}
body.error.pl-theme [id^="errormsg"] > p strong {
  color: var(--pl-muted);
  font-size: 14px;
  font-weight: 600;
}
/* reasons: a soft panel */
body.error.pl-theme [id^="errormsg"] > ul:first-of-type {
  margin: 0 0 6px;
  padding: 16px 22px 16px 40px;
  border: 1px solid var(--pl-line);
  border-radius: 14px;
  background: var(--pl-bg-soft);
  color: var(--pl-ink);
  font-size: 14.5px;
}
body.error.pl-theme [id^="errormsg"] > ul:first-of-type li + li {
  margin-top: 4px;
}
body.error.pl-theme [id^="errormsg"] > ul:first-of-type li::marker {
  color: var(--pl-gold-dark);
}
body.error.pl-theme [id^="errormsg"] > h2:not(:first-of-type) {
  margin: 26px 0 10px;
  font-size: 18px;
}
body.error.pl-theme [id^="errormsg"] > ul:not(:first-of-type) {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
}
body.error.pl-theme [id^="errormsg"] > ul:not(:first-of-type) li {
  margin: 0 0 6px;
}
body.error.pl-theme [id^="errormsg"] > ul:not(:first-of-type) li::marker {
  color: var(--pl-gold);
}
/* "Return to the catalog home page." becomes the page's primary action */
body.error.pl-theme [id^="errormsg"] a[href="/cgi-bin/koha/opac-main.pl"] {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin: 6px 0 2px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--pl-navy);
  color: #fff;
  font: 600 14.5px/1.2 var(--pl-sans);
  text-decoration: none;
  transition: background-color .2s var(--pl-ease);
}
body.error.pl-theme [id^="errormsg"] a[href="/cgi-bin/koha/opac-main.pl"]::before {
  content: "\f015";
  content: "\f015" / "";
  font: 900 13px/1 "Font Awesome 6 Free";
}
body.error.pl-theme [id^="errormsg"] a[href="/cgi-bin/koha/opac-main.pl"]:hover,
body.error.pl-theme [id^="errormsg"] a[href="/cgi-bin/koha/opac-main.pl"]:focus-visible {
  background: var(--pl-navy-dark);
  color: #fff;
}
body.error.pl-theme [id^="errormsg"] li:has(> a[href="/cgi-bin/koha/opac-main.pl"]) {
  list-style: none;
  margin-left: -22px;
}
body.error.pl-theme [id^="errormsg"] > ul:last-of-type {
  color: var(--pl-muted);
  font-size: 14px;
}
/* a friendly illustration on the right: compass in the design's icon tile */
body.error.pl-theme [id^="errormsg"]::after {
  content: "\f14e";
  content: "\f14e" / "";
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 200px;
  height: 200px;
  border-radius: 48px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 55%),
    linear-gradient(160deg, rgba(31, 95, 168, .16), rgba(20, 61, 110, .05));
  color: var(--pl-navy);
  font: 900 84px/1 "Font Awesome 6 Free";
  box-shadow: inset 0 0 0 1px rgba(20, 61, 110, .08);
}
body.error.pl-theme#error401 [id^="errormsg"]::after,
body.error.pl-theme#error403 [id^="errormsg"]::after {
  content: "\f023";
  content: "\f023" / "";
}
body.error.pl-theme#error500 [id^="errormsg"]::after {
  content: "\f7d9";
  content: "\f7d9" / "";
}

/* =========================================================
   8. MAINTENANCE (maintenance.tt keeps Koha's inline header; no navigation while the catalogue is offline)
   ========================================================= */
/* the inline header shows the PAF-IAST mark beside Koha's own LibraryNameTitle text (pl-base.css sets the band) */
body#opac_maintenance.pl-theme #header-region #logo {
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  height: auto;
  margin: 0;
  background: none;
}
body#opac_maintenance.pl-theme #header-region #logo a {
  display: flex;
  align-items: center;
  gap: 14px;
  width: auto;
  height: auto !important;
  padding: 0;
  overflow: visible;
  color: var(--pl-navy);
  font: 700 clamp(16px, 2vw, 21px)/1.15 var(--pl-sans);
  letter-spacing: .02em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: normal; /* Bootstrap's .navbar-brand is nowrap: the library name must wrap on phones */
}
body#opac_maintenance.pl-theme #header-region #logo a::before {
  content: "";
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  background: url("../../images/pl/paf-iast-mark.png") no-repeat center / contain;
}
body#opac_maintenance.pl-theme .main {
  margin-top: 40px;
  margin-bottom: 64px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body#opac_maintenance.pl-theme #opac-maintenance-message {
  width: auto;
  max-width: 620px;
  margin: 0 auto;
  padding: 40px 40px 34px;
  border: 1px solid var(--pl-line);
  border-radius: var(--pl-radius);
  background: var(--pl-bg);
  box-shadow: var(--pl-shadow);
  font-size: 15.5px;
  text-align: center;
}
body#opac_maintenance.pl-theme #opac-maintenance-message::before {
  content: "\f7d9";
  content: "\f7d9" / "";
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(245, 166, 35, .22), rgba(245, 166, 35, .08));
  color: var(--pl-gold-dark);
  font: 900 24px/1 "Font Awesome 6 Free";
}
body#opac_maintenance.pl-theme #opac-maintenance-message p {
  color: var(--pl-muted);
}

/* =========================================================
   9. COURSE RESERVES (#opac-course-reserves) AND COURSE DETAILS (#opac-course-details)
   ========================================================= */
body#opac-course-reserves.pl-theme #course_reserves_table td.dataTables_empty::before,
body#opac-course-details.pl-theme #course_reserves > .alert-info::before {
  content: "\f19d";
  content: "\f19d" / "";
}
body#opac-course-reserves.pl-theme #course_reserves_table td:first-child a,
body#opac-course-details.pl-theme #course-items-table td:first-child a {
  color: var(--pl-navy);
  font-weight: 600;
  text-decoration: none;
}
body#opac-course-reserves.pl-theme #course_reserves_table td:first-child a:hover,
body#opac-course-details.pl-theme #course-items-table td:first-child a:hover {
  color: var(--pl-blue);
  text-decoration: underline;
}
body#opac-course-details.pl-theme #course_reserves > h1 em {
  font-style: normal;
}
/* course facts (term, department, number, section, instructors, notes) */
body#opac-course-details.pl-theme #course_reserves > .rows {
  float: none; /* opac.css floats div.rows; the template's clearing <br> is hidden below */
  clear: none;
  width: auto;
  margin: 0 0 20px;
  padding: 6px 20px;
  border: 1px solid var(--pl-line);
  border-radius: 14px;
  background: var(--pl-bg-soft);
}
body#opac-course-details.pl-theme #course_reserves > .rows > ol {
  margin: 0;
  padding: 0; /* opac.css: .5em 1em 0 0 */
  list-style: none;
}
body#opac-course-details.pl-theme #course_reserves > .rows > ol > li {
  /* opac.css floats div.rows li at width 100% with a bottom rule */
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 4px 16px;
  float: none;
  clear: none;
  width: auto;
  padding: 10px 0;
  border-top: 1px solid var(--pl-line);
  border-bottom: 0;
}
body#opac-course-details.pl-theme #course_reserves > .rows ul li {
  margin-left: 0;
}
body#opac-course-details.pl-theme #course_reserves > .rows > ol > li:first-child {
  border-top: 0;
}
body#opac-course-details.pl-theme #course_reserves > .rows span.label {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  color: var(--pl-muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
}
body#opac-course-details.pl-theme #course_reserves > .rows li ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
body#opac-course-details.pl-theme #course_reserves > br {
  display: none;
}

/* =========================================================
   10. RECENT COMMENTS (#opac-showreviews)
   ========================================================= */
body#opac-showreviews.pl-theme #showreviews > table.table {
  border-collapse: separate;
  border-spacing: 0;
}
/* No comments: Koha prints an empty table and nothing else. Until the template carries its own empty-state copy
   (core request: a .pl-empty message), the empty table itself becomes the design's empty-state panel. */
body#opac-showreviews.pl-theme #showreviews > table.table:not(:has(tr)) {
  display: none;
}
body#opac-showreviews.pl-theme #showreviews:not(:has(.pl-empty)) > table.table:not(:has(tr)) {
  display: block;
  margin: 8px 0 4px;
  padding: 40px 24px 38px;
  border: 1px dashed var(--pl-line-strong);
  border-radius: var(--pl-radius);
  background: var(--pl-bg-soft);
  color: var(--pl-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  text-align: center;
}
body#opac-showreviews.pl-theme #showreviews:not(:has(.pl-empty)) > table.table:not(:has(tr))::before {
  content: "\f086";
  content: "\f086" / "";
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(31, 95, 168, .14), rgba(20, 61, 110, .06));
  color: var(--pl-navy);
  font: 900 22px/1 "Font Awesome 6 Free";
}
body#opac-showreviews.pl-theme #showreviews:not(:has(.pl-empty)) > table.table:not(:has(tr))::after {
  content: "There are no comments to show.";
  display: block;
}
body#opac-showreviews.pl-theme #showreviews .pl-empty::before {
  content: "\f086";
  content: "\f086" / "";
}
body#opac-tags.pl-theme #usertags .pl-empty::before {
  content: "\f02c";
  content: "\f02c" / "";
}
body#opac-library.pl-theme #library_info .pl-empty::before {
  content: "\f19c";
  content: "\f19c" / "";
}
body#opac-showreviews.pl-theme #showreviews > table.table td {
  padding: 20px 8px;
  border-top: 1px solid var(--pl-line);
  background: none !important;
  vertical-align: top;
}
body#opac-showreviews.pl-theme #showreviews > table.table tr:first-child td {
  border-top: 0;
}
body#opac-showreviews.pl-theme #showreviews > table.table td:last-child {
  width: 96px;
  text-align: right;
}
body#opac-showreviews.pl-theme #showreviews td > p:first-child a {
  color: var(--pl-navy);
  font-size: 16px;
  font-weight: 600;
}
body#opac-showreviews.pl-theme #showreviews .results_summary .label {
  color: var(--pl-muted);
  font-weight: 600;
}
body#opac-showreviews.pl-theme #showreviews .commentline {
  display: block;
  margin: 10px 0 0;
  padding: 14px 18px;
  border: 0;
  border-left: 3px solid var(--pl-gold);
  border-radius: 4px 14px 14px 4px;
  background: var(--pl-bg-soft);
  box-shadow: none;
  color: var(--pl-ink);
  font-size: 15px;
}
body#opac-showreviews.pl-theme #showreviews .commentline.yours {
  border-left-color: var(--pl-blue);
}
body#opac-showreviews.pl-theme #showreviews .commentline .commenter {
  display: block;
  margin-top: 8px;
  color: var(--pl-muted);
  font-size: 13px;
}
body#opac-showreviews.pl-theme #showreviews .commentline .avatar {
  border-radius: 50%;
}
body#opac-showreviews.pl-theme #showreviews img.thumbnail {
  max-width: 80px;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 8px 16px -10px rgba(10, 29, 56, .55);
}
body#opac-showreviews.pl-theme #showreviews .no-image {
  display: inline-block;
  width: 72px;
  padding: 18px 6px;
  border: 1px dashed var(--pl-line-strong);
  border-radius: 6px;
  color: var(--pl-muted);
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}
/* comment pages */
body#opac-showreviews.pl-theme #showreviews > .pages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 18px;
}
body#opac-showreviews.pl-theme #showreviews > .pages :is(a.nav, .currentPage) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--pl-line);
  border-radius: 10px;
  color: var(--pl-navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
body#opac-showreviews.pl-theme #showreviews > .pages a.nav:hover {
  background: var(--pl-bg-soft);
}
body#opac-showreviews.pl-theme #showreviews > .pages .currentPage {
  border-color: var(--pl-navy);
  background: var(--pl-navy);
  color: #fff;
}

/* =========================================================
   11. BROWSE, CMS PAGES, OVERDRIVE, ILS-DI
   ========================================================= */
/* opac-browser.tt (hierarchy) and opac-browse.tt (Elasticsearch browse) both use body#opac-browser */
body#opac-browser.pl-theme #userbrowser > .warning::before {
  content: "\f14e";
  content: "\f14e" / "";
}
body#opac-browser.pl-theme #userbrowser > .warning {
  color: var(--pl-muted);
  font-size: 14.5px;
}
body#opac-browser.pl-theme .main .row > [class*="col"] > h1 + .alert-info::before {
  content: "\f002";
  content: "\f002" / "";
}
body#opac-browser.pl-theme #userbrowser table.table td {
  vertical-align: top;
}
body#opac-browser.pl-theme #userbrowser table.table td p:first-child a {
  font-weight: 600;
}
body#opac-browser.pl-theme #browse-search form {
  margin: 0 0 20px;
  padding: 18px 20px;
  border: 1px solid var(--pl-line);
  border-radius: 16px;
  background: var(--pl-bg-soft);
}
body#opac-browser.pl-theme #browse-search .form-row {
  align-items: flex-end;
  margin-bottom: 12px;
}
body#opac-browser.pl-theme #browse-search .form-row:last-child {
  margin-bottom: 0;
}
body#opac-browser.pl-theme #browse-search label:not(.form-check-label) {
  font-size: 13.5px;
  font-weight: 600;
}
body#opac-browser.pl-theme #browse-search .form-control {
  min-height: 44px;
  border-radius: 999px;
}
body#opac-browser.pl-theme #browse-search .btn-primary {
  min-height: 44px;
  padding: 0 26px;
}
body#opac-browser.pl-theme #browse-searchresults .card {
  margin-bottom: 8px;
  border: 1px solid var(--pl-line);
  border-radius: 12px;
  overflow: hidden;
}
body#opac-browser.pl-theme #browse-searchresults .card-header {
  border-bottom: 0;
  background: var(--pl-bg-soft);
}
body#opac-browser.pl-theme #browse-searchresults .card-header a {
  color: var(--pl-navy);
  font-weight: 600;
}

/* CMS pages (opac-page.pl): readable long-form content */
.pl-theme .main .page_content {
  max-width: 760px;
  font-size: 15.5px;
  line-height: 1.7;
}
.pl-theme .main .page_content :is(img, video, iframe) {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
.pl-theme .main .page_content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}
.pl-theme .main .page_content blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border: 0;
  border-left: 3px solid var(--pl-gold);
  border-radius: 4px 12px 12px 4px;
  background: var(--pl-bg-soft);
}

/* OverDrive results page (overdrive.css loads after this file) */
body#overdrive-results-page.pl-theme #overdrive-results-content #breadcrumbs {
  margin: 0 0 12px;
  color: var(--pl-muted);
  font-size: 14px;
}
body#overdrive-results-page.pl-theme #overdrive-results-content #breadcrumbs p:empty {
  display: none;
}
/* "Error searching OverDrive collection." (and other status lines) as a calm warning panel */
body#overdrive-results-page.pl-theme #overdrive-status .unavailable {
  display: block;
  padding: .85rem 1.1rem;
  border: 1px solid #f3d9a4;
  border-left: 4px solid var(--pl-gold);
  border-radius: var(--pl-radius-sm);
  background: #fff8ea;
  color: #7a4f05;
  font-size: 14.5px;
  font-weight: 600;
}
body#overdrive-results-page.pl-theme #overdrive-results-list:not(:has(tr)) {
  display: none;
}
body#overdrive-results-page.pl-theme #overdrive-results-list td {
  padding: 16px 10px;
  border-top: 1px solid var(--pl-line);
}

/* ILS-DI documentation (ilsdi.pl) */
body#opac_ilsdi.pl-theme #ilsdi {
  max-width: 900px;
}
body#opac_ilsdi.pl-theme #ilsdi > h2 {
  margin: 30px 0 10px;
  padding-top: 22px;
  border-top: 1px solid var(--pl-line);
  font-size: 21px;
}
body#opac_ilsdi.pl-theme #ilsdi > h1 + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
body#opac_ilsdi.pl-theme #ilsdi > h3 {
  margin: 20px 0 8px;
  color: var(--pl-muted);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
body#opac_ilsdi.pl-theme #ilsdi > ul li::marker {
  color: var(--pl-gold);
}
body#opac_ilsdi.pl-theme #ilsdi dl {
  margin: 0 0 12px;
  padding: 4px 18px;
  border: 1px solid var(--pl-line);
  border-radius: 14px;
  background: var(--pl-bg-soft);
}
body#opac_ilsdi.pl-theme #ilsdi dt {
  margin-top: 12px;
  color: var(--pl-navy);
  font-weight: 600;
}
body#opac_ilsdi.pl-theme #ilsdi dd {
  margin: 2px 0 12px;
  color: var(--pl-ink);
  font-size: 14.5px;
}
body#opac_ilsdi.pl-theme #ilsdi dd ul {
  margin: 4px 0 0;
}
body#opac_ilsdi.pl-theme #ilsdi > a[href^="ilsdi.pl"] {
  display: inline-block;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 8px;
  background: #eef4fb;
  color: var(--pl-blue);
  font: 500 13.5px/1.5 SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
  text-decoration: none;
}
body#opac_ilsdi.pl-theme #ilsdi > a[href^="ilsdi.pl"]:hover {
  text-decoration: underline;
}
body#opac_ilsdi.pl-theme #ilsdi pre {
  max-width: 100%;
  margin: 0 0 12px;
  padding: 16px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--pl-navy-ink);
  color: #dbe6f4;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
}

/* =========================================================
   12. RESPONSIVE
   ========================================================= */
@media (max-width: 991.98px) {
  /* error pages: the illustration moves above the text */
  body.error.pl-theme [id^="errormsg"] {
    padding-right: 0;
  }
  body.error.pl-theme [id^="errormsg"]::after {
    position: static;
    order: -2;
    width: 88px;
    height: 88px;
    margin: 0 0 18px;
    border-radius: 24px;
    font-size: 36px;
  }
  /* password recovery: Koha's col-6 would be half a phone wide */
  body#opac-password-recovery.pl-theme .main .maincontent.col-6 {
    flex: 1 1 auto;
    max-width: 480px;
  }
}
@media (max-width: 760px) {
  /* sign-in pages: full-width cards with the page gutter */
  body:is(#opac-login-page, #opac-password-recovery, #opac-blocked).pl-theme .main {
    width: calc(100% - 24px);
    margin-top: 18px;
    margin-bottom: 36px;
  }
  body:is(#opac-login-page, #opac-blocked).pl-theme .main .row.justify-content-center > [class*="col-"] {
    flex: 1 1 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  body:is(#opac-login-page, #opac-blocked).pl-theme :is(#opac-auth, #opac-blocked-message),
  body#opac-password-recovery.pl-theme .main .maincontent {
    padding: 28px 20px 26px;
    border-radius: 16px;
  }
  body#opac-password-recovery.pl-theme .main .maincontent.col-6 {
    max-width: 100%;
  }
  body:is(#opac-login-page, #opac-blocked).pl-theme :is(#opac-auth, #opac-blocked-message)::before,
  body#opac-password-recovery.pl-theme .main .maincontent::before {
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
  }
  /* library band */
  body#opac-library.pl-theme #library_info > h1 {
    min-height: 92px;
    padding: 22px 20px 22px 92px;
    border-radius: 14px;
  }
  body#opac-library.pl-theme #library_info > h1::before {
    left: 18px;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background-size: 42px auto;
  }
  body#opac-library.pl-theme #library_info > h1::after {
    right: 12px;
    font-size: 62px;
  }
  /* segmented tabs fill the row */
  body:is(#opac-lists, #opac-userlists, #opac-search-history).pl-theme .main .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
  }
  body:is(#opac-lists, #opac-userlists, #opac-search-history).pl-theme .main .nav-tabs .nav-item {
    flex: 1 1 0;
    min-width: 0;
  }
  body:is(#opac-lists, #opac-userlists, #opac-search-history).pl-theme .main .nav-tabs .nav-link {
    padding: 0 10px;
  }
  /* empty states a little tighter */
  body:is(#opac-lists, #opac-userlists).pl-theme #usershelves .tab-content > .tab-pane.active:not(:has(table)),
  body#opac-search-history.pl-theme #searchhistory :is(#biblio_tab, #authority_tab) > p,
  body#opac-search-history.pl-theme #searchhistory > p,
  body#opac-tags-subject.pl-theme #subjectcloud > .alert-info,
  body#opac-browser.pl-theme #userbrowser > .warning,
  body#opac-browser.pl-theme .main .row > [class*="col"] > h1 + .alert-info,
  body#opac-course-details.pl-theme #course_reserves > .alert-info {
    padding: 30px 18px 28px;
    border-radius: 16px;
  }
  /* DataTables controls stack */
  .pl-theme .main .dataTables_wrapper .top,
  .pl-theme .main .dataTables_wrapper .top .table_controls,
  .pl-theme .main .dataTables_wrapper .dataTables_filter,
  .pl-theme .main .dataTables_wrapper .dataTables_filter label {
    width: 100%;
  }
  .pl-theme .main .dataTables_wrapper .dataTables_filter input[type="search"] {
    width: 100%;
  }
  /* Clear filter / CSV / Copy / Print stay on one compact row under the search field */
  .pl-theme .main .dataTables_wrapper .top .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-left: -8px;
  }
  .pl-theme .main .dataTables_wrapper .top .dt-buttons .dt-button {
    gap: 5px;
    padding: 0 7px;
  }
  /* search history: tighter cells and a wrapping date, so DataTables Responsive keeps the Search column visible
     on phones (as on the stock theme) instead of folding it into the "+" row */
  body#opac-search-history.pl-theme #searchhistory .historyt :is(th, td) {
    padding-left: 6px;
    padding-right: 6px;
  }
  body#opac-search-history.pl-theme #searchhistory .historyt thead th {
    font-size: 11px;
    letter-spacing: .04em;
  }
  body#opac-search-history.pl-theme #searchhistory .historyt thead th:is(.sorting, .sorting_asc, .sorting_desc) {
    padding-right: 20px; /* room for the DataTables sort arrow */
    background-position: right 4px center;
  }
  body#opac-search-history.pl-theme #searchhistory .historyt td.selectcol {
    width: 32px;
  }
  body#opac-search-history.pl-theme #searchhistory .historyt td:nth-child(2) label {
    white-space: normal;
  }
  /* course facts stack */
  body#opac-course-details.pl-theme #course_reserves > .rows > ol > li {
    grid-template-columns: minmax(0, 1fr);
  }
  /* recent comments: cover column narrower */
  body#opac-showreviews.pl-theme #showreviews > table.table td:last-child {
    width: 72px;
  }
  body#opac-showreviews.pl-theme #showreviews img.thumbnail {
    max-width: 60px;
  }
  /* maintenance */
  body#opac_maintenance.pl-theme .main {
    width: calc(100% - 24px);
    margin-top: 20px;
  }
  body#opac_maintenance.pl-theme #opac-maintenance-message {
    padding: 30px 20px 26px;
  }
  /* ILS-DI */
  body#opac_ilsdi.pl-theme #ilsdi pre {
    font-size: 11.5px;
  }
}
@media (max-width: 700px) {
  /* selection toolbars: the "Select titles to" group takes its own row, divided by a top hairline */
  .pl-theme .main .selections-toolbar .links {
    flex: 1 1 100%;
    margin: 2px 0 0;
    padding: 4px 0 0;
    border-left: 0;
    border-top: 1px solid var(--pl-line);
  }
  /* cart popup: the table keeps readable columns and scrolls inside its wrapper */
  body#basket.pl-theme #itemst {
    min-width: 620px;
  }
  body#basket.pl-theme .main {
    margin: 8px;
    padding: 14px 10px 16px;
  }
  body#basket.pl-theme #userbasket > h1 {
    font-size: 20px;
  }
  /* verbose view: label above value */
  body#basket.pl-theme form#bookbag_form > table.table,
  body#basket.pl-theme form#bookbag_form > table.table tbody,
  body#basket.pl-theme form#bookbag_form > table.table tr,
  body#basket.pl-theme form#bookbag_form > table.table :is(th, td) {
    display: block;
    width: auto;
  }
  body#basket.pl-theme form#bookbag_form > table.table th[scope="row"] {
    width: auto;
    padding-bottom: 0;
    border-top: 1px solid var(--pl-line);
    background: none;
    text-align: left;
  }
  body#basket.pl-theme form#bookbag_form > table.table tr:first-child > th {
    border-top: 0;
  }
  body#basket.pl-theme form#bookbag_form > table.table td {
    padding-top: 2px;
    border-top: 0;
  }
  /* stacked cells: only the frame's real corners stay rounded */
  body#basket.pl-theme form#bookbag_form > table.table tr > :is(th, td) {
    border-radius: 0;
  }
  body#basket.pl-theme form#bookbag_form > table.table tr:first-child > :first-child {
    border-radius: 13px 13px 0 0;
  }
  body#basket.pl-theme form#bookbag_form > table.table tr:last-child > :last-child {
    border-radius: 0 0 13px 13px;
  }
  body#opac-downloadcart.pl-theme #userdownloadcart #format {
    flex-basis: 100%;
    max-width: none;
  }
}
@media (max-width: 400px) {
  body:is(#opac-lists, #opac-userlists, #opac-search-history).pl-theme .main .nav-tabs .nav-link {
    font-size: 13px;
  }
  .pl-theme .main .dataTables_wrapper .top .dt-buttons {
    margin-left: -5px;
  }
  .pl-theme .main .dataTables_wrapper .top .dt-buttons .dt-button {
    gap: 4px;
    padding: 0 5px;
    font-size: 13px;
  }
  body:is(#opac-login-page, #opac-blocked).pl-theme :is(#opac-auth, #opac-blocked-message),
  body#opac-password-recovery.pl-theme .main .maincontent {
    padding: 24px 16px 22px;
  }
  body#opac-library.pl-theme #library_info > h1 {
    padding-left: 84px;
    font-size: 20px;
  }
  body#opac-library.pl-theme #library_info > h1::before {
    left: 16px;
    width: 52px;
    height: 52px;
  }
}

/* =========================================================
   13. REDUCED MOTION, PRINT
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .pl-theme .main .nav-tabs .nav-link,
  .pl-theme .main :is(#toolbar, .selections-toolbar) :is(a, button),
  .pl-theme .main .dt-buttons .dt-button,
  .pl-theme .main h1 a.rsssearchlink,
  .pl-theme .main h1 a.rss-list-link,
  .pl-theme #usershelves .alert-info > a,
  .pl-theme #tagcloud .tag > a,
  .pl-theme [id^="errormsg"] a,
  .pl-theme #userdownloadcart input[type="submit"] {
    transition: none !important;
  }
}
@media print {
  body#basket.pl-theme,
  body#opac-downloadcart.pl-theme {
    border-top: 0;
  }
  body#opac-library.pl-theme #library_info > h1 {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--pl-navy);
    box-shadow: none;
  }
  body#opac-library.pl-theme #library_info > h1::before,
  body#opac-library.pl-theme #library_info > h1::after,
  body.error.pl-theme [id^="errormsg"]::after {
    display: none;
  }
  body.error.pl-theme [id^="errormsg"] {
    padding-right: 0;
  }
  body#basket.pl-theme #itemst {
    min-width: 0;
  }
}
