:root {
    --green-color: #5e9f5c; /* Darker muted green */
    --dark-green: #185642; /* Darker muted green */
      --dark-green-hover: #124434; /* Slightly darker shade for hover */
    --green-hover: #4f8a4d; /* Even deeper muted green for hover */
}


.image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-container img {
    display: block;
    width: 161px;
    height: 161px;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
}


.overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7); /* Darker semi-transparent background for better contrast */
    color: white; /* Ensure text is white */
    padding: 15px;
    text-align: center;
}

.overlay-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: white; /* Set title color to white */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7); /* Add subtle text shadow */
}

.overlay-detail {
    font-size: 1rem;
    font-weight: 500;
    color: white; /* Set detail text color to white */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7); /* Add subtle text shadow */
    margin: 0;
}



/*.pagination {*/
/*    display: flex;*/
/*    justify-content: center;*/
/*    margin-top: 2em;*/
/*}*/

/*.pagination ul {*/
/*    list-style: none;*/
/*    padding: 0;*/
/*    display: flex;*/
/*    gap: 0.5em;*/
/*}*/

/*.pagination li {*/
/*    display: inline-block;*/
/*    border-radius: 5px;*/
/*    overflow: hidden;*/
/*}*/

/*.pagination a, .pagination button {*/
/*    text-decoration: none;*/
/*    display: inline-block;*/
/*    padding: 0.5em 1em;*/
/*    font-size: 1rem;*/
/*    color: #007bff;*/
/*    background-color: #fff;*/
/*    border: 1px solid #ddd;*/
/*    border-radius: 5px;*/
/*    transition: background-color 0.3s, color 0.3s;*/
/*    cursor: pointer;*/
/*    outline: none;*/
/*}*/

/*.pagination a:hover, .pagination button:hover {*/
/*    background-color: #007bff;*/
/*    color: white;*/
/*}*/

/*.pagination a:focus, .pagination button:focus {*/
/*    outline: none;*/
/*    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);*/
/*}*/

/*.pagination-num.active a, .pagination-num.active button {*/
/*    background-color: #007bff;*/
/*    color: white;*/
/*    border-color: #007bff;*/
/*}*/

/*.pagination-arrow a {*/
/*    padding: 0.5em;*/
/*    border-radius: 50%;*/
/*}*/

/*.pagination-arrow a i {*/
/*    font-size: 1rem;*/
/*    vertical-align: middle;*/
/*}*/

/*.pagination-arrow a:hover {*/
/*    background-color: #007bff;*/
/*    color: white;*/
/*}*/

/*!* Hide the first and last pagination items on small screens *!*/
/*@media (max-width: 576px) {*/
/*    .pagination .page-item.first,*/
/*    .pagination .page-item.last {*/
/*        display: none;*/
/*    }*/
/*}*/

/* Change the tooltip background to blue and text to white */
.noUi-tooltip {
    background-color: var(--dark-green);  /* Blue background */
    /*background-color: #0176D5;  !* Blue background *!*/
    color: #ffffff;             /* White text */
    border-radius: 4px;         /* Optional: add rounded corners */
    padding: 5px 10px;          /* Optional: add some padding for better spacing */
    font-size: 14px;            /* Optional: adjust the font size */
}

/* Hide all pip markers and small values */
.noUi-marker {
    display: none;
}

/* Show only the pip values that have a number */
.noUi-value {
    display: block !important; /* Ensure these are visible */
}

/* Optionally, hide smaller value markers (if any) */
.noUi-value-small {
    display: none !important; /* Ensure only large values remain */
}



/*.slider-wrapper {*/
/*    position: relative;*/
/*    height: 60px; !* or whatever height you want *!*/
/*}*/

/*.slider-wrapper .noUi-target {*/
/*    height: 100% !important;*/
/*    border-radius: 0;*/
/*}*/

/*.slider-wrapper .noUi-connect {*/
/*    height: 100% !important;*/
/*    top: 0 !important;*/
/*}*/







/*!* Make track background transparent and remove border *!*/
/*.noUi-target {*/
/*    background: transparent !important;*/
/*    border: none !important;*/
/*    box-shadow: none !important;*/
/*    height: 100%; !* Ensure it takes full height if needed *!*/
/*}*/

/*.noUi-connect {*/
/*    background: #E8F6F5 !important;*/
/*    z-index: 0 !important; !* Not -99 — just lower than the ticks *!*/
/*    position: relative; !* Required for z-index to apply *!*/
/*}*/


/*.noUi-connects {*/
/*border-bottom: 1px solid #dee2e6;*/
/*        z-index: 0 !important; !* Not -99 — just lower than the ticks *!*/

