/* ============================================
     TSAS Library Catalog
     Matches Educenter Hugo Theme / Bootstrap 4.4.1
   ============================================ */

/* === FONTS (match main site) === */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap");

/* Override Bootstrap defaults */
:root {
    --bs-body-font-family: "Poppins", sans-serif;
}

/* Montserrat for non-paragraph UI elements */
.nav-link,
.navbar-nav,
.btn,
.breadcrumb,
.badge,
label,
.label,
.toolbar,
.selections-toolbar,
.sort_by,
#moresearches,
.AvailabilityLabel,
.availability-count {
    font-family: "Montserrat", sans-serif !important;
}

.table,
.table-striped {
    --bs-table-striped-bg: #f8f8f8 !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #f8f8f8 !important;
}

/* === LOGO === */
#logo {
    background: transparent
        url("https://tsasstallings.github.io/KohaCSS/liblogo-half-words.svg")
        no-repeat scroll 0%;
    background-size: 120px;
    height: 70px;
    width: 120px;
}

#logo a {
    padding: 70px 0 0;
    width: 120px;
    display: block;
    height: 70px;
}

#logo a.navbar-brand {
    font-size: 0;
    width: 120px;
    height: 70px;
}

#login h1 {
    background: url("https://tsasstallings.github.io/KohaCSS/liblogo-half-words.svg")
        no-repeat scroll center top transparent;
    background-size: 120px;
    padding-top: 130px;
}

/* === HEADER (Indigo Dye - matches footer) === */
.main {
    margin: 0;
    padding: 0;
}
.col {
    padding: 0;
}
#header-region {
    background: #3c6997 !important;
    margin-top: 4px;
}

#header-region .navbar {
    background: #3c6997 !important;
}

/* Cardinal accent bar */
body::before {
    content: "";
    display: block;
    height: 4px;
    background: #ad343e;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

#header-region .nav-link,
#header-region a {
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 1.5em;
}

#header-region .nav-link:hover,
#header-region a:hover {
    color: #fff !important;
}

/* === TYPOGRAPHY (match main site) === */
body,
.fonts-loaded body,
.fonts-loaded button,
.fonts-loaded input,
.fonts-loaded optgroup,
.fonts-loaded option,
.fonts-loaded select,
.fonts-loaded textarea {
    font-family: "Poppins", sans-serif !important;
    font-size: 15px;
    line-height: 1.9;
    color: #5c5c77;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Montserrat", sans-serif !important;
    font-weight: 700;
    color: #094074;
}

h1 {
    font-size: 45px;
}
h2 {
    font-size: 30px;
}
h3 {
    font-size: 20px;
}
h4 {
    font-size: 18px;
}

/* === LINKS - Blue primary, light blue visited === */
a {
    color: #094074;
    transition: all 0.3s ease;
}

a:hover {
    color: #3c6997;
    text-decoration: none;
}

a:visited {
    color: #82b1d4;
}

/* === SEARCH AREA === */
.mastheadsearch {
    background: #f8f9fe;
    padding: 2rem 1.5rem;
    border-radius: 0;
    margin: 1rem 0;
}

/* Uniform height for search bar elements */
#masthead_search,
.mastheadsearch .form-control,
.mastheadsearch .form-select,
#searchsubmit {
    height: 42.5px !important;
    box-sizing: border-box;
}

/* Center the search button icon */
#searchsubmit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 30px !important;
}

#searchsubmit,
.btn-primary {
    background: #ad343e !important;
    border-color: #ad343e !important;
    border-radius: 0;
    padding: 12px 30px;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    text-transform: capitalize;
    transition: all 0.3s ease;
    color: #e1e7f1 !important;
}

#searchsubmit:hover,
.btn-primary:hover,
.btn-primary:focus {
    background: #8a2a32 !important;
    border-color: #8a2a32 !important;
    transform: translateY(-2px);
    box-shadow: none;
}

/* Icons in primary buttons - white/bone */
.btn-primary i,
.btn-primary .fa,
.btn-primary [class^="fa-"],
#scrolltocontent i,
.fa.fa-icon-black,
.btn-danger i,
.btn-danger .fa {
    color: #e1e7f1 !important;
}

.form-control {
    border-radius: 0;
    border-color: #82b1d4;
    padding: 12px 20px;
    height: auto;
}

.form-control:focus {
    border-color: #ffdd4a;
    box-shadow: 0 0 0 3px rgba(255, 221, 74, 0.35);
    outline: none;
}

#moresearches a {
    color: #094074;
    font-weight: 500;
}

#moresearches a:hover {
    color: #ad343e;
}

