:root {
  --blue: #003349;
  --med_blue: #004F7E;
  --lt_blue: #0060AB;
  --xlt_blue: #00A3E1;
  --draft_blue: #708292;
  --cool_gray: #989A9A;
  --md_cool_gray: #C4C7CB;
  --lt_cool_gray: #DBDBD3;
  --orange: #E58117;
  --draft_orange: #cfa476;
  --green: #00A88A;
  --text: #313335;

  /* Flash message and warning backgrounds */
  --success: var(--green);
  --danger: #C4161E;
  --info: var(--med_blue);
  --warning: var(--orange);
  --header_height: 68px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

a {
  text-decoration: none;
  transition: color 0.5s, background-color 0.5s;
}

/* Normal links */
a:link, a:visited {
  color: var(--orange);
}
a:hover, a:active {
  color: var(--med_blue);
}

/* Links for unpublished draft objects */

a.draft:link, a.draft:visited {
  color: var(--draft_orange);
}
a.draft:hover, a.draft:active {
  color: var(--draft_blue);
}


img {display: block; width: 100%;}
figure {margin: 0; padding: 0;}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}

.wrapper {
  display: flex;
  height: 100%;
}

html {font-size: 15px;}

body {
  background: white;
  color: var(--text);
  font: 400 15px/1.5 "Mulish", sans-serif;
  height: 100vh;
  overflow: hidden;
}

/* === Header & nav === */

#fixed {
  position: fixed;
  z-index: 10;
  width: 100%;
}

header#site-header {
  background: var(--blue);
  height: var(--header_height);
  margin: 0;
  width: 100%;
}

header#site-header .flex-row-wrapper {
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
}

#header-logo {
  margin: 0;
  padding-left: 20px;
  vertical-align: middle;
}

#header-logo a {
  display: block;
  width: 42px;
}

#header-logo a img {
  display: block;
  position: relative;
  width: 100%;
}

/* Navigation specific */

nav#main {
  margin: 0;
}

nav#main ul {
  height: var(--header_height);
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

nav#main li {
  display: inline-block;
  height: var(--header_height);
  vertical-align: middle;
}

nav#main a {
  color: white;
  border-top: 3px solid var(--blue);
  display: inline-block;
  font-size: 0.775em;
  line-height: calc(var(--header_height) - 6px);
  padding: 0 1em 3px;
  text-transform: uppercase;
  transition: background-color .5s;
}

nav#main li.inactive a {
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}

body.sections nav#main li.sections a,
body.slideshows nav#main li.slideshows a,
body.uploads nav#main li.uploads a {
  border-top: 3px solid var(--orange);
}

/* Header user */

#header-user {
  height: var(--header_height );
  padding: 6px;
}

#user-img-wrapper {
  border: 2px solid var(--cool_gray);
  border-radius: 50%;
  height: calc(var(--header_height) - 12px);
  width: calc(var(--header_height) - 12px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.5s, box-shadow 0.5s;
}

#user-img-wrapper:hover {
  border-color: white;
  border-color: color-mix(in srgb, white, var(--cool_gray));
  cursor: pointer;
}

/* === Footer === */

footer {
  border-top: 1px solid #ccc;
  margin: 1em auto;
  max-width: 950px;
  padding: 1em 0;
  text-align: center;
}

/* Logout form */
footer form {
  display: inline-block;
  margin: 0 auto;
}

/* === UI & content === */

#ui {
  height: 100%;
  overflow-y: auto;
  margin: 0;
  padding: calc(var(--header_height) - 6px) 1em 0;
}

#main-content {
  padding: 2.5em 3em;
  margin: 0 auto;
  max-width: 1040px;
}

/* === Home page === */

body.home h4 {
  color: var(--blue);
  font-family: "Poppins", sans-serif;
  font-size: 1.125em;
  font-weight: 400;
  font-weight: 450;
  line-height: 1;
  margin: 1.25em 0 0.375em;
}