/*}*/

/*.noUi-value.noUi-value-horizontal.noUi-value-large::before {*/
/*    content: "";*/
/*    position: absolute;*/
/*    top: -100px; !* Adjust to reach the top of .slider-wrapper *!*/
/*    left: 50%;*/
/*    transform: translateX(-50%);*/
/*    width: 1px;*/
/*    height: 80px; !* Same as the `top` offset *!*/
/*    background-color: #dee2e6; !* Bootstrap border color *!*/
/*    z-index: 0;*/
/*}*/

/*.noUi-connect {*/
/*    z-index: -1;*/
/*    position: relative; !* Make sure it can have z-index *!*/
/*}*/















.module-search-pg .spg-date-filter {
  position:relative;
  z-index:500;
  padding:0 0 2.9411764706rem;

}
.module-search-pg .spg-date-filter .title {
  font-size:.8235294118rem;
  line-height:1.3em;
  margin-bottom:.5em
}
.module-search-pg .spg-date-filter .base {
  position:relative;
  height:5.7058823529rem;
}
.module-search-pg .spg-date-filter .timeline {
  z-index:1;
  display:flex;
  width:100%;
  align-items:flex-end;
  flex-wrap:nowrap;
  height:80%;
  position:relative;
    background: rgba(232, 246, 245, 1);

  /*background-color:#E8F6F5*/
}



.module-search-pg .spg-date-filter .timeline .decade {
  flex-grow:1;
  height:inherit;
  position:relative;
border-bottom: 1.71px solid rgba(200, 200, 200, 1);
}

/* Make only 2000 smaller — 24% of normal size - since only goes up to 2024 */
.module-search-pg .spg-date-filter .timeline .decade[data-decade="2000"] {
  flex-grow: 0.24;
}
/* Hide only the span inside the 2000 decade block */
.module-search-pg .spg-date-filter .timeline .decade[data-decade="2000"] .seculo span {
  display: none;
}



.module-search-pg .spg-date-filter .timeline .decade .bar {
  z-index:1;
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  background-color:#0176d5;
  border-right: solid 1px rgba(255,255,255,.1);
  border-bottom: solid 1px red;

}
.module-search-pg .spg-date-filter .timeline .decade .seculo {
  position:absolute;
  z-index:100 !important;
  width:100%;
  height:100%;
  border-left: 1.71px solid rgba(200, 200, 200, 1);
  /*border-left: 1.71px solid rgba(230, 230, 230, 1);*/
  /*border-left:solid 2px #D0D0D0;*/
}

.module-search-pg .spg-date-filter .timeline .decade .seculo>span {
  font-size: 0.746875rem;
    /*font-size:.8235294118rem;*/
  line-height:1.3em;
  display:block;
  position:absolute;
  width:4rem;
  text-align:center;
  bottom:-1.8rem;
  left:calc(50% - 2.5rem);
    color: #000000;

}
.module-search-pg .spg-date-filter .range-base {
  overflow:hidden;
  position:absolute;
  z-index:10;
  width:calc(100% + 44px);
  margin-left:-22px;
  padding:0 22px;
  height:calc(100% + 6rem);
  margin-top:-3rem;
  left:0;
  top:0;
  display:flex;
  align-items:center
}
.module-search-pg .spg-date-filter .range-base .range {
  width:100%;
  margin:23px 0;
  box-shadow:none;
  background-color:transparent;
  border:none
}
.module-search-pg .spg-date-filter .range-base .range .noUi-connect {
  background:transparent;
}


