/* Schoollib OPAC theme foundation. Loaded by OpacAdditionalStylesheet.
 * Keep Koha templates, semantic status colours, controls and behaviour intact.
 */
:root {
    --school-wine: #3c191f;
    --school-aqua: #d8ebee;
    --school-gold: #eeb31e;
    --school-ink: #231f20;
    --school-paper: #fbfaf7;
    --school-line: #e7e1de;
}
body { background: var(--school-paper); color: var(--school-ink); font-family: "Segoe UI", Arial, sans-serif; line-height: 1.55; }
#wrapper, .main { background: var(--school-paper); }
#header-region .navbar { background: white; border-bottom: 1px solid var(--school-line); padding: 1.1rem clamp(.8rem, 3vw, 2.5rem); gap: .5rem; }
#header-region .navbar a, #header-region .navbar .nav-link { color: var(--school-wine); }
#header-region .dropdown-menu { border-color: var(--school-line); border-radius: 14px; }
#header-region .dropdown-item:hover, #header-region .dropdown-item:focus { background: var(--school-aqua); }
#opac-main-search { background: var(--school-wine); border: 0; border-radius: 18px; padding: 1.2rem; margin-top: 1rem; }
#opac-main-search label { color: white; }
#opac-main-search .form-control, #opac-main-search .form-select { min-height: 46px; border-radius: 12px; }
#searchsubmit { background: var(--school-gold); border-color: var(--school-gold); color: var(--school-wine); min-width: 48px; min-height: 46px; }
#searchsubmit:hover { background: #ffce53; border-color: #ffce53; }
#moresearches { gap: .35rem 1rem; padding: .9rem 1rem; }
#moresearches a { color: var(--school-wine); text-underline-offset: 3px; }
.main > .container-fluid { max-width: 1440px; padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 2.5rem; }
nav[aria-label="Breadcrumb"], nav[aria-label="breadcrumb"], .main > .breadcrumb { margin: 1.5rem 1rem; }
.breadcrumb { flex-wrap: wrap; gap: .35rem; padding: .75rem 1rem; margin-bottom: 1.5rem; background: transparent; }
h1, h2, h3, h4 { color: var(--school-wine); line-height: 1.3; }
h1 { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: 1.2rem; }
h2 { font-size: 1.4rem; }
.maincontent { background: white; border: 1px solid var(--school-line); border-radius: 20px; padding: clamp(1rem, 2.5vw, 1.8rem); }
.maincontent a, #facets a, #usermenu a { color: var(--school-wine); text-underline-offset: 3px; }
.btn { border-radius: 12px; min-height: 40px; }
.btn-primary { background: var(--school-wine); border-color: var(--school-wine); color: white; }
.btn-primary:hover, .btn-primary:focus-visible { background: #602d38; border-color: #602d38; color: white; }
.maincontent a.btn-primary, .maincontent a.btn-outline-primary:hover { color: white; }
.btn-outline-primary { color: var(--school-wine); border-color: #99727b; background: white; }
.btn-outline-primary:hover { background: var(--school-wine); border-color: var(--school-wine); color: white; }
.btn-link { color: var(--school-wine); }
.form-control, .form-select { border-radius: 10px; border-color: #b9adb1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--school-wine); }
:focus-visible { outline: 3px solid #126c92; outline-offset: 3px; }
.form-control:focus, .form-select:focus { border-color: #126c92; box-shadow: 0 0 0 .2rem #126c9233; }
.modal-content, .card { border-radius: 18px; border-color: var(--school-line); }
.modal-header, .card-header { background: var(--school-aqua); }
.nav-tabs { gap: .3rem; border-color: var(--school-line); }
.nav-tabs .nav-link { color: var(--school-wine); border-radius: 12px 12px 0 0; padding: .8rem 1rem; }
.nav-tabs .nav-link.active { background: var(--school-aqua); color: var(--school-wine); border-color: #bfd8dc; font-weight: 700; }
#usermenu { background: white; border: 1px solid var(--school-line); border-radius: 18px; padding: .7rem; margin-bottom: 1.5rem; }
#usermenu a { display: block; padding: .7rem .8rem; border-radius: 10px; overflow-wrap: anywhere; }
#usermenu a:hover, #usermenu .active a { background: var(--school-aqua); }
#opac-auth, #userpasswd { max-width: 800px; margin-inline: auto; }
#opac-auth .form-control, #userpasswd .form-control { min-height: 46px; }
table { font-size: .95rem; }
table th { color: var(--school-wine); }
.table thead th { background: #edf5f6; }
#facets { background: white; border: 1px solid var(--school-line); border-radius: 16px; padding: 1rem; }
#userauthdetails .authstanza, #userauthdetails .usedin { background: #edf5f6; padding: 1rem; border-radius: 14px; margin: 1rem 0; }
#userauthdetails .authstanzaheading { font-weight: 700; color: var(--school-wine); }
#schoollib-dewey { background: var(--school-aqua); border-color: #bfd8dc; }
#schoollib-recent { margin-bottom: 2rem !important; }
#schoollib-recent .card { background: white; }
#schoollib-browse .card { background: white; }
#schoollib-browse .btn { padding: .7rem 1rem; }
#schoollib-dewey [data-back] .fa { font-size: 1.25rem; }
#schoollib-dewey [data-back] { border-radius: 24px; padding: .7rem 1rem; }
#schoollib-dewey [data-crumbs] { margin-top: 1rem; }
#opaccredits { border-top: 1px solid var(--school-line); padding-top: 1rem; }
@media (max-width: 760px) {
    #header-region .navbar { flex-wrap: wrap; }
    #header-region #members { margin-left: auto; }
    .maincontent { padding: 1rem; }
    #usermenu ul { display: flex; flex-wrap: wrap; gap: .3rem; padding-left: 0; list-style: none; }
    #usermenu a { padding: .6rem .7rem; }
    .nav-tabs { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
    body, #wrapper, .main, .maincontent { background: white; color: black; }
    .maincontent { border: 0; padding: 0; }
}

/* Complete approved zones. Native OPAC controls remain in the DOM. */
#header-region { background: white; }
#header-region .navbar { max-width: 1240px; margin: auto; min-height: 108px; border: 0; padding: 18px 28px; flex-wrap: wrap; gap: 14px; }
.schoollib-brand { display: flex; align-items: center; gap: 24px; flex: 1 1 540px; }
#header-region .navbar #logo { width: 230px; height: 45px; flex: 0 0 230px; margin: 0; }
#header-region .navbar #logo .navbar-brand { padding-top: 45px; }
.schoollib-school-name { border-left: 1px solid var(--school-line); padding-left: 24px; max-width: 330px; line-height: 1.4; font-size: 15px; }
.schoollib-school-name strong { color: var(--school-wine); display: block; font-size: 19px; }
.schoollib-school-name span { display: block; }
.schoollib-school-link { font-size: 14px; white-space: nowrap; }
#header-region .navbar #members { margin-left: auto; }
#header-region .userlabel { display: inline !important; font-size: 14px; }
#header-region .login-link { border: 1px solid #d3bec2; border-radius: 24px; padding: 10px 17px; }
.schoollib-search-zone { background: var(--school-wine); padding: 20px max(24px, calc((100% - 1168px) / 2)); }
.schoollib-search-zone #opac-main-search { margin: 0; padding: 0; border-radius: 0; }
.schoollib-search-zone #searchform { display: flex; align-items: center; gap: 18px; margin: 0; }
.schoollib-search-zone #searchform > .row { flex: 1; flex-wrap: nowrap; align-items: center; }
.schoollib-search-label { font-weight: 600; white-space: nowrap; margin: 0; }
.schoollib-search-zone #opac-main-search .form-control { background: white; min-width: 100px; font-style: normal; }
.schoollib-search-zone #masthead_search { max-width: 190px; }
.schoollib-search-zone #searchsubmit { font-weight: 700; padding: 10px 20px; border-radius: 12px; }
.schoollib-search-zone #moresearches { justify-content: flex-end; margin: 8px 0 -6px; padding: 0; font-size: 13px; }
.schoollib-search-zone #moresearches a { color: #f4e4e7; }
.schoollib-search-zone #moresearches li { color: #d0aeb5; }
.main { border: 0; box-shadow: none; margin: 0; }
#breadcrumbs { margin: 0; padding: 24px max(24px, calc((100% - 1168px) / 2)) 0; border: 0; background: transparent; }
#breadcrumbs .breadcrumb { padding: 0; margin: 0 0 22px; }
#opac-main #breadcrumbs { display: none; }
#opac-main .main > .container-fluid { max-width: 1240px; padding: 32px 36px 60px; }
#opac-main .schoollib-home-column { flex: 0 0 100%; max-width: 100%; width: 100%; border: 0; border-radius: 0; padding: 0 12px; background: transparent; }
#opac-main .schoollib-home-login { display: none; } /* Login remains in masthead and modal. */
.schoollib-home-intro { margin: 0 0 28px; }
.schoollib-home-intro h1 { margin: 0 0 9px; }
.schoollib-home-intro p { color: #696064; margin: 0; }
.schoollib-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin-bottom: 18px; }
.schoollib-section-heading h2 { margin: 0; }
#schoollib-home a.schoollib-text-link { color: var(--school-wine); text-decoration: none; font-weight: 600; font-size: 14px; }
#schoollib-home a.schoollib-text-link:hover { text-decoration: underline; }
#schoollib-recent [data-recent-list] { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 15px; margin: 0; padding: 0 !important; }
#schoollib-recent [data-recent-list] > li { width: auto; padding: 0; min-width: 0; }
#schoollib-recent [data-recent-list] > li > a { text-align: left !important; text-decoration: none; padding: 14px 12px !important; border-radius: 15px; min-height: 235px; color: var(--school-ink); box-shadow: none; transition: transform .15s; }
#schoollib-recent [data-recent-list] > li > a:hover { transform: translateY(-3px); box-shadow: 0 7px 20px #3c191f12; }
#schoollib-recent [data-recent-list] .schoollib-recent-cover { height: 154px !important; display: grid; place-items: center; }
#schoollib-recent [data-recent-list] img { height: 154px !important; max-width: 100%; filter: drop-shadow(2px 4px 3px #0002); }
#schoollib-recent [data-recent-list] .mt-auto { font-size: 15px; line-height: 1.4; font-weight: 650; padding-top: 15px !important; }
#schoollib-recent .schoollib-recent-author { color: #696064; font-size: 12px; padding-top: 5px; }
#schoollib-dewey { margin: 34px 0 !important; border-radius: 22px; box-shadow: none; }
#schoollib-dewey > .card-body { padding: 25px; }
#schoollib-dewey h2 { margin-bottom: 20px; }
#schoollib-dewey .btn { border-top-width: 5px; border-inline-start-width: 1px !important; border-radius: 12px; font-size: 16px; min-height: 100px; }
#schoollib-dewey [data-back] { min-height: auto; border-top-width: 1px; display: inline-flex; align-items: center; gap: 10px; color: var(--school-wine); background: #ffffffc9; }
#schoollib-dewey [data-crumbs] { margin: 0 0 20px; padding: 0; }
.schoollib-icon { width: 29px; height: 29px; flex-shrink: 0; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.schoollib-text-link .schoollib-icon { background: var(--school-gold); color: var(--school-wine); border-radius: 50%; padding: 3px; margin-left: 7px; }
.schoollib-browse-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.schoollib-browse-panel, .schoollib-full-directory { border: 1px solid var(--school-line); border-radius: 22px; background: white; padding: 25px; min-width: 0; }
.schoollib-browse-panel h3 { display: flex; align-items: center; gap: 13px; font-size: 19px; margin-bottom: 12px; }
.schoollib-browse-panel h3 .schoollib-icon { width: 46px; height: 46px; padding: 7px; border-radius: 13px; background: var(--school-aqua); stroke-width: 2.8; }
.schoollib-popular-list { list-style: none; margin: 0; padding: 0; }
.schoollib-popular-list li + li { border-top: 1px solid var(--school-line); }
.schoollib-browse-entry { display: flex; justify-content: space-between; align-items: center; gap: 18px; text-decoration: none; padding: 16px 0; font-size: 15px; color: var(--school-wine); }
.schoollib-browse-entry > span { overflow-wrap: anywhere; min-width: 0; }
.schoollib-browse-entry small { display: block; font-size: 12px; color: #696064; margin-top: 5px; }
.schoollib-browse-entry .schoollib-icon { width: 28px; height: 28px; color: var(--school-wine); background: var(--school-gold); border-radius: 50%; padding: 3px; }
.schoollib-directory > summary { display: flex; justify-content: space-between; align-items: center; background: var(--school-aqua); color: var(--school-wine); border-radius: 12px; padding: 11px 15px; font-weight: 650; margin-top: 12px; cursor: pointer; list-style: none; }
.schoollib-directory > summary::-webkit-details-marker { display: none; }
.schoollib-directory > summary .schoollib-icon { width: 23px; height: 23px; }
.schoollib-full-directory { margin-top: 22px; }
.schoollib-full-directory > .btn { float: right; }
.schoollib-directory-filter { display: block; max-width: 420px; margin: 24px 0; }
.schoollib-directory-filter input { margin-top: 8px; }
.schoollib-directory-results { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: 0 24px; }
.schoollib-directory-paging { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.schoollib-directory-paging .schoollib-icon { width: 22px; height: 22px; }
.schoollib-browse-explanation { color: #696064; font-size: 13px; margin: 8px 0 0; }
.schoollib-redundant-authlink { display: none; }
.schoollib-book-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 40px; }
.schoollib-book-layout > .bookcover { float: none; width: auto; margin: 0; padding: 22px; background: #fbfaf7; border: 1px solid var(--school-line); border-radius: 22px; align-self: start; min-height: 280px; }
.schoollib-book-layout .bookcover img { max-width: 100%; max-height: 320px; object-fit: contain; }
.schoollib-book-layout .record { min-width: 0; }
.schoollib-book-layout .title { font-size: clamp(1.6rem,3vw,2rem); }
.schoollib-secondary-title { display: none; } /* Responsibility remains in edition disclosure and author heading. */
.schoollib-book-layout .results_summary { font-size: 14px; margin: 15px 0; display: block; color: var(--school-ink); }
.schoollib-book-layout .results_summary.author { font-size: 18px; margin-bottom: 22px; }
.schoollib-book-layout .results_summary .label { color: #696064; }
.schoollib-book-layout .results_summary.ddc { background: #edf5f6; border-radius: 12px; padding: 13px; }
.schoollib-bibliographic-info { border: 1px solid var(--school-line); border-radius: 14px; padding: 17px; margin-top: 22px; }
.schoollib-bibliographic-info summary { color: var(--school-wine); cursor: pointer; font-weight: 650; }
.schoollib-location-panel { background: var(--school-aqua); border-radius: 17px; padding: 24px; margin-top: 24px; }
.schoollib-location-panel h2 { font-size: 21px; margin-bottom: 15px; }
.schoollib-copy-summary { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; font-size: 14px; }
.schoollib-location-panel > a { font-size: 13px; }
#bibliodescriptions { margin-top: 28px; }
.schoollib-result-cards, .schoollib-result-cards > tbody { display: block; width: 100%; }
.schoollib-result-cards > tbody { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.schoollib-result-cards > tbody > tr { display: flex; flex-direction: column; position: relative; background: white !important; border: 1px solid var(--school-line); border-radius: 16px; min-width: 0; padding: 16px; }
.schoollib-result-cards td { display: block; border: 0; padding: 0; width: auto; background: transparent !important; box-shadow: none !important; }
.schoollib-result-cards .numcol { display: none; }
.schoollib-result-cards .selectcol { position: absolute; left: 10px; top: 10px; z-index: 1; }
.schoollib-result-cards .covercol { height: 200px; margin-bottom: 15px; }
.schoollib-result-cards .bookcover { float: none; width: 100%; margin: 0; height: 195px; }
.schoollib-result-cards .bookcover img { max-height: 190px; max-width: 100%; object-fit: contain; }
.schoollib-result-cards .title { font-size: 17px; font-weight: 650; }
.schoollib-result-cards .title_resp_stmt { display: none; }
.schoollib-result-cards .author { font-size: 13px; margin: 8px 0; }
.schoollib-result-cards .byAuthor { display: none; }
.schoollib-result-cards .actions-menu { margin-top: 14px; }
.schoollib-result-cards .actions-menu .btn { white-space: normal; text-align: left; font-size: 13px; padding: 6px; }
.schoollib-result-extra { font-size: 13px; margin: 14px 0; }
.schoollib-result-extra summary { cursor: pointer; color: var(--school-wine); }
.schoollib-authority-header { background: var(--school-aqua); border-top: 7px solid var(--school-gold); border-radius: 20px; padding: 26px; margin-bottom: 25px; }
.schoollib-authority-header h1 { margin-bottom: 18px; }
#userauthdetails .schoollib-authority-header .usedin { background: none; padding: 0; margin: 0; }
.schoollib-authority-info { border: 1px solid var(--school-line); border-radius: 18px; padding: 24px; }
.schoollib-authority-info > h2 { margin-bottom: 20px; }
.schoollib-authority-books { margin-top: 32px; }
.schoollib-related-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 15px; margin-top: 18px; }
.schoollib-related-card { border: 1px solid var(--school-line); border-radius: 15px; padding: 14px 12px; display: flex; flex-direction: column; text-decoration: none; }
.schoollib-related-cover { height: 160px; display: flex; justify-content: center; align-items: center; margin-bottom: 15px; }
.schoollib-related-cover img { max-height: 160px; max-width: 100%; object-fit: contain; }
.schoollib-related-card strong { margin-top: auto; font-size: 15px; }
#changelanguage { max-width: 1240px; margin: 0 auto; background: white; }
@media(max-width:1100px) {
    .schoollib-brand { flex-basis: 100%; justify-content: flex-start; }
    .schoollib-school-link { margin-right: auto; }
    .schoollib-search-zone #searchform { flex-wrap: wrap; gap: 10px; }
    .schoollib-search-label { width: 100%; }
    .schoollib-result-cards > tbody { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:760px) {
    .schoollib-browse-groups { grid-template-columns: minmax(0,1fr); }
    .schoollib-brand { gap: 15px; }
    #header-region .navbar { padding: 17px; gap: 8px; }
    #header-region .navbar #logo { width: 170px; flex-basis: 170px; height: 36px; }
    #header-region .navbar #logo .navbar-brand { padding-top: 36px; }
    .schoollib-school-name { padding-left: 14px; font-size: 11px; }
    .schoollib-school-name strong { font-size: 15px; }
    .schoollib-search-zone { padding: 18px 17px; }
    .schoollib-search-zone #searchform > .row { flex-wrap: wrap; row-gap: 8px; }
    .schoollib-search-zone #masthead_search { max-width: 150px; font-size: 13px; }
    .schoollib-search-zone #searchsubmit { padding: 10px 12px; }
    .schoollib-search-zone #moresearches { justify-content: flex-start; gap: 8px; }
    #opac-main .main > .container-fluid { padding: 26px 17px 45px; }
    #schoollib-recent [data-recent-list] { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
    .schoollib-book-layout { grid-template-columns: 1fr; gap: 25px; }
    .schoollib-book-layout > .bookcover { width: 220px; margin: auto; }
    .schoollib-related-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:480px) {
    .schoollib-brand { flex-wrap: wrap; }
    .schoollib-school-name { border-left: 0; padding-left: 0; max-width: none; flex: 1 1 160px; }
    .schoollib-school-link { font-size: 12px; }
    #header-region .userlabel { font-size: 12px; }
    #header-region .login-link { padding: 7px 10px; }
    #schoollib-recent [data-recent-list], .schoollib-result-cards > tbody, .schoollib-related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .schoollib-result-cards > tbody > tr { padding: 12px; }
    .schoollib-result-cards .covercol { height: 160px; }
    .schoollib-result-cards .bookcover { height: 155px; }
    .schoollib-result-cards .bookcover img { max-height: 150px; }
    .schoollib-result-cards .title { font-size: 15px; }
    .schoollib-result-cards .actions-menu .btn { font-size: 12px; }
    .schoollib-browse-panel, #schoollib-dewey > .card-body { padding: 19px; }
    .schoollib-directory-paging { flex-wrap: wrap; }
}
@media(prefers-reduced-motion:reduce) { #schoollib-recent [data-recent-list] > li > a { transition: none; } }
@media print {
    .schoollib-book-layout { display: block; }
    .schoollib-book-layout > .bookcover { float: right; width: 160px; }
    .schoollib-search-zone, .schoollib-home-login { display: none; }
}

.schoollib-search-zone #searchform { flex-wrap: wrap; }
.schoollib-search-zone #searchform > .row { flex: 1 1 600px; }
.schoollib-search-zone .schoollib-search-label { display: block !important; }
.schoollib-search-zone .schoollib-search-options { color: #f4e4e7; font-size: 12px; width: 100%; margin-top: 2px; }
.schoollib-search-options summary { cursor: pointer; width: fit-content; }
.schoollib-search-options select { margin-top: 10px; }
#translControl1, #translControl1::placeholder { text-align: left !important; font-style: normal !important; }
#schoollib-recent [data-recent-list] .schoollib-recent-author { min-height: 3em; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#schoollib-recent [data-recent-list] .mt-auto { overflow-wrap: normal; word-break: normal; hyphens: none; }
.schoollib-detail-metadata { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 20px 0; }
.schoollib-detail-metadata .results_summary { margin: 0; }
.schoollib-detail-metadata .results_summary .label { display: block; font-size: 12px; margin-bottom: 6px; }
.schoollib-detail-metadata .resource_list { margin: 0; }
.schoollib-detail-metadata .results_summary.ddc { background: transparent; padding: 0; }
.schoollib-book-layout .bookcover .cover-image img { max-height: 300px; max-width: 100%; width: auto; height: auto; }
.schoollib-authority-kind { display: block; color: #38656c; font-weight: 700; margin-bottom: 12px; }
@media(max-width:1100px) {
    .schoollib-account-row { row-gap: 18px; }
    .schoollib-account-navigation { order: 0 !important; width: 100%; max-width: 100%; flex: 0 0 100%; }
    .schoollib-account-row > :not(.schoollib-account-navigation) { order: 1 !important; width: 100%; max-width: 100%; flex: 0 0 100%; }
    #usermenu ul { display: flex; flex-wrap: wrap; gap: 5px; padding: 0; margin: 0; list-style: none; }
    #usermenu li { border: 0; }
    #usermenu a { padding: 9px 12px; font-size: 14px; }
}
@media(min-width:761px) and (max-width:1000px) { #schoollib-recent [data-recent-list] { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media(max-width:760px) {
    .schoollib-search-zone #searchform > .row { flex-wrap: nowrap; }
    .schoollib-search-zone #searchform > .row > .col { width: auto; min-width: 0; }
    .schoollib-search-zone #searchform > .row > .col-sm-auto { width: auto; }
    .schoollib-search-zone #opac-main-search .form-control { min-width: 0; }
    .schoollib-search-zone #searchsubmit { min-height: 46px; }
}
@media(max-width:480px) { .schoollib-detail-metadata { grid-template-columns: minmax(0,1fr); } }

.maincontent select { max-width: 100%; }
.maincontent fieldset { min-width: 0; }
.schoollib-footer { max-width: 1240px; margin: 0 auto; padding: 23px 28px; border-top: 1px solid var(--school-line); color: #696064; font-size: 13px; }
.schoollib-authority-header + .schoollib-authority-info { margin-top: 0; }

.schoollib-availability-details { margin: 14px 0; font-size: 13px; }
.schoollib-availability-details > summary, .schoollib-result-actions > summary { cursor: pointer; }
.schoollib-is-available { color: #326147; font-weight: 600; }
.schoollib-is-unavailable { color: #823047; font-weight: 600; }
.schoollib-result-actions { font-size: 13px; margin-top: 14px; }
.schoollib-result-cards .title_summary > .author { line-height: 1.4; font-size: 13px; }

.schoollib-browse-groups { align-items: start; }
.schoollib-result-cards .hint, .schoollib-book-layout .hint { display: none; }

.schoollib-book-layout .bookcover .cover-image { width: 100%; margin: 0; padding: 0; }
.schoollib-book-layout .bookcover .cover-image > a { display: block; width: 100%; }
.schoollib-book-layout .bookcover .cover-image img { width: 100%; max-width: 194px; height: auto; }
.schoollib-book-layout .author .byAuthor, .schoollib-book-layout .author .relatorcode { display: none; }

/* Edge-to-edge page zones; keep only the content's own reading padding. */
#wrapper { padding-left: 0; padding-right: 0; margin: 0; max-width: none; width: 100%; }
/* The draft's illustrated empty-book cover, without invented cover artwork. */
.schoollib-recent-cover:not(:has(img))::before,
.schoollib-related-cover:not(:has(img))::before,
.schoollib-cover-placeholder {
    content: "";
    display: block;
    width: 108px;
    height: 145px;
    margin: auto;
    border-left: 5px solid #ded7cf;
    border-radius: 2px 7px 7px 2px;
    background: #f3efea url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%2390877e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7h21a3 3 0 0 1 3 3v23H11a3 3 0 0 1-3-3V7Zm0 20h24M13 12h13M13 17h10'/%3E%3C/svg%3E") no-repeat center / 38px;
}
.schoollib-cover-placeholder { display: none; }
.schoollib-cover-empty > .schoollib-cover-placeholder { display: block; }
.schoollib-cover-empty > .cover-slider { position: absolute; visibility: hidden; pointer-events: none; }
.schoollib-cover-empty { position: relative; }

/* Each native separator belongs to the preceding list item. Replace it with
   an equal-space border so the text is centred between dividers. */
.schoollib-search-zone #moresearches { display: flex; justify-content: center; align-items: stretch; gap: 0; margin-top: 12px; }
.schoollib-search-zone #moresearches li { display: flex; align-items: center; justify-content: center; padding: 0 18px; margin: 0; font-size: 0; border-right: 1px solid #a87e88; }
.schoollib-search-zone #moresearches li:last-child { border-right: 0; }
.schoollib-search-zone #moresearches li > a { display: inline-flex; align-items: center; justify-content: center; text-align: center; margin: 0; padding: 5px 0; font-size: 13px; }
@media(max-width:600px) {
    .schoollib-search-zone #moresearches { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 8px; }
    .schoollib-search-zone #moresearches li { padding: 0 10px; }
    .schoollib-search-zone #moresearches li:nth-child(even) { border-right: 0; }
}

/* Compact account/language tools always share a row. */
.schoollib-account-tools { display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; margin-left: auto; }
#header-region .schoollib-account-tools #members { margin: 0; }
#header-region .schoollib-account-tools .nav-link { font-size: 13px; padding: 6px 9px; }
#header-region .schoollib-account-tools .userlabel { font-size: 13px; }
#header-region .schoollib-account-tools #user-menu { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#results .main > .container-fluid { max-width: 1240px; }
#results #userresults.maincontent, #results .maincontent:has(#numresults) { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
#results #toolbar { background: transparent; border: 0; box-shadow: none; padding: 0 0 16px; margin: 0; row-gap: 12px; }
#results #toolbar .sort_by { display: flex; align-items: center; gap: 10px; min-width: 0; }
#results #toolbar label { color: #696064; font-size: 14px; margin: 0; white-space: nowrap; }
#results #sort_by { width: 220px; max-width: 100%; border: 1px solid var(--school-line); border-radius: 10px; background-color: white; padding: 10px 32px 10px 12px; font-size: 13px; }
#results #selections-toolbar { background: white; border: 1px solid var(--school-line); border-radius: 12px; margin: 0 0 16px; padding: 12px; box-shadow: none; }
#results #search-facets { background: white; border: 1px solid var(--school-line); border-radius: 18px; padding: 18px; box-shadow: none; }
#results #search-facets h2 { background: transparent; border: 0; padding: 0 0 12px; font-size: 18px; }
#results #search-facets h2 a { color: var(--school-wine); }
#results #search-facets ul { list-style: none; padding: 0; margin: 0; background: transparent; }
#results #search-facets .menu-collapse > li { border: 0; border-top: 1px solid var(--school-line); padding: 16px 0; margin: 0; background: transparent; }
#results #search-facets .facet-toggle, #results #search-facets .facet-static { color: var(--school-wine); background: transparent; font-size: 15px; font-weight: 700; padding: 0; margin-bottom: 8px; }
#results #search-facets .facet-collapse li { padding: 5px 0; background: transparent; }
#results #search-facets .facet-label a { white-space: normal; overflow-wrap: anywhere; color: #51464a; text-decoration: none; font-size: 13px; line-height: 1.5; }
#results #search-facets .facet-label a:hover { text-decoration: underline; color: var(--school-wine); }
.schoollib-result-cards > tbody { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.schoollib-result-cards > tbody > tr { padding: 12px; }
.schoollib-result-cards .covercol { height: 154px; margin-bottom: 12px; }
.schoollib-result-cards .bookcover { height: 150px; }
.schoollib-result-cards .bookcover img { max-height: 145px; }
.schoollib-result-cards .title { font-size: 15px; line-height: 1.4; }
.schoollib-result-cards .author { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; min-height: 2.8em; }
.schoollib-result-cards .relatorcode { display: none; }
.schoollib-availability-details > summary { display: flex; gap: 7px; align-items: center; list-style: none; font-size: 12px; }
.schoollib-availability-details > summary::-webkit-details-marker { display: none; }
.schoollib-status-dot { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; background: #519b67; }
.schoollib-is-unavailable .schoollib-status-dot { background: #a67980; }
.schoollib-action-link > .schoollib-icon { background: var(--school-aqua); color: var(--school-wine); border-radius: 10px; padding: 5px; width: 32px; height: 32px; margin-right: 6px; }
.schoollib-card-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: space-between; margin-top: 12px !important; }
.schoollib-card-actions > .actions { flex: 1; min-width: 0; }
.schoollib-card-actions .schoollib-action-link { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 3px !important; font-size: 11px !important; text-decoration: none; }
.schoollib-card-actions .schoollib-icon { margin: 0; }
@media(max-width:1100px) { .schoollib-result-cards > tbody { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:760px) {
 .schoollib-result-cards > tbody { grid-template-columns: repeat(2,minmax(0,1fr)); }
 #results #toolbar .sort_by { width: 100%; }
 #results #sort_by { width: 100%; min-width: 0; }
 #header-region .schoollib-account-tools #user-menu { max-width: 160px; }
}

#results .schoollib-search-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 28px; margin: 0; }
#results .schoollib-facet-column, #results .schoollib-results-column { width: auto; max-width: none; padding: 0; min-width: 0; }
#results #search-facets h2 a { background: transparent; padding: 0; margin: 0; font-size: 18px; line-height: 1.3; text-align: left; }
#results #floating { background: transparent; box-shadow: none; border: 0; }
#results .selections-toolbar { background: white; border: 1px solid var(--school-line); border-radius: 12px; padding: 12px; margin: 0 0 16px; box-shadow: none; font-size: 13px; }
#results #numresults { color: var(--school-wine); font-size: 28px; }
.schoollib-result-count { font-size: 14px; color: #696064; }
@media(max-width:760px) {
 #results .schoollib-search-layout { grid-template-columns: minmax(0,1fr); gap: 20px; }
 #results #search-facets { padding: 15px; }
}

/* Quiet actions sit at the bottom, independent of title/author length. */
.schoollib-result-cards .bibliocol { display: flex; flex: 1; flex-direction: column; }
.schoollib-result-cards .title_summary { display: flex; flex: 1; flex-direction: column; }
.schoollib-result-cards .schoollib-card-actions { margin-top: auto !important; padding-top: 14px; flex-shrink: 0; }
.schoollib-card-actions .schoollib-action-link { color: #74676c; min-height: 44px; font-size: 10px !important; }
.schoollib-card-actions .schoollib-action-link > .schoollib-icon { width: 23px; height: 23px; background: none; color: #86737a; border-radius: 0; padding: 1px; stroke-width: 2.8; }
.schoollib-card-actions .schoollib-action-link:hover, .schoollib-card-actions .schoollib-action-link:focus-visible { color: var(--school-wine); background: #f5f0f1; }
.schoollib-card-actions .schoollib-action-link:hover > .schoollib-icon { color: var(--school-wine); }

/* Match the draft's plain checkbox filters, without the native boxed menu. */
#results #search-facets { background: transparent; border: 0; border-radius: 0; padding: 0; }
#results #search-facets > h2 { padding: 0; margin-bottom: 22px; font-size: 16px; }
#results #search-facets .menu-collapse > li { border-top: 0; border-bottom: 1px solid var(--school-line); padding: 0 0 20px; margin: 0 0 20px; }
#results #search-facets .facet-toggle, #results #search-facets .facet-static { display: block; margin-bottom: 10px; font-size: 15px; }
#results #search-facets .facet-toggle .fa, #results #search-facets .facet-static .fa { display: none; }
#results #search-facets .facet-toggle::before, #results #search-facets .facet-static::before { content: none; }
#results #search-facets .facet-collapse li { padding: 0; }
#results #search-facets .schoollib-facet-choice { display: flex; align-items: flex-start; gap: 9px; padding: 6px 0; }
#results #search-facets .schoollib-facet-choice input { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 3px; cursor: pointer; accent-color: var(--school-wine); }
#results #search-facets .schoollib-facet-choice a { font-size: 14px; line-height: 1.5; color: #51464a; padding: 0; background: transparent; }
#results #search-facets .moretoggle a { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--school-wine); }
@media(max-width:760px) { #results #search-facets .menu-collapse { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; } }
@media(max-width:420px) { #results #search-facets .menu-collapse { grid-template-columns: minmax(0,1fr); } }

/* Reserve the checkbox column explicitly, including inline facet-label spans. */
#results #search-facets .schoollib-facet-choice { display: grid; grid-template-columns: 17px minmax(0,1fr); column-gap: 10px; width: 100%; }
#results #search-facets .schoollib-facet-choice > input { grid-column: 1; position: static; margin: 3px 0 0; }
#results #search-facets .schoollib-facet-choice > a { grid-column: 2; position: static; margin: 0; width: auto; min-width: 0; }

#results #search-facets .schoollib-facet-choice, #results #search-facets .schoollib-facet-choice > a { text-indent: 0; }
