/* Main ECU Colors */
:root {
  --ecu-purple: #592A8A;
  --ecu-gold: #FEC923;
  --ecu-dark-purple: #41215e;
}

/* General styles */
html {
  position: relative;
  min-height: 100%;
}

body {
    margin-bottom: 0; /* Remove the bottom margin that was for the absolute footer */
    padding-bottom: 1rem; /* Add padding instead */
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Make the main content area flex-grow to push the footer down */
main {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
}

.bg-ecu-dark-purple {
  background-color: var(--ecu-dark-purple);
}

/* Header/Navbar */
.navbar-brand {
  padding: 0;
}

#wordmark {
  height: 40px;
}

/* ECU Libraries navbar links should be white */
.bg-ecu-dark-purple .nav-link {
  color: rgba(255, 255, 255, 0.95) !important;
}

.bg-ecu-dark-purple .nav-link:hover,
.bg-ecu-dark-purple .nav-link:focus {
  color: rgba(255, 255, 255, 1) !important;
}

.bg-ecu-dark-purple .navbar-toggler-icon {
  filter: brightness(0) invert(1);
}


/* Footer */
.footer {
    position: relative; /* Changed from absolute to relative */
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    background-color: #f8f9fa;
    margin-top: 2rem; /* Add some margin to separate from content */
    border-top: 1px solid #dee2e6;
}

/* Search bar */
#search-navbar {
  background-color: #f8f9fa;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-btn {
  background-color: var(--ecu-purple);
  border-color: var(--ecu-purple);
}

.search-btn:hover {
  background-color: var(--ecu-dark-purple);
  border-color: var(--ecu-dark-purple);
}

/* Home page */
.jumbotron {
  padding: 2rem 1rem;
  margin-bottom: 2rem;
  background-color: #f8f9fa;
  border-radius: 0.3rem;
}

/* Facets */
.facets {
  margin-bottom: 1.5rem;
}