.module-search-pg .spg-date-filter .range-base .range .noUi-horizontal {
  height:0!important;
  border:0!important;
  box-shadow:0!important
}
.module-search-pg .spg-date-filter .range-base .range .noUi-handle {
  box-shadow:none;
  height:20px;
  width:20px;
  top:-9px;
  right:-10px;
  border:none;
  background-color:transparent;
  cursor:grab
}
.module-search-pg .spg-date-filter .range-base .range .noUi-handle.noUi-active {
  cursor:grabbing!important
}
.module-search-pg .spg-date-filter .range-base .range .noUi-handle .noUi-touch-area {
  border-radius:10px;
  border:solid 1px var(--dark-green);
  width:100%;
  height:100%;
  background-color:#fff
}
.module-search-pg .spg-date-filter .range-base .range .noUi-handle:after {
  display:block!important;
  content:"";
  position:absolute;
  height:4.8235294118rem;
  width:100vw;
  background-color:#ffffffe6;
  top:calc(-2.5rem + 10px);
  z-index:-1!important;
  border:none;
  opacity:1
}
.module-search-pg .spg-date-filter .range-base .range .noUi-handle:before {
  display:none!important
}
.module-search-pg .spg-date-filter .range-base .range .noUi-handle.noUi-handle-upper:after {
  left:8px;
  border-left:solid 2px #E6E6E6!important
}
.module-search-pg .spg-date-filter .range-base .range .noUi-handle.noUi-handle-upper .noUi-tooltip {
  left:20%!important
}
.module-search-pg .spg-date-filter .range-base .range .noUi-handle.noUi-handle-lower:after {
  right:8px;
  left:auto;
  border-right:solid 2px #E6E6E6!important;

}
.module-search-pg .spg-date-filter .range-base .range .noUi-handle .noUi-tooltip {
  font-size:.8235294118rem;
  line-height:1.7647058824rem;
  font-weight:500;
  border:none;
  bottom:auto;
  top:3.6rem;
  left:65%;
  background-color: var(--dark-green);
  color:#fff;
  white-space:nowrap;
  padding:0 .5882352941rem;
  border-radius:.2352941176rem;
  box-shadow:0
}






.no-side-border-accordion .accordion-item {
    border-left: none;
    border-right: none;
}

.no-side-border-accordion .accordion-header {
    border-left: none;
    border-right: none;
}

.no-side-border-accordion .accordion-body {
    border-left: none;
    border-right: none;
}

.result-count-text {
    /*color: #0176d5 !important; !* Same as .color-blue *!*/
    white-space: nowrap !important; /* Same as .text-nowrap */
    font-size: 0.9rem;
    font-weight: 500;
}

.keyword-search-wrapper {
    position: relative; /* Make wrapper relative so the icon can be positioned inside */
}

.keyword-search {
    padding-left: 35px; /* Add padding to the left to make room for the icon */
    padding-top: 15px; /* Add a small amount of padding on top */
    padding-bottom: 15px; /* Add a small amount of padding at the bottom */
    width: 100%;
    border-radius: 1px; /* Optional: Round the edges of the input */
    border: 1px solid white; /* Optional: Add a border */
    background-color: #F1F2F4; /* Background color */
}

.search-icon {
    position: absolute;
    left: 10px; /* Position the icon 10px from the left of the wrapper */
    top: 50%;
    transform: translateY(-50%); /* Center the icon vertically */
    font-size: 18px; /* Adjust the icon size */
    color: #999; /* Optional: Set icon color */
}







#nav-perspective .icon {
  width: 38.46px;
  height: 50px;
}

@media (max-width: 768px) {
  #nav-perspective .icon {
    width: 24.61px;
    height: 32px;
  }
}

#nav-perspective .active {
    background-color: #dceedd;
    border-bottom: 4px solid #155843;
}

#nav-perspective .active .icon ellipse,
#nav-perspective .active .icon path {
    fill: #185642 !important;
}


#nav-perspective .nav-link {
   cursor: pointer;
}

/* Entity card related entities tab navigation - matches #nav-perspective styling */
.entity-tab-nav .icon {
  width: 38.46px;
  height: 50px;
}

@media (max-width: 768px) {
  .entity-tab-nav .icon {
    width: 24.61px;
    height: 32px;
  }
}

.entity-tab-nav .active {
    background-color: #dceedd;
    border-bottom: 4px solid #155843;
}

.entity-tab-nav .active .icon ellipse,
.entity-tab-nav .active .icon path,
.entity-tab-nav .active .icon line {
    fill: #185642 !important;
    stroke: #185642 !important;
}

.entity-tab-nav .active .icon circle {
    fill: #185642 !important;
}

.entity-tab-nav .nav-link {
   cursor: pointer;
}





/*#nav-perspective {*/
/*    background-color: #f8f9fa; !* Light background for the entire nav *!*/
/*    padding: 8px;*/
/*    border-radius: 6px;*/
/*    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);*/
/*    margin-top: 50px;*/
/*}*/

/*#nav-perspective .nav-item {*/
/*    margin: 0 5px; !* Reduce space between nav items *!*/
/*}*/

/*#nav-perspective .nav-link {*/
/*    background-color: #e9ecef; !* Soft background color for nav links *!*/
/*    border: 1px solid transparent;*/
/*    border-radius: 8px;*/
/*    padding: 8px 10px; !* Less padding to reduce height *!*/
/*    color: #333; !* Darker text color for readability *!*/
/*    font-weight: 500;*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    justify-content: center;*/
/*    align-items: center;*/
/*    transition: background-color 0.2s, border-color 0.2s, color 0.2s;*/
/*    font-size: 15px;*/
/*    line-height: 1.2; !* Adjust line height for compactness *!*/
/*}*/

