/*
 * VERIDIAN CSS
 *
 * Now that we're using Bootstrap 5.3.0, browser compatibility is:
 *   - Microsoft Edge >= 16
 *   - Firefox >= 60
 *   - Safari >= 12
 *   - iOS Safari >= 12
 *   - Chrome >= 60
 * Any other browsers are unsupported (this includes all versions of IE).
 *
 * Conventions:
 *   - Veridian class names should no longer start with "veridian"
 *   - Veridian class names shouldn't contain hyphens, to make it clearer which are Bootstrap classes
 *   - Rules are ordered alphabetically within each section
 *   - Media queries appear directly after the normal rule
 *
 * Colours: A mixture of Bootstrap colours (use the Bootstrap variables), standard HTML web colours, and a few
 *   custom colours. Usage should be commented.
 *
 * Font sizes: No base font size is specified, to leave the browser to use its default size. The minimum font size
 *   should be 0.8rem.
 *
 * Screen sizes:
 *   <= 500px is referred to as "tiny"
 *   <= 700px is referred to as "small"
 *   >= 701px is referred to as "not small"
 *   <= 800px is referred to as "smallish"
 *
 * Copyright (C)  DL Consulting Ltd.
 *
 */

/* ---- General element styling ---- */

body
{
  /* Part of the "sticky footer" CSS, from https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ */
  display: flex;
  flex-direction: column;
  height: 100%;
}

header, footer
{
  /* Part of the "sticky footer" CSS, from https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ */
  flex: none;
}

html
{
  /* We don't set a base font-size here -- leave the browser to use its default size (for better accessibility) */
  height: 100%;  /* Part of the "sticky footer" CSS, from https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ */
}

/* We don't want <ol> to display the list numbers itself, due to the ridiculous constant 40px left padding (too much sometimes, not enough other times) */
ol
{
  list-style: none;
  margin: 0px;
  padding: 0px;
}

/* We override the default browser focus-visible outline to have these consistent across different elements. In some places this will need to be changed to have enough contrast. */
/* This can be done using classes such as focus-ring-light: https://getbootstrap.com/docs/5.3/helpers/focus-ring/ */
:focus-visible 
{
  outline: var(--bs-focus-ring-width) solid var(--bs-focus-ring-color);
}


/* ---- General classes that can be applied to any element ---- */

.commonedging
{
  padding-inline-start: 15px;
  padding-inline-end: 15px;
}
/* For reducing the left/right edging on tiny screens */
@media (max-width: 500px)
{
  .commonedging
  {
    padding-inline-start: 5px;
    padding-inline-end: 5px;
  }
}

.hiddenalways
{
  display: none;
}

.hiddeninitially
{
  display: none;  /* Initial state, made visible when necessary */
}

/* For hiding some components of the UI on small screens -- note includes "screen" to avoid applying to print pages */
@media screen and (max-width: 700px)
{
  .hiddenwhensmall
  {
    display: none !important;
  }
}

/* For hiding some components of the UI on not-small screens (used for components that only apply to small screens) */
@media (min-width: 701px)
{
  .hiddenwhennotsmall
  {
    display: none !important;
  }
}

.highlightcolor
{
  background-color: #FFFF77;  /* Light yellow */
}

.inactivelink
{
  color: var(--bs-gray-600);
}

.overlay
{
  margin: 0px;
  padding: 0px;
  position: absolute;  /* Position relative to ancestor element (which can't be static) */
}

/* Display a "pulldown arrow" before (i.e. to the left, assuming ltr display) or after (i.e. to the right, assuming ltr display) the element. Use the .pulldownarrownone class if you want to prevent arrows from being displayed by Bootstrap classes that normally add them (e.g. "dropdown-toggle") */
.pulldownarrowbefore,
.pulldownarrowafter
{
  vertical-align: middle;
}
.pulldownarrowbefore::before,
.pulldownarrowafter::after
{
  border-inline-start: .3em solid transparent;
  border-inline-end: .3em solid transparent;
  border-top: .3em solid;
  content: "";
  display: inline-block;
  height: 0;
  vertical-align: middle;
  width: 0;
}
.pulldownarrowbefore::before
{
  margin-inline-end: .3em;
}
.pulldownarrowafter::after
{
  margin-inline-start: .3em;
}
.pulldownarrownone::before,
.pulldownarrownone::after
{
  border: 0;
  margin: 0;
}

.pulldownarrowbefore.collapsed::before,
.pulldownarrowafter.collapsed::after
{
  border-top: .3em solid transparent;
  border-bottom: .3em solid transparent;
}

/* Dynamic arrow for arrow on the left */
.pulldownarrowbefore.collapsed::before
{
  border-inline-start: .3em solid;
}

/* Dynamic arrow for arrow on the right */
.pulldownarrowafter.collapsed::after
{
  border-inline-end: .3em solid;
}

.semitransparent
{
  opacity: 0.5;
}

.transparent
{
  opacity: 0.0;
}


/* ---- Special "divtable" classes -- here so they can be overridden at any point below ---- */

div.divtable
{
  display: table;
}

div.divtable > div
{
  display: table-row;
}

div.divtable > div > div
{
  display: table-cell;
  vertical-align: top;  /* Override default "baseline" value, which works weirdly */
}

/* On tiny screens override the "display: table-cell" to display the divtable cells vertically */
@media (max-width: 500px)
{
  div.wrappingdivtable500 > div > div
  {
    display: block;
    width: 100% !important;
  }
}
/* On small screens override the "display: table-cell" to display the divtable cells vertically */
@media (max-width: 700px)
{
  div.wrappingdivtable700 > div > div
  {
    display: block;
    width: 100% !important;
  }
}


/* ---- Specific classes ---- */

/* The document-level/section-level tabs have links, but the "nav-link" class must be applied to the parent <div> instead of the <a>. Style these links as if "nav-link" was applied to them */
a.documentdisplayleftpanetablink
{
  text-decoration: none;
}
/* The link text has been modified to be inside of an h2 element for accessibility and these CSS rules are applied to make it look like a normal link */
a.documentdisplayleftpanetablink h2
{
  display: inline;
  font-size: var(--bs-nav-link-font-size);
}

/* Links in user admin table */
a.editusergroupslink, a.listusersallowingcommunicationslink, a.untickusercommunicationslink
{
  font-size: 0.8rem;
  font-weight: normal;
  vertical-align: top;  /* For superscript-style display */
}

a.pdflink
{
  white-space: nowrap;  /* It's important everything is on one line, for the link icon display */
}

/* Enforce dark text for highlighting because the background is yellow (e.g. highlighting in the tag badges) */
b.highlightcolor
{
  color: black;
}

/* Remove highlighting when it is toggled off */
body.highlightingoff .highlightcolor
{
  font-weight: var(--bs-body-font-weight) !important;
  background-color: transparent !important;
}

.standardtextsize
{
  font-size: var(--bs-body-font-size);
}

/* Button that is 250px wide unless there's not enough room */
button.button250, input.button250
{
  display: block;
  margin-inline-start: auto;
  margin-inline-end: auto;
  max-width: 250px;
  width: 100%;
}

.autocomplete-suggestions
{
  cursor: default;
  border: 1px solid var(--bs-gray-400);
  border-top: 0;
  box-shadow: -1px 1px 3px rgba(0,0,0,.1);
  opacity: 1;

  /* core styles should not be changed */
  position: absolute;
  display: none;
  z-index: 9999;
  max-height: 5rem;
  overflow: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}
.autocomplete-suggestion
{
  background-color: white;
  position: relative;
  padding: 0 .6em;
  line-height: 23px;
  white-space: nowrap;
  overflow: hidden;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
}
.autocomplete-suggestion.dictionary-tag
{
  background-color: var(--bs-gray-200);
}
.autocomplete-suggestion b  /* Used for the term highlighting */
{
  color: var(--bs-primary);
  font-weight: normal;
}

/* Styling for the maximised pages: hide the header and footer */
body.pagemaximised header, body.pagemaximised footer
{
  display: none;
}
/* For collections that set a smaller max-width value (e.g. Vidette) */
body.pagemaximised #content
{
  max-width: 100%;
}

/* Remove all the default styling that applies to <button>s */
button.svgbutton
{
  background: none;
  border: none;
  margin: 0;
  padding: 0;
}

dialog#alertpopup
{
  z-index: 1060;  /* Must be higher than Bootstrap's .modal z-index of 1055, otherwise error boxes can be hidden */
}

div#logoutoptionspopupbuttoncontainer
{
  display: flex;
  justify-content: center;
  gap: 10px;
}

div#logoutoptionspopupbuttoncontainer input
{
  max-width: 100px;
  margin: 0px;
}

/* Display expanded content in a bordered area joined to the button */
div#aisummarycollapse
{
  padding: 0.5rem;
  margin-bottom: 0.25rem;
  border: 1px solid var(--bs-primary);
  border-top: 0;
  border-radius: 0 0 0.25rem 0.25rem;  /* Curved at bottom */
}

div.authenticateuseroption
{
  background-color: var(--bs-gray-100);
  border: 1px solid var(--bs-gray-200);
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
  margin-top: 0.75rem;
  padding: 1rem;
}

/* Overlaps the div above it, for cosmetic reasons only */
div#bannerlogo
{
  flex-basis: 400px;  /* Limit to 400px on big screens (need to use this instead of max-width for Safari) */
  padding-bottom: 5px;
  padding-top: 5px;
}
div#bannerlogo.offsetbannerlogo
{
  margin-bottom: -22px;
  padding-top: 0;
  position: relative;
  top: -22px;
}
/* On small screens remove the relative positioning, so it no longer overlaps the div above it */
@media (max-width: 700px)
{
  div#bannerlogo,
  div#bannerlogo.offsetbannerlogo
  {
    margin-bottom: auto;
    position: static;
  }
}
/* For the print version remove the relative positioning, so it no longer overlaps the div above it */
@media print
{
  div#bannerlogo,
  div#bannerlogo.offsetbannerlogo
  {
    margin-bottom: auto;
    position: static;
  }
}