.facets-heading {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.facet-values {
  list-style: none;
  padding-left: 0;
}

.facet-values li {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
}

.facet-label {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facet-count {
  padding-left: 0.5rem;
  color: #6c757d;
}

.more_facets_link {
  display: block;
  padding-top: 0.5rem;
  font-style: italic;
}

/* Facet modal styling */
.modal-footer .pagination-controls {
  display: flex;
  gap: 0.5rem;
}

.modal-footer .sort-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Search results */
.constraints-container {
  background-color: #f8f9fa;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.25rem;
}

.constraints-label {
  font-weight: 500;
  margin-right: 0.5rem;
}

.constraint {
  display: inline-flex;
  align-items: stretch;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  overflow: hidden;
}

.constraint-content {
  display: flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
}

.constraint .filter-name {
  font-weight: normal;
  color: #333;
  margin: 0;
}

.constraint .filter-name:after {
  content: " >";
  margin-left: 0.25rem;
}

.constraint .filter-value {
  color: #333;
  margin: 0;
  padding-left: 0.25rem;
}

.constraint .remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1;
  border: none;
  border-left: 1px solid #ccc;
  background: transparent;
  color: #333;
  cursor: pointer;
  text-decoration: none;
}

.constraint .remove:hover {
  color: #000;
  background-color: transparent;
}

.constraint .remove::before {
  content: "×";
  font-weight: bold;
}

.constraint .remove i {
  display: none;
}

.applied-filter {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  margin-right: 0.5rem;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
}

/* Generic filter styles (for non-constraint filters) */
.applied-filter .filter-name {
  color: #6c757d;
  margin-right: 0.25rem;
}

.applied-filter .filter-name:after {
  content: ":";
}

.document {
  margin-top: 1rem;
  padding-block: 1rem;
  padding-inline: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.document-title-heading {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.document-metadata {
    list-style-type:none;
    padding-left:0;
  color: #6c757d;
  font-size: 0.875rem;
}

.document-metadata > div {
  margin-bottom: 0.25rem;
}

/* Dropdown menus */
.dropdown-menu {
  padding: 0.5rem 0;
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--ecu-purple);
}

/* Pagination */
.pagination .page-item.active .page-link {
  color: white;
  background-color: var(--ecu-purple);
  border-color: var(--ecu-purple);
}

.pagination .page-link {
  color: var(--ecu-purple);
}

.pagination .page-link:hover {
  color: var(--ecu-dark-purple);
}

/* Cards */
.card-header {
  background-color: rgba(89, 42, 138, 0.05);
}

/* Detail Page Styles */
.document-thumbnail img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
  padding: 5px;
  background-color: #fff;
}

.brief-view td {
  padding: 8px;
}

.brief-view td:first-child {
  width: 150px;
  font-weight: 500;
  vertical-align: top;
}

.see-more td {
  padding: 8px;
}

.see-more td:first-child {
  width: 150px;
  font-weight: 500;
  vertical-align: top;
}

.bg-ecu-purple {
  background-color: var(--ecu-purple) !important;
  color: white;
}

.panel-title {
  margin-top: 0;
  margin-bottom: 0;
  color: inherit;
  font-size: 16px;
}

.show-tools .panel-heading {
  background-color: var(--ecu-purple);
  color: white;
  padding: 10px 15px;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

.show-tools .panel-body {
  padding: 15px;
  border: 1px solid #ddd;
  border-top: none;
}

.show-tools .nav-link {
  padding: 8px 0;
  color: var(--ecu-purple);
  text-decoration: none;
}

.show-tools .nav-link:hover {
  text-decoration: underline;
}

.gb-item {
  margin-bottom: 15px;
}

.more_like_this_document {
  margin-bottom: 8px;
}

.more_like_this_document a {
  color: var(--ecu-purple);
  text-decoration: none;
}

.more_like_this_document a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .brief-view td:first-child,
  .see-more td:first-child {
    width: 120px;
  }
}

/* New Titles section styles */
.new-title-card {
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

    .new-title-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .new-title-card img {
        padding-top: 1rem;
        max-height: 150px;
        width: auto;
        object-fit: contain;
        transition: all 0.3s ease;
    }

    .new-title-card:hover img {
        transform: scale(1.05);
    }

    .new-title-card .card-title {
        font-size: 0.9rem;
        line-height: 1.2;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        color: var(--ecu-purple);
    }


/* Availability status styles */
.available-text {
  color: #28a745; /* Bootstrap success green */
  font-weight: 500;
}

.unavailable-text {
  color: #dc3545; /* Bootstrap danger red */
  font-weight: 500;
}

.available-indicator {
  color: #28a745;
}

.unavailable-indicator {
  color: #dc3545;
}

/* Inline availability table in search results */
.document-availability-table {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    table-layout: fixed;
    width: 100%;
}

.document-availability-table th:nth-child(1),
.document-availability-table td:nth-child(1) {
    width: 40%;
}

.document-availability-table th:nth-child(2),
.document-availability-table td:nth-child(2) {
    width: 30%;
}

.document-availability-table th:nth-child(3),
.document-availability-table td:nth-child(3) {
    width: 30%;
}

.document-availability-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border: none;
}

.document-availability-table td {
    padding: 0.15rem 0.5rem;
    border: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-availability-table .badge {
    min-width: 7.5rem;
    display: inline-block;
    text-align: center;
}

.document-availability-table-online th:nth-child(1),
.document-availability-table-online td:nth-child(1) {
    width: 100%;
    white-space: normal;
}

.document-online-access-badge {
    text-decoration: none;
    font-weight: 600;
    vertical-align: middle;
}

.document-online-access-badge:hover,
.document-online-access-badge:focus {
    text-decoration: none;
}

/* Item notes styling */
.item-note-badge {
  font-size: 0.75rem;
  border-radius: 12px;
  padding: 0.375rem 0.75rem;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.3;
  display: inline-block;
  width: auto;
  min-width: fit-content;
}

/* Add to site.css or a separate MARC view stylesheet */
#marc_view .field {
    margin-bottom: 10px;
}

#marc_view .tag_ind {
    margin-bottom: 5px;
}

#marc_view .tag {
    font-weight: bold;
    margin-right: 10px;
}

#marc_view .control_field_values {
    color: #333;
}

#marc_view .ind1, #marc_view .ind2 {
    display: inline-block;
    margin-right: 10px;
    color: #666;
}

#marc_view .subfields {
    margin-left: 20px;
}

#marc_view .sub_code {
    color: #666;
    margin-right: 5px;
}

.accordion {
    --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.bookplate img {
  width: 100%;
  height: auto;
}