/*#nav-perspective .nav-link:hover {*/
/*    background-color: #d1e7ff; !* Softer blue background on hover *!*/
/*    border-color: #007bff; !* Change border color on hover *!*/
/*    color: #007bff; !* Change text color on hover *!*/
/*}*/

/*#nav-perspective .nav-link.active {*/
/*    background-color: var(--dark-green); !* Primary blue background for active tab *!*/
/*    !*background-color: #0176d5; !* Primary blue background for active tab *!*!*/
/*    color: #fff; !* White text for active tab *!*/
/*    border-color: #0176d5; !* Border matches background for active tab *!*/
/*}*/

/*#nav-perspective .nav-link .fw-bold {*/
/*    font-size: 16px; !* Reduce font size slightly *!*/
/*    margin-bottom: 3px; !* Slightly less margin *!*/
/*}*/

/*#nav-perspective .nav-link small {*/
/*    font-size: 12px; !* Keep small font size for supporting text *!*/
/*    !*color: #555; !* Darker gray for better readability *!*!*/
/*}*/

/*#nav-perspective .nav-link .result-count {*/
/*    font-weight: bold;*/
/*    !*color: #0176d5; !* Primary blue for result count *!*!*/
/*}*/

/*#nav-perspective .nav-link i {*/
/*    font-size: 16px; !* Slightly smaller icon size *!*/
/*    margin-top: 3px; !* Less margin for compact look *!*/
/*    !*color: #6c757d; !* Icon color *!*!*/
/*    transition: color 0.2s;*/
/*}*/

/*#nav-perspective .nav-link i:hover {*/
/*    color: #0176d5; !* Change icon color on hover *!*/
/*}*/


.pagination-container {
    text-align: center;
    margin-top: 5em; /* Matches .mt-em-5 */
    position: sticky;
    bottom: 0;
    background-color: white; /* To ensure readability while scrolling */
    padding: 1rem;
    z-index: 100; /* Keep above other content when scrolling */
}

.pagination {
    display: inline-flex; /* To center the pagination */
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    margin: 0 0.25rem;
}

.pagination li a,
.pagination li button {
    padding: 0.5rem 0.75rem;
    color: #343c3c;
    text-decoration: none;
    border: 3px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #fff;
    cursor: pointer;
}

.pagination li.active a,
.pagination li.active button {
    background-color: #0176d5;
    color: white;
    border-color: #0176d5;
}

.pagination li:hover a,
.pagination li:hover button {
    background-color: #e9ecef;
    border-color: #e9ecef;
}

.pagination li a i {
    font-size: 1rem; /* Style for the chevron icon */
}

.pagination-arrow a {
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}







/* Base styling for the table */
table.module-search-pg {
    font-size: 0.85rem;
    line-height: 1.4;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #ffffff;
    transition: box-shadow 0.3s ease, transform 0.3s ease; /* Smooth shadow and transform transitions */
}

/* Header styling */
table.module-search-pg thead th {
    font-weight: bold;
    background-color: #f8f9fa;
    color: #333;
    padding: 0.75rem;
    border-bottom: 2px solid #dee2e6;
    text-align: center;
    transition: background-color 0.3s ease; /* Smooth transition for hover */
    display: none;
}

/* Cell styling */
table.module-search-pg tbody td {
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    vertical-align: middle;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition on hover */
}

/* Hover effect for rows */
table.module-search-pg tbody tr:hover {
    background-color: #f1f1f1; /* Light grey on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a shadow for floating effect */
    transform: translateY(-2px); /* Slight lift effect */
    cursor: pointer; /* Pointer cursor to indicate clickability */
}

/* Thumbnail styling */
table.module-search-pg img.img-thumbnail {
    width: 50px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease; /* Smooth transition for thumbnail */
}

/* Hover effect for thumbnail */
table.module-search-pg img.img-thumbnail:hover {
    transform: scale(1.05); /* Slight zoom on hover */
}

/* Search results table result description */
.spg-tbl-results ul {
    list-style: none; /* Removes bullets */
    padding: 0;       /* Removes left padding */
    margin: 0;        /* Removes top/bottom margin */
            font-size: 1rem; /* Reduce font size for smaller screens */
}

/* Ensure consistent row height */
.module-search-pg tbody .list-item {
    height: 100px; /* Fixed height for each row */
    font-size: 1rem;
}