div#bannerlogo img
{
  width: 100%;  /* Scale the image up/down to fill the div#bannerlogo element */
}

div.blocktextcorrectionheader
{
  font-weight: bold;
  margin-top: 15px;
}

div.blocktextcorrectionline
{
  width: 100%;  /* Expand divtable */
}

div.blocktextcorrectionline > div > div
{
  padding-inline-start: 20px;
  width: 50%;  /* 1/2 */
}

div.blocktextcorrectionstatuschange
{
  font-style: italic;
  padding-inline-start: 20px;
}

div.commentssearchsnippet, div.tagssearchsnippet, div.txtsearchsnippet
{
  font-size: 0.9rem;
  margin-top: 10px;
}

div.commentssearchsnippet span.commenttext
{
  margin-inline-end: 15px;
}

div.completelycorrectstats > div > div
{
  padding: 3px;
}
div.completelycorrectstats > div > div.completelycorrectstatsentryvalue
{
  padding-inline-start: 15px;
  text-align: end;
}
div.completelycorrectstats > div > div.completelycorrectstatsentrypercentage
{
  padding-inline-start: 15px;
}

div.datebrowserrichardmonthdaynumdocs
{
  font-size: 0.8rem;
}

div#datebrowserrichardmonthlevelcalendar
{
  border-spacing: 2px;
  width: 100%;
}

/* All cells */
div#datebrowserrichardmonthlevelcalendar > div > div
{
  background-color: var(--bs-gray-100);
  border: 1px solid var(--bs-gray-200);
  border-radius: 0.25rem;
  padding: 0.125rem;
  width: 14%;  /* 1/7th */
}

/* Header cells only */
div#datebrowserrichardmonthlevelcalendar > div:first-child > div
{
  background-color: transparent;
  border: none;
  font-size: 1.1rem;
  font-weight: 400;
  padding-bottom: 5px;
}

div#datebrowserrichardmonthlevelcalendar div.datebrowserrichardmonthlevelcalendardaycellcontents
{
  min-height: 5rem;  /* Sensible minimum (this can't be set on div.datebrowserrichardmonthlevelcalendardaycell) */
}

div#datebrowserrichardmonthlevelcalendarheader
{
  background-color: var(--bs-gray-100);
  border: 1px solid var(--bs-primary);
  border-radius: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-inline-start: 0.5rem;
}

div#datebrowserrichardmonthlevelcalendarheader .btn-group
{
  margin-top: 0.5rem;
  margin-inline-end: 0.5rem;
  margin-bottom: 0.5rem;
  margin-inline-start: 0rem;
}

div#datebrowserrichardmonthlevelcalendarheader h2
{
  font-size: 2rem;
  font-weight: 400;
  margin: 0;
}

/* Each child of datebrowserrichardtoplevelcalendar is a year (row) */
div#datebrowserrichardtoplevelcalendar > div
{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.25rem 0 0.25rem;
}

/* The h2 heading in each row of the top level calendar is the "year" cell; normally we display it to the left of its corresponding list of months */
div#datebrowserrichardtoplevelcalendar > div > h2
{
  display: inline-block;
  width: 4rem;  /* If this changes the calc() function in the span selector below needs to change too */
}
/* On tiny screens we instead position it above the months */
@media (max-width: 500px)
{
  div#datebrowserrichardtoplevelcalendar > div > h2
  {
    display: block;
    width: 100%;
  }
}

/* The inner div container in each row of the top level calendar is the cell containing the list of months; normally we display it on the same line as the year it corresponds to */
div#datebrowserrichardtoplevelcalendar > div > div
{
  display: inline-block;
  width: calc(100% - 4rem);  /* Change this if the width of the h2 selector above is changed */
}
/* On tiny screens we instead position it below the year */
@media (max-width: 500px)
{
  div#datebrowserrichardtoplevelcalendar > div > div
  {
    display: block;
    width: 100%;
  }
}

/* Use Flex to lay out the months in the top-level calendar */
div#datebrowserrichardtoplevelcalendar ul
{
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0px;
  padding: 0px;
}
/* On smallish screens the months are wrapped onto multiple lines */
@media (max-width: 800px)
{
  div#datebrowserrichardtoplevelcalendar ul
  {
    border-bottom: 1px solid var(--bs-gray-200);
    flex-wrap: wrap;
  }
}

/* Style the "month" cells in the top-level calendar */
div#datebrowserrichardtoplevelcalendar ul > li
{
  margin-bottom: 0.25rem;
  text-align: center;
  width: calc((100% - (11 * 0.25rem)) / 12);  /* Leave spacing of 0.25rem for each of the 11 spaces between each row of 12 months */
}
/* On smallish screens leave spacing of 0.25rem for each of the 5 spaces between each row of 6 months */
@media (max-width: 800px)
{
  div#datebrowserrichardtoplevelcalendar ul > li
  {
    width: calc((100% - (5 * 0.25rem)) / 6);
  }
}
/* On tiny screens leave spacing of 0.25rem for each of the 3 spaces between each row of 4 months */
@media (max-width: 500px)
{
  div#datebrowserrichardtoplevelcalendar ul > li
  {
    width: calc((100% - (3 * 0.25rem)) / 4);
  }
}

/* Similar to the Bootstrap nav-link with pills styling */
div#datebrowserrichardtoplevelcalendar ul > li > a, div#datebrowserrichardtoplevelcalendar ul > li > span
{
  display: block;
  padding: 8px;
}

/* For styling clickable months in the top-level calendar */
div#datebrowserrichardtoplevelcalendar ul > li > a
{
  border: 1px solid var(--bs-gray-400);
  border-radius: var(--bs-border-radius);
}

/* For styling unclickable months in the top-level calendar */
div#datebrowserrichardtoplevelcalendar ul > li > span
{
  color: var(--bs-gray-600);
}

/* On tiny screens reduce the left/right padding on all the top-level components, to save screen space */
@media (max-width: 500px)
{
  div.datebrowserwhitneycalendar > *
  {
    padding-inline-start: 0.5rem;
    padding-inline-end: 0.5rem;
  }
}

div.datebrowserwhitneydocumentselectorcontainer
{
  margin-top: 0.5rem;
}

div.datebrowserwhitneydocumentselectorheader
{
  margin-bottom: 0.75rem;
}

/* For styling the "no specific month or day"/"no specific day of month" descriptions */
div.datebrowserwhitneydocumentselectorheader div.text-muted
{
  font-size: 0.8rem;
}

/* For styling the "no specific month or day"/"no specific day of month" additions to the title */
div.datebrowserwhitneydocumentselectorheader h2 > span
{
  font-size: 1.125rem;
}

div#documentclasheslistcontainer > h2
{
  margin-top: 1rem;
}
div#documentclasheslistcontainer > ol > li
{
  margin-bottom: 0.5rem;
}

div#documentdisplay
{
  border-top: solid 1px var(--bs-gray-200);
  border-inline-start: solid 1px var(--bs-gray-200);
  border-inline-end: solid 1px var(--bs-gray-200);
  width: 100%;  /* Expand divtable */
}

/* If the canvas div is focused on, show the focus on its parent div. */
/* The 'has()' selector has only about 94.3% on caniuse.com (14-04-2026), but since this is a very specific case, we believe it's ok.*/
.openseadragon-container:has(.openseadragon-canvas:focus-visible)
{
  outline: var(--bs-focus-ring-width) solid var(--bs-focus-ring-color); 
}

div#documentdisplaybasic
{
  margin-top: 10px;
}

div#documentdisplaycontentheader
{
  margin-top: 10px;
}

div#documentdisplayheaderlinks
{
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  white-space: nowrap; /* Mainly to prevent lock icons from going onto the next line */
  gap: 10px;
}