/* === BUTTONS (match Educenter style) === */
.btn {
    border-radius: 0;
    padding: 5px 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #3c6997 !important;
    border-color: #3c6997 !important;
}

.btn-secondary:hover {
    background: #094074 !important;
    border-color: #094074 !important;
}

.btn-outline-primary {
    color: #ad343e;
    border-color: #ad343e;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #ad343e;
    color: #fff;
}

/* === BREADCRUMBS === */
.breadcrumb {
    background: #f8f9fe;
    border-radius: 0;
    padding: 0.75rem 1rem;
}

body#opac-main ul.breadcrumb {
    display: none;
}

/* === CARDS & PANELS (match Educenter cards) === */
.panel,
.card {
    border-radius: 0;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.panel-heading,
.card-header {
    background: #f8f9fe;
    border-bottom: 2px solid #82b1d4;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
}

/* === DROPDOWN MENUS === */
.dropdown-menu {
    border-radius: 0;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    font-family: "Poppins", sans-serif;
    padding: 10px 20px;
}

.dropdown-item:hover {
    background: #f8f9fe;
    color: #ad343e;
}

/* === TABLES === */
.table thead th {
    background: #094074;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    border: none;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: #f8f8f8;
}

.table td.bibliocol {
    padding-top: 23px;
}

/* === FLIPSTER CAROUSEL === */
.flipster {
    overflow-y: hidden !important;
}

/* === ALERTS === */
.alert-info {
    background: rgba(130, 177, 212, 0.15);
    border-color: #82b1d4;
    border-radius: 0;
    color: #094074;
}

.alert-success {
    border-left: 4px solid #28a745;
    border-radius: 0;
}

.alert-warning {
    border-left: 4px solid #ffdd4a;
    border-radius: 0;
}

/* === LOGIN FORM === */
#login .form-control {
    border-color: #82b1d4;
    border-radius: 0;
}

/* === FOOTER (match main site dark footer) === */
#opac-custom-footer,
footer {
    background: #182b45;
    color: rgba(255, 255, 255, 0.7);
}

#opac-custom-footer a,
footer a {
    color: #82b1d4;
}

#opac-custom-footer a:hover,
footer a:hover {
    color: #fff;
}

/* ============================================
   SEARCH RESULTS PAGE
   ============================================ */

/* === SIDEBAR - Match main site course filters === */
#facetcontainer {
    background: #f8f9fe;
    border: 1px solid #e1e7f1;
    border-radius: 12px;
    padding: 2rem;
    min-width: 270px;
}

#search-facets {
    border: none;
}

#search-facets h2,
#search-facets h3 {
    font-family: "Montserrat", sans-serif;
    color: #094074;
    border-bottom: 2px solid #ad343e;
    padding-bottom: 0.25rem;
}

#search-facets h2,
#search-facets legend {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #094074;
    border-bottom: none;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
}

#search-facets h3,
#search-facets .facet-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #3c6997;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
}

#search-facets h3:first-of-type {
    margin-top: 0;
}

#search-facets ul {
    padding-left: 0;
    list-style: none;
    margin-bottom: 0.75rem;
}

#search-facets li li {
    padding: 0.1rem 0;
    line-height: 1.6;
}

#search-facets a {
    color: #094074;
    font-size: 0.9rem;
}

#search-facets a:hover {
    color: #ad343e;
}

#search-facets .facet-count {
    color: #82b1d4;
    font-size: 0.8rem;
}

/* === RESULTS TOOLBAR === */
#toolbar,
.results-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

#toolbar .btn,
.results-controls .btn {
    padding: 0.5rem 1rem;
}

#selection_ops {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-start;
}

#selection_ops span {
    margin: 0 !important;
}

/* === Did you mean - hidden === */
#didyoumean {
    display: none;
}

/* === RSS ICON === */
.fa.fa-rss.rsssearchicon {
    font-size: 120%;
}

.rss-icon,
a.rssfeed,
a[href*="rss"] img,
#rssfeed {
    position: relative !important;
    float: none !important;
    right: auto !important;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* === RESULTS HEADER === */
.searchresults h1,
#numresults {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 15px;
    font-size: 30px;
}

/* === RESULTS LIST === */
.searchresults {
    line-height: 1.6;
}

.searchresults .record {
    padding: 1rem 0;
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid #e1e7f1;
    border-left: none;
    border-radius: 0;
    background: #fff;
}

.searchresults .record:hover {
    background: #f8f8f8;
}