body.home p {
  margin: 0 0 1em;
}

/* === Pagination === */

nav.pagination {
  display: flex;
  justify-content: left;
}

ul.pagination {
  display: flex;
  flex-direction: row;
  font-size: 0.875em;
  padding-left: 0;
  list-style-type: none;
}

.pagination li {
  border: 1px solid #ccc;
  padding: 0;
  margin: 0 0 0 -1px;
}

.pagination li a,
.pagination li span {
  display: block;
  padding: 0.5em 0.85em;
}

.pagination a {
  color: var(--med_blue);
}
.pagination a:hover {
  background-color: #e8e8e8;
}

.pagination-current {
  border-color: var(--blue);
  background-color: var(--blue);
  color: white;
}

.pagination-disabled {
  color: #999;
}

/* === Individual pages === */

#content-header {
  border-bottom: 1px solid #ddd;
  display: flex;
  padding-bottom: 1em;
}

h2.title {
  color: var(--med_blue);
  font-family: "Poppins", sans-serif;
  font-size: 1.75em;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

h2.title.draft {
  color: var(--draft_blue);
}

p.no-content {
  color: #777;
  font-style: italic;
  font-weight: 600;
}

/* === Sections === */

.section-listing {
  list-style: none;
  padding: 0;
}

.section-listing a {
  font-weight: 700;
}

.section-listing.top-level a {
  color: var(--med_blue);
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.2em;
}

.section-listing.top-level a:hover {
  color: var(--blue);
}

#section_wrapper {
  display: grid;
  grid-template-columns: 60% 40%;
}

.section-children {
  border-left: 1px solid #ccc;
  margin: 1em 0 1em 1.5em;
  padding-left: 1.5em;
}

/* Breadcrumbs */

.breadcrumbs {
  border-bottom: 1px solid #ccc;
  font-size: 0.875em;
  padding: 0.35em 0;
  vertical-align: middle;
}

.breadcrumbs span {
  display: inline-block;
}

.breadcrumbs span+span:before {
  content: '\25BA';
  font-size: 0.75em;
  padding: 0 5px;
  color: #777777;
}

.breadcrumbs a {
  font-weight: 700;
}

/* Subsection sorting interface */

#sort-subsections-wrapper {
  display: flex;
}

#sort-subsections-counter, #sort-subsections {
  list-style: none;
  margin: 1em 0;
  padding: 0;
}

#sort-subsections {flex-grow: 2}

#sort-subsections-counter li, #sort-subsections li {
  font-size: 0.933333em;
  line-height: 3;
  margin-bottom: 1px;
  position: relative;
}

#sort-subsections li {
  background: var(--med_blue);
  color: white;
  cursor: grab;
  font-size: 0.933333em;
  font-weight: 600;
  line-height: 3;
  padding: 0 1.25em;
}

#sort-subsections li.sortable-chosen {
  background: var(--lt_blue);
}

#sort-subsections-counter li {
  color: var(--cool_gray);
  font-size: 1em;
  font-weight: 700;
  line-height: 2.8;
  padding: 0 1em 0 0.25em;
}

li span.handle {
  display: inline-block;
  height: 1.2em;
  line-height: 1em;
  margin: -2px 0.45em 0 0;
  vertical-align: middle;
}

li span.handle img {
  opacity: 50%;
  height: 100%;
}

.sortable-ghost {
  opacity: 25%;
}

/* === Tags === */

.tag {
  display: inline-block;
  line-height: 1;
  margin-left: 5px;
}

.tag a {
  background-color: #e3e3e3;
  border-radius: 1px;
  display: inline-block;
  color: #333;
  font-size: 0.75em;
  padding: 6px;
  margin: 0.25em 0;
}

/* === Object actions (favorite, etc.) === */

div.actions,  /* <== For page headers */
td.actions {
  display: flex;
  gap: 5px;
}