/* Lay out the title and right side content using Flexbox */
div#documentdisplayheader
{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

div#documentdisplayheaderlinks a
{
  display: flex;
  align-items: center;
}

div#documentdisplayheaderlinks a > svg
{
  margin-inline-end: 4px; /* Add margin between the icon and the text */
}

.highlightonicon
{
  background-color: #FFFF77;  /* Light yellow */
   border-radius: 4px;
}

div#documentdisplayheader h1
{
  font-weight: 400;
  margin-bottom: 0;
}
/* On tiny screens reduce the h1 size */
@media (max-width: 500px)
{
  div#documentdisplayheader h1
  {
    font-size: 1.25rem;
  }
}

div#documentdisplayleftpane
{
  display: none;  /* Initial state, made visible if the window is wide enough */
  width: 0px;  /* Initial state, resized to the correct width by code in veridian-documentdisplay.js */
}

div#documentdisplayleftpanecontent
{
  height: 0px;  /* Initial state, resized to the correct height by code in veridian-documentdisplay.js */
  overflow: auto;  /* The left pane areas are simply stacked, so we need a scroll bar in most cases */
  padding: 0px 5px;
}

div#documentdisplayleftpaneheader
{
  background-color: rgba(var(--bs-body-color-rgb), .03);  /* To match Bootstrap's .card-header, to get consistent tab display */
  padding-top: 4px;
  padding-inline-start: 1px;
  padding-inline-end: 1px;
  margin-bottom: 5px;
}

/* Reduce vertical padding on left pane tabs, to save some space */
div#documentdisplayleftpaneheader .nav-link
{
  padding-top: .25rem;
  padding-bottom: .25rem;
}

div#documentdisplayleftpanesectionleveltabcontentinactive
{
  font-style: italic;
}

div.persistentlinkurl
{
  color: var(--bs-gray-600);
  font-size: 0.8rem;
  word-break: break-all;
}

div#documentdisplayleftpanesectiontextcontainer
{
  word-break: break-word;  /* Unofficial value only supported by Chrome/Safari */
}

div.documentdisplayleftpanesectiontextheader
{
  padding-bottom: 10px;
}

div.documentdisplayleftpanetabareacontentpadding
{
  padding: 10px 0px;
}

div.documentdisplayleftpanetabareaheader
{
  background-color: var(--bs-gray-100);
  border: 1px solid var(--bs-gray-200);
  border-radius: 0.25rem;
}

div.documentdisplayleftpanetabareaheader h2, div.documentdisplayleftpanetabareaheader h3
{
  font-weight: 400;
  margin: 0;
  padding: 0.5rem;
}

div.documentdisplayleftpanethumbnailcontainer
{
  text-align: center;
}

div.documentdisplayleftpanethumbnailcontainer > *
{
  margin: auto;
}

div.documentdisplaynextprevlinkscontainer
{
  margin: 10px 0px;
}

div#documentdisplaypaneseparatorcontainer
{
  background-color: var(--bs-gray-100);
  border-inline-start: solid 1px var(--bs-gray-200);
  border-inline-end: solid 1px var(--bs-gray-200);
  width: 1%;  /* Take up minimum space */
}

div#documentdisplaypaneseparator
{
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

div#documentdisplaypaneseparator.resizable
{
  cursor: w-resize; /* Only show resize cursor when the document display left pane content is displayed */
}

div#documentdisplaypaneseparator > div
{
  visibility: hidden; /* Allows the pane separator to be resized even on top of invisible divs (containing &nbsp;) which otherwise create small areas that block resizing. */
}

div#documentdisplaypaneseparator .touchclickable
{
  /* This negative margin has the effect of reducing the width of the separator, without reducing the size or padding of the clickable icon on the separator. So the clickable area effectively overflows the separator div by a few pixels to the left and right, providing a larger click target (especially for touchscreens). */
  margin-inline-start: -8px;
  margin-inline-end: -8px;
}

div#documentstructuredisplay
{
  margin-bottom: 15px;
  width: 100%;  /* Expand divtable */
}

div#documentstructuredisplay > div > div:nth-child(2)
{
  padding-inline-start: 15px;
}

div.formstatus
{
  margin: 0.5rem 0;
}

ul#footercontent
{
  list-style: none;
  margin: 0px;
  border-top: 1px solid var(--bs-gray-200);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;  /* Minimum gap between items */
  justify-content: space-between;
  align-items: center;
  min-height: 51px;
}

div#headerbottomcell
{
  border-bottom: 1px solid var(--bs-gray-200);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

div#headernotice
{
  font-weight: bold;
  text-align: center;
}

/* Normally the header top cell contains the user links and language links at the right */
div#headertopcell
{
  display: flex;
  justify-content: flex-end;
}
/* On small screens the "collapsed" navigation bar is also displayed at the left */
@media (max-width: 700px)
{
  div#headertopcell
  {
    justify-content: space-between !important;
  }
}

div#homepageabout div
{
  margin-bottom: 10px;
}

div#homepagebrowse, div#homepagesearch
{
  padding-bottom: 20px;
  text-align: center;
}

li.homepagebrowseicon
{
  padding: 3px;
}
/* Separate the icon from the text a bit */
li.homepagebrowseicon svg.svgicon
{
  margin-inline-end: 0.25rem;
}

div#homepagecontent
{
  display: flex;
}

div#homepageleftcolumn
{
  flex: 1.5;
  margin-inline-end: 0.5rem;
}

div#homepagemiddlecolumn
{
  flex: 1;
  margin-inline-end: 0.5rem;
}

div#homepagerightcolumn
{
  flex: 1;
}

/* On screens between 500px and 800px display #homepageleftcolumn at the top, with the other two columns side by side below it */
@media (max-width: 800px)
{
  div#homepagecontent
  {
    flex-wrap: wrap;
  }

  div#homepageleftcolumn
  {
    /* Make the "left" column fill the full screen width */
    flex-basis: 100%;
    /* Remove right margin and add some bottom margin to the "left" column, as it now has the "middle" and "right" columns beneath it */
    margin-inline-end: 0rem;
    margin-bottom: 0.5rem;
  }

  div#homepagemiddlecolumn
  {
    /* Give the middle column some right margin */
    margin-inline-end: 0.5rem;
  }
}

/* On tiny screens display the three columns on the home page as a single column */
@media (max-width: 500px)
{
  div#homepagecontent
  {
    display: block;
  }
  div#homepageleftcolumn,
  div#homepagemiddlecolumn,
  div#homepagerightcolumn
  {
    margin-inline-start: 0;
    margin-inline-end: 0;
    margin-top: 0;
    margin-bottom: 0.5rem;
  }
}

div#homepagecontent h2, div#textcorrecthomepagecontent h2
{
  font-size: 1.125rem;  /* Smaller than usual for h2 */
  text-align: center;
  text-transform: uppercase;
}

div#homepagesampler
{
  text-align: center;
}

div#homepagesampler img
{
  max-width: 100%;  /* Scale down the sampler image to fit if necessary, but don't allow it to exceed the image width */
}

div#homepagesamplerplaceholder /* Styling for the placeholder section when samplerdisplaycfg set to randomonthisday and no issue is available */
{
  display: flex;
  height: 250px;
  width: 200px;
  margin-inline-start: auto;
  margin-inline-end: auto;
  padding: 20px;
  border: 1px solid var(--bs-gray-600);
  color: var(--bs-gray-600);
  align-items: center;
  text-align: center;
  white-space: normal; /* So the text wraps (if necessary) to fit the desired width */
}

div#homepagetextcorrectscoreboard table
{
  margin: auto;
}

div#homepagetextcorrectscoreboardmoreinfo
{
  padding-top: 5px;
  text-align: center;
}

div.imagecontainer
{
  box-sizing: border-box;  /* Important so bottom padding added in _sectionlevel:sectionimagecontaineropen_ doesn't increase overall height */
  margin: 5px 0px;  /* No left/right margin because this gets in the way if width: 100% is used (e.g. on the search snippet images below) */
  position: relative;  /* So it can contain absolutely-positioned overlays (e.g. query term highlighting) */
}
@media print
{
  /* Override the padding-bottom added in _sectionlevel:sectionimagecontaineropen_, otherwise it creates gaps in the printed output (wasting paper) */
  div.imagecontainer
  {
    padding-bottom: 0px !important;
  }
}

/* See _sectionlevel:sectionimagecontaineropen_ for more information */
div.imagecontainer img
{
  inset-inline-start: 0px;
  position: absolute;  /* Position relative to ancestor element (imagecontainer) */
  top: 0px;
  white-space: nowrap;  /* For the "alt" tag for broken images */
}

/* Allow the search snippet images to shrink to fit the available space */
div.imgsearchsnippet div.imagecontainer,
div.imgsearchsnippet div.imagecontainer img
{
  /* Override the width/height attributes on the two elements themselves (they're kept there to tell the browser the right aspect ratio) */
  height: 100% !important;
  width: 100% !important;
}

/* Undo the previous change when an image search snippet is generated for blocked content (i.e. lock icon) */
div.imgsearchsnippet div.imagecontainer span.blockedcontent
{
  position: absolute;  /* Overlay, to avoid moving any highlight divs */
}
div.imgsearchsnippet div.imagecontainer span.blockedcontent img
{
  height: auto !important;
  width: auto !important;
}

div.inputformwrappingdivtable500
{
  width: 100%;  /* Expand divtable */
}

/* All cells */
div.inputformwrappingdivtable500 > div > div
{
  padding-bottom: 0.5rem;
  vertical-align: middle;
}

div.inputformwrappingdivtable500 > div > div input
{
  max-width: 500px;  /* Limit this to avoid ridiculously long input fields on large screens */
}

/* First column cells only */
div.inputformwrappingdivtable500 > div > div:first-child
{
  width: 12rem;  /* Fixed width, to satisfy Stefan's OCD */
}

/* On tiny screens remove the bottom padding from all cells except the last in the row, to stack them better vertically */
@media (max-width: 500px)
{
  div.inputformwrappingdivtable500 > div > div:not(:last-child)
  {
    padding-bottom: 0px;
  }
}

div#inputupsuhcontainer
{
  margin-bottom: 10px;
}

div#inputupsuhcontainer a.privacylink, div#inputupaefsocontainer a.privacylink
{
  font-size: 0.9rem;
  margin-inline-start: 15px;
}

div#languageswitch
{
  margin-inline-start: 1rem;  /* To separate user links from language links, best this way around for the case where there is no language switch */
}

div#loadingimage
{
  padding: 10px;
}

div#logicalsectionimagedisclaimer
{
  margin: 15px 0px;
}

div.logicalsectiontocnodecontainer, div.pagetocnodecontainer
{
  padding-bottom: 3px;
  padding-inline-start: 27px;  /* Crucial to get the link background image in the right place */
  padding-top: 3px;
}

/* Logical section/page TOC nodes have a 21x18 icon as a background image */
div.logicalsectiontocnodecontainer a.logicalsectiontocnodelink, div.logicalsectiontocnodecontainer span.logicalsectiongroupingnode, div.logicalsectiontocnodecontainer span.sectionlinkwithinviewerdisabled, div.pagetocnodecontainer a.pagetocnodelink, div.pagetocnodecontainer span.sectionlinkwithinviewerdisabled
{
  background-image: url(../images/icontext.gif);
  background-position: center left; /* Revisit this in a year or two to replace left/right with logical css alternatives for easier RTL maintenance. Currently there is no widely used alternative replacing left/right here. x-start/x-end/y-start/y-end is currently experimental - 2026-03-25 */
  background-repeat: no-repeat;
  margin-inline-start: -27px;  /* Crucial to get the background image in the right place */
  padding-inline-start: 27px;
}

/* Grouping nodes have a different icon */
div.logicalsectiontocnodecontainer span.logicalsectiongroupingnode
{
  background-image: url(../images/iconopenfldr.gif);
}

/* Disabled links have a different icon */
div.logicalsectiontocnodecontainer span.sectionlinkwithinviewerdisabled, div.pagetocnodecontainer span.sectionlinkwithinviewerdisabled
{
  background-image: url(../images/icontext_disabled.gif);
}

/* Round jsSocial icons, and reduce icon size slightly */
.jssocials-share-link
{
  border-radius: 50%;
  font-size: 0.75rem;
}

/* Space "Share page" away from the icons */
li#footersocialbookmarks
{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

div#socialbookmarkssharepage {
  margin: 0 10px;
}

/* jsSocial Customisation to get 100% Google Accessiblity Audit */
div.jssocials-shares a.jssocials-share-link:hover
{
  background: #3490F3 !important;
}

div.jssocials-share-twitter .jssocials-share-link
{
  background-color: black;
}

div.jssocials-share-email .jssocials-share-link
{
  background-color: var(--bs-gray-700);
}

div.mediaviewer
{
  overflow: auto;  /* To create a scrollbar if the media viewer exceeds the right pane height */
  text-align: center;
}

div.mediaviewer > div#playercontainer
{
  position: relative;  /* So the player can be vertically centered */
}

div.mediaviewer > div#playercontainer > video
{
  width: 100%;  /* So video won't be clipped if it's bigger than the screen size */
  height: 100%;
}

div.metadatadisplay
{
  padding: 5px 0px;
  width: 100%;  /* Expand divtable */
}

div.metadatadisplay div.content
{
  padding: 0px 3px;
}

div.metadatadisplay div.label
{
  font-weight: bold;
  padding: 0px 3px;
  text-align: end;
  white-space: nowrap; width: 1%;  /* Take up minimum space without wrapping */
}

div#metadataeditstatspagecontent h2
{
  margin-top: 1rem;
}

div#navbarcollapsed
{
  display: block;
  flex: 2;
}

div#userlinksdropdown ul, div#browsemenudropdown ul, nav#navbarcollapseddropdown ul, div#homepagebrowse ul
{
  list-style: none;
  padding: 0px;
  margin: 0px;
}

/* All the following "nextprev*links" styles are used on the document display pages when documentlevelimagesview=none */
div#nextprevdocumentlinks
{
  width: 100%;  /* Expand divtable */
}

div#nextprevdocumentlinks div.nextdocumentlinkcell
{
  text-align: end;
  width: 33%;  /* 1/3rd */
}

div#nextprevdocumentlinks div.prevdocumentlinkcell
{
  width: 33%;  /* 1/3rd */
}

div#nextprevdocumentlinks div.publicationlinkcell
{
  text-align: center;
  width: 33%;  /* 1/3rd */
}

div#nextprevlogicalsectionlinks
{
  width: 100%;  /* Expand divtable */
}

div#nextprevlogicalsectionlinks div.prevdocumentlinkcell, div#nextprevlogicalsectionlinks div.prevsectionlinkcell
{
  width: 25%;  /* 1/4th */
}

div#nextprevlogicalsectionlinks div.nextdocumentlinkcell, div#nextprevlogicalsectionlinks div.nextsectionlinkcell
{
  text-align: end;
  width: 25%;  /* 1/4th */
}

div#nextprevpagelinks
{
  width: 100%;  /* Expand divtable */
}

div#nextprevpagelinks div.prevdocumentlinkcell, div#nextprevpagelinks div.prevsectionlinkcell
{
  width: 25%;  /* 1/4th */
}

div#nextprevpagelinks div.nextdocumentlinkcell, div#nextprevpagelinks div.nextsectionlinkcell
{
  text-align: end;
  width: 25%;  /* 1/4th */
}

div#nextprevsearchresultlinks
{
  width: 100%;  /* Expand divtable */
}

div#nextprevsearchresultlinks div.backtosearchresultslinkcell
{
  text-align: center;
  width: 33%;  /* 1/3rd */
}

div#nextprevsearchresultlinks div.nextsearchresultlinkcell
{
  text-align: end;
  width: 33%;  /* 1/3rd */
}

div#nextprevsearchresultlinks div.prevsearchresultlinkcell
{
  width: 33%;  /* 1/3rd */
}

div#ocrdisclaimer
{
  background-color: var(--bs-gray-200);
  border-radius: 0.25rem;
  padding: 0.25rem 0;
  margin: 0.75rem 0;
}

div#ocrdisclaimer p
{
  margin: 0.75rem;
}

div.oseadviewer
{
  background-color: black;
}

div.pageblock
{
  cursor: pointer;
  z-index: 40;  /* Must be more than querytermarea's z-index */
}

/* Used in OSD Javascript */
div.blockbutton
{
  z-index: 50;
  width: 128px;
  height: 128px;
  background-color: black;
  opacity: 0.25;
  cursor: pointer;
  border-radius: 50%;
}
div.blockbutton:hover
{
  opacity: 1;
}

div.blockbutton svg
{
  fill: white;
  width: 100%;
  height: auto;
  position: absolute;
  top: 0;
  inset-inline-start: 0;
}

/* Grey out the label for disabled "form-check" elements */
div.form-check.disabled label.form-check-label
{
  color: var(--bs-gray-600);
}

/* .pagecontentmargin is used to apply margins to the div#pagecontent on most pages. We don't apply the margin to #pagecontent directly though,
    as on some pages we do NOT want padding or margins on #pagecontent. For example, applying padding and/or margin to #pagecontent on document
    display pages will affect the positioning of the footer on those pages. */
div.pagecontentmargin
{
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}

div#viewercontextmenupopup
{
  background-color: var(--bs-gray-dark);
  border: 2px solid var(--bs-gray-600);
  padding: 4px;
  position: fixed;  /* Position relative to browser window */
  z-index: 100;  /* Must be more than everything else */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none; /* Disable IOS Safari disable long-press text selection */
}

/* Each viewer context menu link is expected to have a 18x18 icon as a background image */
div#viewercontextmenupopup a, div#viewercontextmenupopup a:link, div#viewercontextmenupopup a:visited
{
  background-position: center left; /* Revisit this in a year or two to replace left/right with logical css alternatives for easier RTL maintenance. Currently there is no widely used alternative replacing left/right here. x-start/x-end/y-start/y-end is currently experimental - 2026-03-25 */
  background-repeat: no-repeat;
  color: var(--bs-gray-400);
  display: inline-block;
  margin: 1px 0px;
  min-height: 18px;  /* Link height must be >= icon height */
  padding-inline-start: 23px;
}

div#viewercontextmenupopup a:hover
{
  color: white;
}

div#viewercontextmenupopup div
{
  white-space: nowrap;  /* It's important everything is on one line, for the link icon display in particular */
}

div#viewercontextmenupopup div.adduserlistitemslinkcontainer a
{
  background-image: url(../images/iconadd_invert.gif);
}

div#viewercontextmenupopup div.copyurlcontainer a
{
  background-image: url(../images/iconcopy_invert.gif);
}

div#viewercontextmenupopup div.logicalsectionimageslinkcontainer a
{
  background-image: url(../images/iconclip_invert.gif);
}

div#viewercontextmenupopup div.pdflinkcontainer a
{
  background-image: url(../images/iconpdf.gif);
}

div#viewercontextmenupopup div.sectiontextlinkcontainer a, div#viewercontextmenupopup div.textcorrectlinkcontainer a
{
  background-image: url(../images/icontext_invert.gif);
}

div#viewercontextmenupopup div.viewercontextmenupopupsectionheader
{
  color: white;
  padding-bottom: 4px;
  white-space: normal;  /* We want the header divs to wrap normally, otherwise long titles mess things up */
}

/* This is a bit tricky. We want:
   1. The individual links to display on one line (important for the link icon display)
   1a. The popup to expand horizontally (past the max-width value if necessary), if the links are long
   2. The headers to wrap if necessary, so the max-width value is honoured if the titles (but not links) are long
   3. The context menu popup to be as small as possible, after accounting for the previous rules
   The only way I've found to do all this is to use "display: table" and max-width here (and white-space above)
*/
div#viewercontextmenupopupcontent
{
  display: table;  /* Expand to fit the links if they're wide */
  max-width: 200px;  /* The context menu doesn't need to be wide, and this is bigger than the default links */
}

div#viewercontextmenupopupseparator
{
  border: 1px solid var(--bs-gray-600);
  margin: 6px 0px;
}

div.oseadinverthighlight
{
  background-color: var(--bs-gray-600);
  z-index: 25;  /* Must be less than the other viewer overlays we add (e.g. querytermarea, pageblock) */
}

div.oseadhighlight svg
{
  fill: var(--bs-gray-600);
  fill-opacity: .5;
}

div.oseadviewerbuttons
{
  background-color: var(--bs-gray-dark);
  border: 1px solid black;
  border-radius: 0.25rem;
  opacity: 0.8;
  padding: 0.25rem;
  position: absolute;
  inset-inline-end: 0.25rem;
  top: 0.25rem;
  z-index: 90;  /* Must be more than most viewer overlays we add, except for viewercontextmenupopup */
}

/* The buttons for the OpenSeadragon viewer are arranged in two columns */
div.oseadviewerbuttons
{
  display: flex;
  flex-wrap: wrap;
  width: 82px;
}
div.oseadviewerbuttons > div
{
  display: flex;
}

/* Remove all the default styling that applies to <button>s */
div.oseadviewerbuttons button,
div.oseadviewerbuttons a.btn
{
  background: none;
  border: none;
  display: block;
  margin: 0;
  padding: 0;
}

div.oseadviewerbuttons button.hiddeninitially,
div.oseadviewerbuttons a.btn.hiddeninitially
{
  display: none;  /* Need to override the "display: block" from above for "hiddeninitially" buttons */
}

div.oseadviewerbuttons button svg,
div.oseadviewerbuttons a.btn svg
{
  fill: var(--bs-gray-100);
}

/* Only apply the "hover" styling for devices that support it. This is to prevent the rule from applying on touch-screen devices, which sometimes apply and keep the "hover" state after the buttons have been clicked, which made them look disabled (because a grey was used -- I've changed to use white instead). */
@media (hover: hover)
{
  div.oseadviewerbuttons button:enabled:hover svg,
  div.oseadviewerbuttons a.btn:hover svg
  {
    fill: white;
  }
}

div.oseadviewerbuttons button:enabled svg.highlightedbutton,
div.oseadviewerbuttons button:enabled:hover svg.highlightedbutton
{
  fill: var(--bs-secondary);
}

/* OSEAD clipping cursor style */
div.selection-box .cancel-button,
div.selection-box .confirm-button
{
  cursor: pointer !important;
}
div.corner-0-handle,
div.corner-2-handle
{
  cursor: nwse-resize !important;
}
div.corner-1-handle,
div.corner-3-handle
{
  cursor: nesw-resize !important;
}
div.border-0,
div.border-0-handle,
div.border-2,
div.border-2-handle
{
  cursor: row-resize !important;
}
div.border-1,
div.border-1-handle,
div.border-3,
div.border-3-handle
{
  cursor: col-resize !important;
}

div.selection-box
{
  z-index: 50;
  cursor: move !important;
}

div.passwordstrength
{
  font-size: 0.8rem;
}

div#publicationbrowserpagecontent > h2
{
  border-bottom: 1px solid var(--bs-gray-200);
  margin-bottom: 0.125rem;
  margin-top: 0.75rem;
}

div.publicationicon
{
  margin: 15px 0px 5px 0px;
}

/* Ensure publication icons don't exceed the width of the screen */
div.publicationicon img
{
  max-width: 100%;
}

div#publicationlevelcontent
{
  clear: both;  /* Clear the float applied in div#publicationlevelcontrols */
}

/* Floated to the right normally */
div#publicationlevelcontrols
{
  float: right; /* Revisit this in a year or two to replace float right/left values with inline-start/inline-end for easier RTL maintenance. Not making this change now as the caniuse global usage percentages are only ~90% - 2026-03-23 */
  margin-bottom: 1rem;
  margin-inline-start: 1rem;
}
/* ...but positioned to the left on tiny screens */
@media (max-width: 500px)
{
  div#publicationlevelcontrols
  {
    float: none;
    margin-bottom: 0;
    margin-inline-start: 0;
  }
}
div#publicationlevelcontrols .badge
{
  margin-bottom: 0;  /* Don't want normal badge bottom margin in this case */
}
/* Changed the styling here to match the textcorrectionoseadinterfaceblockbuttons by setting the enabled/disabled borders, and setting the disabled colour to --bs-btn-disabled-color. */
/* This is required because otherwise the disabled button colour is set as --bs-primary which doesn't meet the required contrast with the lower opacity applied. */
div#publicationlevelcontrols .btn
{
  border-color: var(--bs-primary);
}
div#publicationlevelcontrols .btn.disabled
{
  border-color: var(--bs-gray-500);
}
div#publicationlevelcontrols .btn.disabled span.text-bg-primary
{
  background-color: var(--bs-btn-disabled-color) !important;
}
div#publicationlevelcontrols .btn.disabled svg
{
  fill: var(--bs-btn-disabled-color);
}

div#publicationmetadataeditorformfields > div
{
  padding: 0.5rem;
}
div#publicationmetadataeditorformfields label
{
  font-weight: bold;
}

div#publicationselectorcontrols
{
  /* Flex row, justified */
  align-items: center;
  display: flex;
  justify-content: space-between;
}

div.qapageblock
{
  border: 1px solid rgba(0,0,0,0.5);
  border-bottom: 3px solid rgba(0,0,0,0.5);
  border-radius: 3px;
  opacity: 0.5;
}

div.querytermarea
{
  z-index: 30;  /* Must be less than pageblock's z-index */
}
@media print
{
  /* Background colours seem to be removed when printing, so the query term highlighting isn't effective. Something better should probably be done here, but for now just disabling this altogether. */
  div.querytermarea
  {
    display: none;
  }
}

div.runtimeloggraph
{
  margin-bottom: 30px;
  margin-top: 30px;
}

div.runtimeloggraph img
{
  width: 100%;  /* Fill the space, up to the maximum width set on the element */
}

div#searchhistorylist
{
  width: 100%;  /* Expand divtable */
}

div#searchhistorylist > div > div
{
  padding: 4px;
}

div#searchhistorylist > div > div.linkcell span
{
  text-transform: lowercase;
}

div#searchhistorylist > div > div.numresultscell
{
  text-align: end;
  white-space: nowrap; width: 1%;  /* Take up minimum space without wrapping */
}

/* Display expanded content in a bordered area joined to the button */
div#advancedsearchcollapse
{
  padding: 0.25rem 0.25rem 0 0.25rem;
  margin-bottom: 0.25rem;
  border: 1px solid var(--bs-primary);
  border-top: 0;
  border-radius: 0 0 0.25rem 0.25rem;  /* Curved at bottom */
}

div#searchpageadvancedsearchcontent
{
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}
/* ...but stacked on smallish screens */
@media (max-width: 800px)
{
  div#searchpageadvancedsearchcontent
  {
    display: block;
  }
}

/* Display advanced search content in two columns normally */
div#searchpageadvancedsearchcontent > div
{
  width: 48%;
}
/* ...but stacked on smallish screens */
@media (max-width: 800px)
{
  div#searchpageadvancedsearchcontent > div
  {
    width: 100%;
  }
}

div#searchpageadvancedsearchcontent fieldset
{
  background-color: var(--bs-gray-100);
  border: 1px solid var(--bs-gray-200);
  margin-bottom: 0.5rem;
  padding: 0.5rem;
}

/* Use the same font size as set for the parent div (div#searchpageadvancedsearchcontent) */
div#searchpageadvancedsearchcontent .form-control
{
  font-size: inherit;
}

div#searchpagesearchextracontainer
{
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
}

div#searchpagecontent.advancedselected div#searchpagesearchextracontainer,
div#searchpagecontent.facetselected div#searchpagesearchextracontainer
{
  border-bottom: 1px solid var(--bs-primary);
  margin-bottom: 0;
}

div.searchextrawrap.selected
{
  margin-bottom: -1px;
}

/* To have a little gap between the "Advanced search", "Refine search" and "Search history" buttons on tiny screens */
#advancedsearchbuttonwrap, #refinesearchbuttonwrap 
{ 
  margin-inline-end: 2px; 
}

/* Have a bit of space below the "Advanced search", "Refine search" and "Search history" buttons, except if any of them are open */
div.searchextrawrapbottom
{
  height: 5px;
}
div.searchextrawrap.selected div.searchextrawrapbottom
{
  height: 0;
}

/* Primary coloured border on the "Advanced search" / "Refine search" / "Search history" buttons */
div.searchextrawrap button, div.searchextrawrap button:hover
{
  border-color: var(--bs-primary);
}

div.searchextrawrap.selected button
{
  border-bottom: 0;
  border-radius: var(--bs-btn-border-radius) var(--bs-btn-border-radius) 0 0;  /* Curved at top */
  height: 100%;
  padding-bottom: 12px;
  background-color: var(--bs-body-bg);
}

/* On small screens decrease paddings of buttons */
@media (max-width: 500px)
{
  div.searchextrawrap > button
  {
    padding: 4px 6px;
    font-size: 0.9rem;
  }
}

div#searchpagecontent.facetselected div#searchpagesearchfilterscontainer a.badge
{
  margin-top: .25rem;
  margin-inline-start: .25rem;
  margin-inline-end: .25rem;
}

/* The width of this element is not set anywhere -- it's automatic based on the longest facet value displayed */
#searchpagesearchresultfacets
{
  flex-shrink: 0; /* Required on Chrome, Safari, and Edge to prevent the facet cell from being squeezed into the smallest possible space */
  padding: 0.25rem 0.25rem 0 0.25rem;
  margin-bottom: 0.25rem;
  border: 1px solid var(--bs-primary);
  border-top: 0;
  border-radius: 0 0 0.25rem 0.25rem;  /* Curved at bottom */
}
/* On large screens remove the padding and border */
@media (min-width: 701px)
{
  #searchpagesearchresultfacets
  {
    border: 0;
    padding: 0;
  }
}

#searchpagesearchresultfacets .card
{
  margin-bottom: 0.25rem;
}

#searchpagesearchresultfacets .card-body
{
  padding: 0.5rem;
  font-size: 0.8rem;
}

#searchpagesearchresultfacets .card-header
{
  padding: 0.5rem;
}

#searchpagesearchresultfacets h3
{
  margin: 0;
  font-size: 1rem;  /* Smaller than usual for h3 */
}

#searchpagesearchresultfacets span.searchresultfacetentrycount
{
  margin-inline-start: 5px;  /* Done like this to prevent the count from being separated onto a new line */
}

/* Remove list styling from the facet entries on the search page */
#searchpagesearchresultfacets ul
{
  margin-bottom: 0;
  padding: 0;
}

li.searchresultfacetentry
{
  list-style-type: none;
}

div#searchresultsaisummarycontrols
{
  margin-top: 0.25rem;
}
div#searchpagecontent.aisummaryselected div#searchresultsaisummarycontrols
{
  border-bottom: 1px solid var(--bs-primary);
  margin-bottom: 0;
}

div.searchresultsaskaiuserpromptcontainer
{
  padding: 0.25rem;
  text-align: right;
}

#searchresultyeargraph
{
  width: 100%;
  height: 150px;
  margin-bottom: 0.5rem;
  background-color: var(--bs-gray-200);
}

#searchresultyeargraphtitle
{
  display: flex;
  justify-content: space-between;
  direction: ltr;
  background-color: var(--bs-primary);
}

#searchresultearliestyear,
#searchresultlatestyear
{
  color: white;
  padding: 0 5px;
}

#searchresultlatestyear
{
  float: right; /* Revisit this in a year or two to replace float right/left values with inline-start/inline-end for easier RTL maintenance. Not making this change now as the caniuse global usage percentages are only ~90% - 2026-03-23 */
}

div.searchresultslimitexceeded
{
  font-size: 0.9rem;
  line-height: 1.25;
  margin: 0.5rem 0;
  padding: 0.5rem;
}

span.remove > svg
{
  height: 18px;
  margin-inline-start: 4px;
  margin-top: -1px;
  vertical-align: middle;
  width: 18px;
}

/* Normally the search results display includes facets at the left and search results at the right */
#searchpagesearchresults
{
  flex-basis: 100%;
  padding-inline-start: 5px;
}
/* On small screens the facets and search results are stacked, so remove the padding normally between them */
@media (max-width: 700px)
{
  #searchpagesearchresults
  {
    padding-inline-start: 0px;
  }
}

/* Uses flexbox so the sort control can wrap if necessary */
#searchpagesearchresults div#searchresultsheader
{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

#searchpagesearchresults #searchresultssummary
{
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
  margin-top: 0;
  margin-bottom: 0;
}

/* Contains the search facets and search results -- laid out side by side normally */
div#searchpagesearchresultscontainer
{
  display: flex;
}
/* ...and stacked vertically on small screens */
@media (max-width: 700px)
{
  div#searchpagesearchresultscontainer
  {
    display: block;
  }
}

div.searchresulticoncell
{
  padding: 3px;
  padding-top: 6px;
  white-space: nowrap; width: 1%;  /* Take up minimum space without wrapping */
}

div.searchresultnumbercell, div.mostcompletesectionnumbercell
{
  padding: 3px;
  white-space: nowrap; width: 1%;  /* Take up minimum space without wrapping */
}

div#sectionleveltabheaderarea
{
  padding-bottom: 10px;  /* Like documentdisplayleftpanetabareacontentpadding but only at the bottom */
}

div.skiplink
{
  position: absolute;
  inset-inline-start: 1rem;
  top: 0;
  z-index: 100;
}
div.skiplink a:focus
{
  background-color: var(--bs-secondary);  /* To stand out from the logo */
  border-radius: 0 0 0.5rem 0.5rem;  /* Curved at bottom */
  margin: 0.5rem;
  padding: 0.5rem;
}

/* For the Text correction home page */
div#textcorrectrecommendationsspformcontainer
{
  margin-bottom: 1em;
}

div#textcorrectbasicinterface
{
  width: 100%;  /* Expand divtable */
}

div#textcorrectbasicinterface div.blockimagecell
{
  border-bottom: solid 1px grey;
  padding: 15px 0px;
  width: 1%;  /* Take up minimum space */
}

div#textcorrectbasicinterface div.blockformcell
{
  border-bottom: solid 1px grey;
  padding-top: 15px;
  padding-bottom: 15px;
  padding-inline-start: 30px;
  padding-inline-end: 0px;
}

div.textcorrectcontributors
{
  font-style: italic;
  padding-top: 5px;
}

div#textcorrecthomepagecontent
{
  display: flex;
}

div#textcorrecthomepageleftcolumn
{
  margin-inline-end: 0.25rem;
  flex: 1;
}

div#textcorrecthomepagerightcolumn
{
  margin-inline-start: 0.25rem;
  flex: 1;
}

div#textcorrecthomepagerightcolumn h3
{
  margin-top: 1rem;
}

div#textcorrectionrecommendationscontent div.card-body
{
  /* Less padding than normal */
  padding-inline-start: 0.5rem;
  padding-inline-end: 0.5rem;
}

/* On smallish screens display the two columns on the text correction home page as a single column */
@media (max-width: 800px)
{
  div#textcorrecthomepagecontent
  {
    display: block;
  }
  div#textcorrecthomepageleftcolumn,
  div#textcorrecthomepagerightcolumn
  {
    margin: 0 0 0.5rem 0;
  }
}

div#textcorrectoseadinterfacecontent div#documentdisplayleftpanecontent, div#textcorrectoseadinterfacecontent div#documentdisplayleftpaneheader
{
  padding-inline-start: 2px;  /* Different padding for the text correction version of the document display page */
}

/* Changed text correct enabled button borders to be --bs-primary when enabled, and bs-gray-600 when disabled so there's an obvious difference. */
/* We use :not(:disabled) here instead of :enabled because the exit button is actually an <a> */
div#textcorrectoseadinterfaceblockbuttons .btn:not(:disabled),
div#textcorrectoseadinterfaceblockfooterbuttons .btn:enabled
{
  border-color: var(--bs-primary);
}
div#textcorrectoseadinterfaceblockbuttons .btn:disabled,
div#textcorrectoseadinterfaceblockfooterbuttons .btn:disabled
{
  border-color: var(--bs-gray-500);
}

div#textcorrectoseadinterfaceformcontainer i
{
  padding: 5px;
}

div#textcorrectoseadinterfacehelpandstatus
{
  display: flex;
  flex-direction: row;
  font-size: 0.9rem;
  justify-content: space-between;
  margin: 0 4px;
  padding-bottom: 0.125rem;
}

/* Make the border of the selected line (when correcting text) in the image blue -- matches form#textcorrectoseadinterfaceform div.inputntvcontainer .form-control[name="ntv"]:focus */
div#textcorrectselectedlinebox
{
  border-color: blue;  /* This doesn't violate the accessibility "colour for information" principle, because the colour is irrelevant here */
  border-style: solid;
  z-index: 35;  /* Must be more than querytermarea's z-index and less than pageblock's z-index */
}

div#timinginfo
{
  padding: 5px;
}

div#useraccountpagecontent .card
{
  margin-top: 0.25rem;
}

.useradmintableresultssummary
{
  padding-inline-start: 0.3rem;
  padding-inline-end: 0.3rem;
}

/* On tiny screens reduce the default 1.25rem left and right padding */
@media (max-width: 500px)
{
  div#useraccountpagecontent .tab-content
  {
    padding-inline-start: 0.5rem;
    padding-inline-end: 0.5rem;
  }
}

/* On tiny screens display the user account page tabs vertically */
@media (max-width: 500px)
{
  ul#useraccountpagetabgroup
  {
    flex-direction: column !important;
  }

  /* Make the inactive tabs actually look like tabs -- why isn't this done always? */
  ul#useraccountpagetabgroup .nav-link
  {
    border-color: var(--bs-nav-tabs-link-active-border-color);
  }
}

div.useraccountpagetabarea, div#authenticateuserformfields, div#confirminvitenewuserformfields, div#mfaformfields, div#publicationmetadataeditorformfields, div#registernewuserformfields, div#resetuserpasswordformfields
{
  background-color: var(--bs-gray-100);
  border: 1px solid var(--bs-gray-200);
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
}

/* Different display of the "veridian" authentication system login form, if there are multiple login options */
div.authenticateuseroption div#authenticateuserformfields
{
  border: none;
  margin: 0;
  padding: 0;
}

div#useraccountpageuserinfotabcontent div#coreuserinfo a.textcorrecthomelink
{
  font-size: 0.9rem;
  margin-inline-start: 15px;
}

div#useraccountpageuserinfotabcontent h2
{
  font-weight: 400;
  margin-bottom: 0.75rem;
  margin-top: 0.25rem;
}

div#useradmincontent.card div.tab-content
{
  padding-inline-start: 0;
  padding-inline-end: 0;
}

div#useradminformscontainer
{
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;  /* We want the two possible forms to wrap if necessary */
  justify-content: space-between;
}

div#useradminformscontainer .input-group
{
  flex-wrap: nowrap;  /* We don't want the individual forms to wrap internally */
  margin-bottom: 0.75rem;  /* Here for when the two possible forms wrap */
}

div#useradminfilterformcontainer
{
  margin-inline-end: 3rem;  /* For when the two possible forms don't wrap */
}

div#useradminfilterformcontainer #inputfilter, div#useradmininvitenewuserformcontainer #inputemail
{
  min-width: 280px; /* Wide enough for a typical email address, at least */
}

div#useradmininvitenewuserformcontainer #inputusergroup
{
  width: 140px;
}

div#useradmininvitenewuserformcontainer label[for="inputusergroup"]
{
  padding-inline-start: 0.5rem;
}

div#useradmininvitenewuserformcontainer .btn
{
  margin-inline-start: 0.15rem;
}

div#registernewuserformfields .form-check, div#confirminvitenewuserformfields .form-check
{
  margin-bottom: 0.5rem;
}

div#userlists div.userlistcontainer div.accordion-header
{
  display: flex;
}

div#userlists div.userlistlinkscontainer
{
  display: flex;
  align-items: center;
  padding-inline-end: 0.5rem;
  white-space: nowrap;
}

table.userscoreboard td
{
  padding: 3px;
}

td.userscoreboardentrypos
{
  text-align: end;
}

td.userscoreboardentryvalue
{
  text-align: end;
}

td.userscoreboardentryname
{
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-all;
}

div#viewer, span#viewer
{
  position: relative; /* So overlay buttons can use absolute positioning */
  height: 0px;  /* Initial state, resized to the correct height by code in veridian-documentdisplay.js */
  width: 100%;  /* So the span expands, to match the div */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none; /* Disable IOS Safari disable long-press text selection */
}

div.viewerblockedcontent
{
  background-color: var(--bs-gray-400);
  text-align: center;
  vertical-align: middle !important;
}

div#viewercontrols > div
{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 1px 2px;
}

div#viewercontrols > div > div
{
  white-space: nowrap;  /* So the controls in each cell don't get split over multiple lines */
}

div.vlistentryactioncell
{
  padding: 3px;
}
/* Action cell items should be one per line normally (see media query below however), and not wrap internally */
div.vlistentryactioncell > *
{
  display: block;
  white-space: nowrap;
}

div.vlistentrymaincell
{
  flex-basis: 100%;
  padding: 3px;
}

div.vlistentrypercentagecell
{
  min-width: 135px;  /* Enough for 100px of percentage indicator, and the label */
  padding: 3px;
  white-space: nowrap;
}

div.widthrestrictiondefault
{
  margin: auto;
  max-width: 1000px;
}

/* Uses display:table to allow for content that is too wide for the view port. This is currently only used on the "user management" page, as the user tables don't attempt to be responsive. */
div.widthrestrictionnoneallowoverflow
{
  display: table;  /* Expand to fit the content if it's wide */
}

footer#footer
{
  background-color: var(--bs-gray-100);
  font-size: 0.8rem;
}

form#addnewpublicationform #addnewpublicationpopupbutton
{
  margin-top: 0.5rem;
}

form#adddocumentdisplayleftpanedocumentcommentsform input[type="submit"], form#adddocumentdisplayleftpanedocumenttagsform input[type="submit"], 
form#adddocumentdisplayleftpanesectioncommentsform input[type="submit"], form#adddocumentdisplayleftpanesectiontagsform input[type="submit"]
{
  margin-top: 5px;
}

form#adduserlistitemsform #userlistitemformbutton
{
  margin-top: 0.5rem;
}

form#authenticateuserform a#forgotpassword
{
  font-size: 0.9rem;
}

form#contentblockform div#contentblockformcontrols
{
  text-align: center; max-width: 500px;  /* Center controls under the fields but limit by max-width on big screens */
}

form#contentblockform input[type="text"], form#contentblockform textarea
{
  width: 100%; max-width: 500px;  /* Fill the space available, but limit by max-width on big screens */
}

form#publicationmetadataeditorform .alert
{
  margin-top: 1rem;
}

form.textcorrectbasicinterfaceform div.inputblockcccontainer
{
  margin-top: 8px;
  text-align: center;
}

form.textcorrectbasicinterfaceform input[type="submit"]
{
  margin-inline-start: 20px;
}

form.textcorrectbasicinterfaceform input[name="ntv"], form.textcorrectbasicinterfaceform textarea[name="ntv"], form#textcorrectoseadinterfaceform input[name="ntv"], form#textcorrectoseadinterfaceform textarea[name="ntv"]
{
  font-family: Serif; /* Improve the text readability to help text correctors to distinguish between I, l and 1 easier. */
}

form.textcorrectbasicinterfaceform input[name="ntv"], form.textcorrectbasicinterfaceform textarea[name="ntv"]
{
  width: 97%;  /* Fill the space available except for a tiny bit of margin */
}

form#textcorrectoseadinterfaceform div.inputblockcccontainer
{
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

form#textcorrectoseadinterfaceform div.inputntvcontainer
{
  margin-bottom: 1px;
}

/* Make the border of the "ntv" text entry boxes (when correcting text) blue when focused -- matches div#textcorrectselectedlinebox */
form#textcorrectoseadinterfaceform div.inputntvcontainer .form-control[name="ntv"]:focus
{
  border-color: blue;  /* This doesn't violate the accessibility "colour for information" principle, because the colour is irrelevant here */
}

form#textcorrectoseadinterfaceform textarea[name="ntv"]
{
  height: 500px;  /* We can't tell without Javascript how big this should be [Unavoidable fixed height] */
}

/* Modal/popup headers should always be h2 headings, and we want a slightly larger font-size than for other h2 elements */
h2.modal-title
{
  font-size: 1.5rem;
}

/* Remove the native white background colour from <dialog> popups, because this completely hides the main page content from view.
   We instead rely on the bootstrap modal-backdrop div which adds a semi-transparent dark background layer */
dialog.modal
{
  background-color: transparent;
}

main
{
  /* Part of the "sticky footer" CSS, from https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ */
  flex: 1 0 auto;
  width: 100%;
}

/* !! These two styles are required to make the "home" icon line up properly in the breadcrumbs. If the interface is customised to display text instead of an icon in the root of the breadcrumbs this may need to be removed. Anyone who can make the "home" icon line up properly in the breadcrumbs, on all browsers, without this hacky negative margin trick, gets a chocolate fish... */
ol.breadcrumb > .breadcrumb-item:first-child
{
  margin-bottom: -10px;
}
ol.breadcrumb > .breadcrumb-item:first-child svg.svgicon
{
  vertical-align: initial;
}

/* Add a top border to all the vlist entries... */
ol.vlist li
{
  border-top: solid 1px var(--bs-gray-400);
  padding: 12px 0px;
}
/* ...except the first one */
ol.vlist li:first-child
{
  border-top: none;
}

ol.vlist li div.divtable
{
  width: 100%;  /* Expand divtable */
}
ol.vlist li div.vlistentry
{
  display: flex;
  justify-content: space-between;
}
/* On small screens the "vlistentry*cell"s are wrapped */
@media (max-width: 700px)
{
  ol.vlist li div.mostcompletesection, ol.vlist li div.useractivityentry, ol.vlist li div.userlistitem
  {
    display: block;  /* Override the "display: flex" from above, so the children are displayed vertically instead of horizontally */
  }
  /* Display the action cell entries horizontally on small screens */
  div.vlistentryactioncell > *
  {
    display: inline-block;
    margin-inline-end: 1rem;
  }
}
/* Search results are wrapped at a different point (due to the facet display) */
@media (max-width: 1000px)
{
  ol.vlist li div.searchresult
  {
    display: block;
  }
  /* Display the action cell entries horizontally on small screens */
  ol.vlist li div.searchresult div.vlistentryactioncell > *
  {
    display: inline-block;
    margin-inline-end: 1rem;
  }
}

/* This is a span so we can include it in <a> tags without HTML validation errors */
span.blockedcontent
{
  background-color: var(--bs-gray-400);
  display: inline-block;  /* So width and height can be set, and the element can be centered within its parent */
}

span.commenttimeanddate, li.deletedcomment
{
  font-size: 0.9rem;
  font-style: italic;
}

span.commentuser
{
  font-size: 0.9rem;
  font-weight: bold;
  margin-inline-end: 15px;
}

/* This is a span so we can include it in <a> tags without HTML validation errors */
span.nothumbnailavailable
{
  border: solid 1px var(--bs-gray-600);
  color: var(--bs-gray-600);
  display: inline-block;  /* So width and padding can be set, and the element can be centered within its parent */
  padding: 20px 2px;
  text-align: center;
  white-space: normal;  /* So the text wraps (if necessary) to fit the desired width */
  max-width: 100%;
}

span.percentageindicator
{
  background-color: var(--bs-primary);
  display: inline-block;
  height: 1.25rem;
  margin-inline-end: 5px;
  vertical-align: middle;
}

span.qapageblocknum, span.pageblockcompletelycorrectindicator
{
  background-color: black;
  border-radius: 3px;
  color: white;
  font-size: 1.5rem;
  line-height: 120%;
  opacity: 0.5;
}

span.pagelabel
{
  background-color: transparent;
  color: white;
  width: 100%;
  text-align: center;
  padding: 3px;
  z-index: 45;
  display: inline-block;
}
span.pagelabel svg
{
  height: 1.5rem;
  padding: 0;
  margin-top: -1px;
  vertical-align: top;
  fill: white;
}
span.pagelabel.current > div > b
{
  background-color: white;
  color: black;
  padding: 2px;
  border-radius: 2px;
}

/* These aren't true <a> links, for reasons explained in veridian-viewer.dm, but we make them act like it */
span.pagelabelpdffakelink
{
  cursor: pointer;
}

/* Used for the section tag display on the document page; similar styling to a Bootstrap badge but will contain a badge and possibly a delete icon */
span.sectiontagcontainer
{
  background-color: var(--bs-secondary-bg-subtle);
  border: solid 1px var(--bs-secondary-bg-subtle);
  border-radius: var(--bs-border-radius);
  display: inline-block;
  margin-bottom: 0.25rem;  /* In this case we want the margin on the container, not on the badge (see below) */
}
span.sectiontagcontainer .badge
{
  margin-bottom: 0;  /* The margin is instead on the container (see above) */
}

svg.svgicon
{
  vertical-align: middle;
}

/* Apply to icons that need to be clickable, to provide a suitably large click area for fingers on touch screen devices (icon scaled to 28x28 plus 4px padding = 36x36) */
svg.touchclickable
{
  box-sizing: content-box;
  height: 1.75rem;
  padding: 0.25rem;
  width: 1.75rem;
}
/* ...but when it's inside a dropdownbutton element one of the wider "withdropdown" icons will be used (icon scaled to 42x28 plus 4px padding = 50x36) */
div.dropdown button.dropdownbutton svg.touchclickable
{
  width: 2.625rem;
}

/* Sort status of user admin table column title */
table.useradmintable a.useradmintablecolumnheader.ascend::after
{
  content: "\25b2";
}

table.useradmintable a.useradmintablecolumnheader.descend::after
{
  content: "\25bc";
}

table.useradmintable td.communications
{
  text-align: center;
}

table.useradmintable td.date
{
  white-space: nowrap;  /* So the day/month/year don't get split over multiple lines */
}

table.useradmintable td.metadataedits, table.useradmintable td.textcorrections
{
  text-align: end;
}

table.useradmintable th
{
  text-align: start;  /* Override th default of centered */
  padding: 8px;
  vertical-align: top;
}

table.useradmintable th#useradmintablecommunications
{
  text-align: center;
}

textarea#editvalueformnewvalue
{
  margin-bottom: 0.5rem;
}

/* For blocks that aren't marked as completely correct */
.textcorrectblock
{
  border: solid 2px #A00000;  /* Lightish red; deliberately not part of the site branding (see notes Nov 13 2020). This doesn't violate the accessibility "colour for information" principle because these blocks DON'T have the alternative indicator (below). */
}

/* For blocks that are marked as completely correct */
.textcorrectcompletelycorrectblock
{
  border: solid 2px #008000;  /* Mid green; deliberately not part of the site branding (see notes Nov 13 2020). This doesn't violate the accessibility "colour for information" principle because there's an alternative indicator (below). */
}

/* The "completely correct" block indicators exist for all blocks, but they're normally hidden (most blocks aren't completely correct) */
.pageblockcompletelycorrectindicator
{
  display: none;
}
/* They're shown for completely correct blocks however */
.textcorrectcompletelycorrectblock .pageblockcompletelycorrectindicator
{
  display: block;
}
/* ...except when it's a completely correct block that's selected (otherwise it may obscure the text) */
.textcorrectcompletelycorrectblock.pageblockselected .pageblockcompletelycorrectindicator
{
  display: none !important;
}

/* Hide the border when the blocks are selected, otherwise they may obscure the text */
.textcorrectblock.pageblockselected, .textcorrectcompletelycorrectblock.pageblockselected
{
  border: none;
}

/* For when the mouse is hovered over the blocks */
.textcorrectblock.semitransparent, .textcorrectcompletelycorrectblock.semitransparent
{
  background-color: gray;
}

/* For when the mouse is not hovered over the blocks */
.textcorrectblock.transparent, .textcorrectcompletelycorrectblock.transparent
{
  background-color: rgba(0, 0, 0, 0);  /* Restore to transparent */
  opacity: 1;  /* This is necessary so the border is visible */
}

ul.datebrowserricharddocuments li
{
  padding: 0.125rem;
}

/* Make the text that appears in the list of documents as small as practical, to save horizontal space which is often very limited. The "em" rule is for feature code display. */
ul.datebrowserricharddocuments li a, ul.datebrowserricharddocuments li a:link, ul.datebrowserricharddocuments li a:visited, ul.datebrowserricharddocuments li em
{
  font-size: 0.8rem;
}

/* Use Flex to lay out the days in the day selector */
ul.datebrowserwhitneydayselector
{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  list-style: none;
  margin: 0px;
  padding: 0px;
  width: 100%;
}

ul.datebrowserwhitneydayselector li
{
  margin: 0.125rem 0;
  text-align: center;
  width: calc((100% - (6 * 0.25rem)) / 7);  /* Leave spacing of 0.25rem for each of the 6 spaces between each row of 7 days */
}

/* Similar to the Bootstrap nav-link with pills styling */
ul.datebrowserwhitneydayselector li a, ul.datebrowserwhitneydayselector li span
{
  display: block;
  padding: 0.5em 0.25em;  /* Need less horizontal padding for small screens */
}

/* For styling clickable days in the day selector */
ul.datebrowserwhitneydayselector li a
{
  border: 1px solid var(--bs-primary);
  border-radius: var(--bs-border-radius);
}

/* For styling unclickable days in the day selector */
ul.datebrowserwhitneydayselector li > span
{
  color: var(--bs-gray-600);
}

/* For styling the selected day in the day selector */
ul.datebrowserwhitneydayselector li.datebrowserwhitneyselectedday a
{
  background-color: var(--bs-primary);
  color: white;
}

ul.datebrowserwhitneydaysofweek
{
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0 0 0.5rem 0;
  padding: 0px;
}

ul.datebrowserwhitneydaysofweek li
{
  text-align: center;
  width: calc((100% - (6 * 0.25rem)) / 7);  /* Leave spacing of 0.25rem for each of the 6 spaces between each row of 7 days */
}

/* Use Flex to lay out the months in the month selector */
ul.datebrowserwhitneymonthselector
{
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0px;
  padding: 0px;
}
/* On smallish screens the months are wrapped onto multiple lines */
@media (max-width: 800px)
{
  ul.datebrowserwhitneymonthselector
  {
    flex-wrap: wrap;
  }
}

ul.datebrowserwhitneymonthselector li
{
  margin: 0.125rem 0;
  text-align: center;
  width: calc((100% - (11 * 0.25rem)) / 12);  /* Leave spacing of 0.25rem for each of the 11 spaces between each row of 12 months */
}
/* On smallish screens leave spacing of 0.25rem for each of the 5 spaces between each row of 6 months */
@media (max-width: 800px)
{
  ul.datebrowserwhitneymonthselector li
  {
    width: calc((100% - (5 * 0.25rem)) / 6);
  }
}
/* On tiny screens leave spacing of 0.25rem for each of the 3 spaces between each row of 4 months */
@media (max-width: 500px)
{
  ul.datebrowserwhitneymonthselector li
  {
    width: calc((100% - (3 * 0.25rem)) / 4);
  }
}

/* Similar to the Bootstrap nav-link with pills styling */
ul.datebrowserwhitneymonthselector li a, ul.datebrowserwhitneymonthselector li span
{
  display: block;
}
ul.datebrowserwhitneymonthselector li span
{
  padding: 0.5em 0.25em;  /* Need less horizontal padding for small screens */
}

/* Ensure selected text is white */
ul.datebrowserwhitneymonthselector li.datebrowserwhitneyselectedmonth span
{
  color: white;
}

/* For styling clickable months in the month selector */
ul.datebrowserwhitneymonthselector li a
{
  border: 1px solid var(--bs-primary);
  border-radius: var(--bs-border-radius);
}

/* For styling unclickable months in the month selector */
ul.datebrowserwhitneymonthselector li > span
{
  color: var(--bs-gray-700);
}

/* For styling the selected month in the month selector */
ul.datebrowserwhitneymonthselector li.datebrowserwhitneyselectedmonth a
{
  background-color: var(--bs-primary);
  color: white;
}

ul#documentdisplayleftpanetabgroup > li
{
  z-index: 100;
}

ul.helptableofcontents, ul.privacytableofcontents
{
  list-style: none;
  padding: 0px;
}

ul#publicationbrowserhlist, ul#sectionclassifierhlist
{
  margin-bottom: 0.25rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

ul#publicationbrowserhlist li, ul#sectionclassifierhlist li
{
  margin-bottom: 0.125rem;
  min-width: 44px;  /* Recommendation for minimum 44px components for touch devices */
  text-align: center;
}

/* No curved borders, because these aren't done properly if the hlist wraps onto multiple lines */
ul#publicationbrowserhlist .page-link, ul#sectionclassifierhlist .page-link
{
  border-radius: 0;
}

ul.documentclassifiervlist, ul.publicationbrowserlist, ul#publicationdocumentslist, ul.sectionclassifiervlist
{
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0px;
  padding: 0.25rem;
}

ul.documentclassifiervlist li, ul.publicationbrowserlist li, ul.sectionclassifiervlist li
{
  border-bottom: 1px solid var(--bs-gray-100);
  padding: 0.25rem;
  width: 100%;  /* Single column display */
}

ul.documentclassifiernodeexploded, ul.publicationclassifiernodeexploded, ul.sectionclassifiernodeexploded
{
  list-style: none;
}

/* Double column display normally */
ul.publicationbrowserlist.doublecolumn li, ul.sectionclassifiervlist.doublecolumn li
{
  width: 50%;
}
/* ...but single column on tiny screens */
@media (max-width: 500px)
{
  ul.publicationbrowserlist.doublecolumn li, ul.sectionclassifiervlist.doublecolumn li
  {
    width: 100%;
  }
}

ul#publicationdocumentslist li
{
  border-bottom: 1px solid var(--bs-gray-100);
  padding: 0.125rem;
  width: 100%;  /* Single column display */
}

.aroundoverlay
{
  position: absolute;
  background-color: rgba(0,0,0,0.5);
  touch-action: none;
  -ms-touch-action: none;
}

#userclipimageoverlay
{
  cursor: crosshair;
}

#clipbuttondiv
{
  margin: 0;
  padding: 0;
  position: absolute;
  display: block;
  text-align: end;
}

#clipdiv
{
  border: 0;
  margin: 0;
  padding: 0;
  position: absolute;
  display: block;
  touch-action: none;
  -ms-touch-action: none;
}

img.iiificon
{
  height: 24px;
  vertical-align: text-bottom;
  width: 24px;
}

/* ---------- Tutorial Popups Setting ---------- */

/* Tutorial layer style on document display page */
#viewertutorial
{
  display: none;
  position: absolute;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0.5;
  z-index: 100;
}

/* Tutorial popup style */
.popper
{
  display: none;
  background-color: white;
  border-radius: 8px;
  width: 250px;
  z-index: 105;
}
.popper .popper__arrow
{
  border-color: white;
}

/* Transparent cross hair */
#tutorialmiddlecrosshair
{
  position: absolute;
  height: 1px;
  width: 1px;
  top:10%;
  inset-inline-start:50%;
  transform:translate(-50%, -50%);
}