/* Result content spacing */
.searchresults .record p,
.searchresults .record .results_summary {
    margin: 0.5rem 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Title styling */
a.title {
    font-size: 150%;
    display: block;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    color: #094074;
}

a.title:visited {
    color: #094074;
}

a.title:hover {
    color: #ad343e;
}

/* Author line */
.searchresults .record .author,
.searchresults .record .resource_list {
    margin: 0.5rem 0;
    font-size: 1rem;
}

/* Availability */
.results_summary.availability {
    margin-top: 0.5rem;
    padding: 0;
    background: none;
    border-radius: 0;
    font-size: 0.95rem;
}

/* Hide verbose labels */
.results_summary .label,
.ItemBranch,
.LabelCallNumber {
    display: none;
}

/* Action buttons */
.searchresults .actions {
    margin-top: 0.75rem;
    display: inline;
}

.searchresults .actions a,
.searchresults .btn-link {
    color: #094074;
    font-size: 0.9rem;
}

.searchresults .actions a:hover {
    color: #ad343e;
}

/* === PAGINATION === */
.pagination .page-link {
    color: #094074;
    border-color: #e1e7f1;
    border-radius: 0;
}

.pagination .page-item.active .page-link,
.pagination .page-link[aria-current="page"],
.pagination li[aria-current="page"] a {
    color: #fff !important;
    background: #094074;
    border-color: #094074;
}

.pagination .page-link:hover {
    background: #f8f9fe;
    color: #ad343e;
}

/* === REFINE SEARCH TOGGLE === */
/* Desktop: plain heading style */
.menu-collapse-toggle {
    display: block;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 1rem;
    font-family: "Montserrat", sans-serif !important;
    font-size: 1.1rem;
    font-weight: 600;
    color: #094074 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: default;
    pointer-events: none;
}

.menu-collapse-toggle a {
    color: #094074 !important;
    text-decoration: none !important;
    pointer-events: none;
    cursor: default;
}

/* Mobile: restore button styling */
@media (max-width: 991px) {
    .menu-collapse-toggle {
        background: #3c6997 !important;
        border: 1px solid #3c6997 !important;
        padding: 0.75rem 1rem !important;
        cursor: pointer;
        pointer-events: auto;
    }

    .menu-collapse-toggle a {
        color: #fff !important;
        pointer-events: auto;
        cursor: pointer;
    }
}

#top-pages {
    display: none;
}

/* === SUGGESTIONS === */
.suggestion a,
a[href*="suggestion"] {
    color: #094074;
    padding-bottom: 2px;
}

.suggestion {
    border-radius: 12px;
    background-color: #fffbea;
    border-color: #ffdd4a;
    box-sizing: border-box;
    width: 100%;
    padding: 0.5em;
    text-align: left;
}

/* === SORT DROPDOWN === */
.sort-options select,
#sort_by {
    border: 1px solid #e1e7f1;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: #094074;
}

/* === HIDE VERBOSE METADATA === */
.results_summary.image,
.image-source,
.title_resp_stmt,
.title_medium,
.results_summary.edition,
.results_summary.rda264,
.results_summary.languages,
.results_summary.publisher,
.results_summary.publisher_number,
.results_summary.online_resources,
.results_summary.other_title,
.results_summary.label,
.hint {
    display: none;
}

/* === COLLECTION COLOR CODING === */
/* Base style for all collection names */
.collection-name {
    font-weight: 700;
    -webkit-text-stroke: 3px #333;
    text-stroke: 3px #333;
    paint-order: stroke fill;
}

/* Science Fiction: Gold */
.collection-scifi {
    color: #ffad05;
}

/* Fiction: Carolina Blue */
.collection-fiction {
    color: #82b1d4;
}

/* Mystery: Yellow */
.collection-mystery {
    color: #fcff4b;
}

/* Graphic Novels: Pink */
.collection-gn {
    color: #d43667;
}

/* Non-Fiction: Bright Blue */
.collection-nonfiction {
    color: #1372cc;
}

/* Default/Unknown */
.collection-default {
    color: #094074;
    -webkit-text-stroke: 0;
    text-stroke: 0;
}
.CallNumber {
    font-weight: 700;
}

/* Remove default Koha bracket after call numbers */
span.CallNumber::after {
    content: none !important;
}

/* === RESPONSIVE === */
@media (max-width: 767px) {
    h1 {
        font-size: 35px;
    }
    h2 {
        font-size: 25px;
    }
    h3 {
        font-size: 18px;
    }

    #logo {
        background-size: 50px;
        height: 55px;
        width: 50px;
    }

    #logo a {
        padding: 55px 0 0;
        width: 50px;
    }
}