/* Calculate min-height based on the height of 5 rows */
.module-search-pg tbody {
    min-height: calc(100px * 5); /* Height for 5 rows */
    max-height: calc(100px * 5); /* Optionally, limit max height */
    overflow-y: auto; /* Allow scrolling if there are more rows */
}

/* Ensure the table layout stays consistent */
.module-search-pg {
    /*table-layout: fixed;*/
    width: 100%;
}



.search-result-badge {
    white-space: normal; /* Allows text to wrap */
    word-wrap: break-word; /* Ensures long words break */
    display: inline-block; /* Prevents excessive stretching */
    max-width: 100%; /* Ensures it doesn’t overflow */
    text-align: center; /* Keeps text centered */
    padding: 5px 10px; /* Adjust padding for better visibility */
}

a.badge {
  text-decoration: none;
}

a.badge:hover {
  text-decoration: underline;
}

/* Parent form-switch container alignment */
.form-switch {
    display: flex;  /* Flexbox to align input and label */
    align-items: center;  /* Vertically center-align */
    gap: 0.5rem;  /* Space between the switch and the label */
}

/* Switch track */
.form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
    background-color: #e0e0e0;
    border-radius: 1rem;
    transition: background-color 0.3s ease, box-shadow 0.2s ease;
    position: relative;
    outline: none;
    cursor: pointer;
    margin: 0;  /* Remove default margin */
}

/* Switch thumb */
.form-switch .form-check-input::before {
    content: '';
    position: absolute;
    width: 1.4rem;
    height: 1.4rem;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    transform: translateX(0.1rem);
}



/* Checked state */
.form-switch .form-check-input:checked {
    background-color: var(--dark-green); /* Use root variable */
    border-color: var(--dark-green); /* Use root variable */
}


/*.form-switch .form-check-input:checked {*/
/*    background-color: #0d6efd;*/
/*}*/

/* Change the background and border color to white when the accordion button is active */
.accordion-button:not(.collapsed), .accordion-button:focus {
    background-color: #FFFFFF !important; /* Custom background */
    border-color: #FFFFFF !important; /* White border */
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5) !important; /* Subtle white highlight effect */
}




.form-switch .form-check-input:checked::before {
    transform: translateX(1.4rem);
}

/* Align the label to the center */
.form-switch .form-check-label {
    margin: 0;  /* Ensure no extra margins */
    padding: 0;  /* Remove padding to center */
    line-height: 1.5;  /* Matches the height of the switch */
}

.form-switch {
  padding-left: 0;
  padding-bottom: 0.5em;

}


.search-filter-badge {
    background-color:  #D6EDD9;
    color: var(--dark-green);
    font-weight: 500;
}


.result-header {
  margin-bottom: 0.5rem;
  color: var(--dark-green);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.75rem;
  font-weight: 300;
}


/* Specific overrides for each collection search filter */
.badge-rounded.search-filter-badge[data-value="Age of Conquest"],
.badge-rounded.search-filter-badge[data-value="Age of Revolution"] {
    background-color: var(--portal-tag-color);
    color: #282c2d;
}

.badge-rounded.search-filter-badge[data-value="Irish House of Commons"],
.badge-rounded.search-filter-badge[data-value="Chief Secretary"],
.badge-rounded.search-filter-badge[data-value="State Papers Ireland"],
.badge-rounded.search-filter-badge[data-value="Royal Revenue"],
.badge-rounded.search-filter-badge[data-value="CIRCLE"] {
    background-color: var(--gold-seam-tag-color);
    color: #282c2d;
}

.badge-rounded.search-filter-badge[data-value="Irish Kings and English Rulers"] {
    background-color: var(--curated-tag-color);
    color: #fff;
}

.badge-rounded.search-filter-badge[data-value="Irish Kings and English Rulers"] i {
    color: #fff;
}

/* ====================================================================
 *  Enhanced entity list view (offices & organisations search results)
 * ==================================================================== */

.entity-list-item {
    border-bottom: 1px solid #eef0f2;
    transition: background-color 0.15s;
}

.entity-list-item:first-child {
    border-top: 1px solid #eef0f2;
}

.entity-list-link:hover {
    background-color: #f8faf9;
}

.entity-list-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 0.5rem;
    background-color: #e8f5e9;
    color: var(--dark-green);
    font-size: 1.1rem;
}

.entity-list-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.entity-list-meta + .entity-list-meta::before {
    content: "\00b7";
    color: #adb5bd;
    margin-right: 0.25rem;
}

.entity-list-type-badge {
    display: none;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.2em 0.55em;
    border-radius: 0.25rem;
    background-color: #f0f4f1;
    color: #6c757d;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .entity-list-type-badge {
        display: inline-block;
    }
}