div.actions {
  padding-left: 8px;
}

.actions a {
  border: 1px solid #ccc;
  color: #333;
  display: flex;
  font-size: 1em;
  font-weight: 700;
  line-height: 1;
  padding: 0.5em 0.75em;
}

.actions a:hover {
  background-color: #eee;
  cursor: pointer;
}

.actions a img {
  height: 1em;
}

.actions .favorite:after {
  content: "☆"
}

.actions .favorited:after {
  color: var(--orange);
  content: "★"
}

span.uploaded_content_indicator {
  display: inline-block;
  height: 0.75em;
}

span.uploaded_content_indicator svg {
  height: 100%;
}

/* === Slideshow stuff === */

ul.slideshow-list {
  columns: 3;
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.slideshow-list a {
  font-weight: 700;
}

ul.slideshow-list img {
  display: inline-block;
  opacity: 40%;
  position: relative;
  top: 2px;
  width: 1em;
}

.slideshow {
  margin: 0;
}

.slideshow img {
  margin-right: 1px;
  max-width: 100%;
  width: auto;
}

.slideshow a {
  padding-right: 1px;
}

body.slideshows.index h3 {
  margin: 1.25rem 0 0.5rem;
}

.slideshow_caption {
  margin: 0.25em 0 2em;
}

.slideshow_caption span {
  color: var(--med_blue);
  font-weight: 700;
}

form#new-slideshow .flex-wrapper {
  display: flex;
  gap: 10px;
}

form#new-slideshow .flex-wrapper div {
  flex-grow: 1;
}

#photo-deletion-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 1.5em 0;
}

#photo-deletion-selector figure {
  /* border: 3px solid #ccc; */
  margin: 0;
  width: 200px;
}

#photo-deletion-selector img {
  border: 3px solid #ddd;
}

#photo-deletion-selector img.selected {
  border: 3px solid var(--orange);
  box-shadow: var(--orange) 0 0 5px;
}

#delete-photos {
  text-align: center;
}

#delete-photos button {
  background: var(--danger);
  font-size: 0.925em;
}

#delete-photos button:disabled {
  background: #aaa;
  cursor: not-allowed;
}

#exit-deletion {
  margin: 1em;
  text-align: center;
}

#exit-deletion button {
  display: inline-block;
  font-size: 0.925rem;
  margin: auto;
}

#exit-deletion button:disabled {
  cursor: not-allowed;
  background: #aaa;
}

/* === Tooltip customization === */
.tippy-box[data-theme~='whiteopps'] {
  background-color: var(--lt_blue);
  margin-top: -4px;
}

.tippy-box[data-theme~='whiteopps'][data-placement^='bottom'] > .tippy-arrow::before {
  border-bottom-color: var(--lt_blue);
}

/* === Upload index listing === */

#upload-index-wrapper {
  align-content: stretch;
  margin: 1em 0;
  display: flex;
  flex-flow: row wrap;
  gap: 1em;
}

#upload-index-wrapper h3 {
  color: var(--text);
  font-size: 1.25rem;
  opacity: 75%;
  margin: 0 0 0.25em;
}

.upload-list-inner ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.upload-list-inner li {
  margin: 0.25em 0;
}

#upload-docs-wrapper {
  flex-grow: 2;
}

#upload-docs-wrapper .upload-list-inner {
  columns: 2;
}

/* Login Page */

body.login {
  background-size: cover;
  margin: 0;
  padding: 0;
}

#login-background-fill {
  background-color: black;
  background-size: cover;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0;
  position: absolute;
  right: 0;
  top: 0;
  opacity: 50%;
  z-index: 0;
}

#login-ui {
  position: relative;
  z-index: 2;
}

body.login figure {
  margin: 0 auto;
  padding: 1em 0;
  width: 420px;
}

body.login figure svg {
  display: block;
  position: relative;
  width: 100%;
}

/* Form styles in forms.css */

