body {
  --bs-body-font-family: "Roboto", "Segoe UI";
  --bsfc-modal-background-color: #091E427D;
}

header {
    padding: 0 1em;
}

header .site-title {
  font-size: 1.5rem;
    font-weight: 600;
    color: #3d50f5;
    white-space: nowrap;
}



footer {
    padding: 0 1em;
}

main {
    position: relative /* So things like toasts don't overlap the nav bar*/;
}

.page-content {
    display: block;
    position: relative;
}

.modal.fade {
  backdrop-filter: blur(2px);
  background-color: var(--bsfc-modal-background-color) !important;
}

.modal.fade.bg-danger {
  --bsfc-modal-background-color: #42090930;
}

.modal.fade.bg-warning {
  --bsfc-modal-background-color: #4236094f;
} 

.modal.fade.bg-success {
  --bsfc-modal-background-color: #09420933;
}



.modal-content {
  --bs-modal-box-shadow: 0px 8px 12px rgba(9, 30, 66, 0.5) !important;
  box-shadow: var(--bs-modal-box-shadow);
  border: none;
}





a.no-invites-available {
    color: var(--bs-secondary-color) !important;
    text-decoration: none;
}


.toast-header {
    color: white;
    background-color: black;
    border: none;
}

.toast-body {
    color: white;
    background-color: #3c3c3c;
    border-bottom-left-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));
    border-bottom-right-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));
}

a {
	cursor: pointer;
}

small > a:not(.text-muted) {
	color: rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,1)) !important;
	text-decoration: underline !important;
}

small > a.text-muted {
	text-decoration: none !important;
}

div.form-group > label:first-child {
  font-weight: bold;
  display: inline-flex;
}

div.form-group > label:first-child > [data-bs-toggle="tooltip"] {
  margin-left: 0.5em;
}



/*Checkboxes*/

input[type=checkbox][name]{
	height: 0;
	width: 0;
	visibility: hidden;
  margin-left: 0.5em; /* space between label and input */
}

label[toggle] {
	cursor: pointer;
	text-indent: -9999px;
	width: 40px;
	height: 20px;
	background: grey;
	display: block;
	border-radius: 100px;
	position: relative;
}

label[toggle]:after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	background: #fff;
	border-radius: 16px;
	/* transition: 0.3s; */
}

input:checked + label[toggle] {
	background: #31870a;
}

input:checked + label[toggle]:after {
	left: calc(100% - 18px);
	/* transform: translateX(-100%); */
}

label[toggle]:active:after {
	width: 130px;
}




.modal-centered {
	display: flex;
	align-items: center;
	justify-content: center;
}


 /* Add style for the tabs */

 .tabs-wrapper {
  display: flex;
  align-items: baseline;
 }

 .tabs-wrapper > .buttons {
  display: flex;
  align-items: baseline;
 }

 .tabs {
    margin-bottom: 20px;
    flex-grow: 1;
  }

  .tabs a {
    margin-right: 10px;
    cursor: pointer;
  }

  .tabs a.active {
    font-weight: bold;
  }


  .badge {
    cursor: default;
  }

  a.badge {
    cursor: pointer;
  }


  .badge-red {
    background-color: #ef4343;
    color: white !important;
  }

  .badge-grey {
    background-color: grey;
  }


  li.item > a:not(.badge) {
    margin-right: 1em;
  }

  li.item {
    padding-bottom: 10px;
  }


  a.btn.top-right {
    margin-bottom: 1em;
  }
  @media (min-width: 800px) {
    a.btn.top-right {
      float: right;
    }
  }

  div.page-content.markdown img {
    max-width: 90%;
    margin: 0 auto;
    display: block;
    border: 1px solid #cdcccc;
  }

  div.page-content.markdown th,
  div.page-content.markdown td {
    padding: 0.6em;
    vertical-align: top;
  }


  table.audit-logs th,
  table.audit-logs td {
    padding: 0.2em 0.6em;
    word-wrap: break-word;
  }

  table.audit-logs a.show-detail {
    text-decoration: none;
  }

  table.audit-logs .hidden {
    display: none !important;
  }

  table.audit-logs pre {
    max-width: 900px;
    overflow-x: auto;
  }


  .page-content.automoderator {
    max-width: initial;
  }

  .page-content.automoderator > *:not(table) {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;

  }

  .page-content.automoderator > table {
    margin-top: 2em;
  }

  @media (min-width: 1200px) {
    .page-content.automoderator > table {
      margin-left: 10em;
      margin-right: 10em;
      max-width: initial;

    }
  }
 
  .page-content.automoderator > table td {
    vertical-align: top;
    padding: 0.5em;
  }

  .alert .show-more {
    color: grey;
  }

  .alert .alert-more {
    display: none;
    max-width: 800px;
    margin: 0 auto;
  }

  .alert.sticky-top[data-until] {
    display: none;
  }

  .gallery-scroller {
    scroll-snap-type: x mandatory;
    overflow-x: scroll;
    display: flex;
    min-height: 300px;
  }

  .gallery-scroller > * {
    scroll-snap-align: center;
    
  }

  .gallery-scroller > li.post {
    width: 400px;
    min-width: 400px;
  }

  .gallery > .btn {
    position: absolute;
  
    top: 50%;
    transform: translateY(-50%);
  
    height: 30px;
    width: 30px;
  
    border-radius: 2px;
    background-color: rgba(0,0,0,0.5);
    background-position: 50% 50%;
    background-repeat: no-repeat;
  
    z-index: 1;
  }
  
  .gallery > .btn.next {
    background-image: url('data:image/svg+xml;charset=utf-8,<svg width="18" height="18" viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg"><title>Shape</title><path d="M25.557 14.7L13.818 2.961 16.8 0l16.8 16.8-16.8 16.8-2.961-2.961L25.557 18.9H0v-4.2z" fill="%23FFF" fill-rule="evenodd"/></svg>');
    right: 10px;
  }
  
  .gallery > .btn.prev {
    background-image: url('data:image/svg+xml;charset=utf-8,<svg width="18" height="18" viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg"><title>Shape</title><path d="M33.6 14.7H8.043L19.782 2.961 16.8 0 0 16.8l16.8 16.8 2.961-2.961L8.043 18.9H33.6z" fill="%23FFF" fill-rule="evenodd"/></svg>');
    left: 10px;
  }


  div.beta-tag {
    display: inline-flex;
    font-size: 10pt;
    background: lightgray;
    padding: 0.1em 0.7em;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    color: #6b6b6b;
  }

  button.btn-link {
    padding: 0;
    margin-right: 1em;
    margin-top: 0;
    margin-bottom: 0;
    border: none;
  }

  .btn.btn-outline-primary,
  .btn.btn-outline-secondary {
    --bs-btn-bg: var(--bs-body-bg); /* Preserve white background of unselected buttons on a coloured div */
  }

  

  .list-warning-message {
    color: #cb630e !important;
    display: block;
    font-size: 0.8em;
    margin-left: 1em;
  }

  .notify-icon {
    color:var(--bs-danger);
    font-size: 10px;
    margin-left: 0.5em;
  }

  header .nav-link {
    display: flex;
    align-items: center;
  }

  div.alert form {
    margin: 0 !important;
  }

  div.list-actions {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: end;
  }

  div.list-actions > * {
    margin: 0;
  }
  /* small.search-count {
    text-align: right;
    display: block;
  } */

  .bg-stripe {
    background-color: rgb(99, 91, 255);
  }

  .bg-stripe:hover, .bg-stripe:disabled {
    background-color: rgb(136, 129, 251);
  }

  .badge-queuing {
    background-color: #3d8bff !important;
    color: white !important;
  }

  .dropdown-toggle {
    /*Line up text and arrow icon*/
    display: flex;
    align-items: center;


  }


  /* Container styles */
  
  .bsfc-container {
    padding: 0.5em;
    border-radius: 4px;
    border-width: 2px;
    border-style: solid;
    margin: 1em 0;
  }

  .bsfc-container.top {
    margin-bottom: 2em;
  }

  .bsfc-container.top > h2 {
    font-weight: bold;
  }

  .bsfc-container.green {
    background-color: #f1f9f0;
    border-color: #95b391;
  }

  .bsfc-container.blue {
    background-color: #ddebf7;
    border-color: #95abb7;
  }

  .bsfc-container.orange {
    background-color: #fff8eb;
    border-color: #ffd383;
  }

  .bsfc-container.red {
    background-color: #ffebeb;
    border-color: #ff8383;
  }

  .bsfc-container.pink {
    background-color: #fff8f8;
    border-color: #ffaae1;
  }

  @media (prefers-color-scheme: dark) {
    html:not(.theme-light) {
      --bs-body-bg: #121212;
      --bs-body-color: #8e8e8e;
      --bs-secondary-color: rgba(183, 202, 222, 0.75);
      --bs-dark-bg-subtle: #232323;
    }

    html:not(.theme-light) .btn-primary {
      --bs-btn-color: #dcdcdc;
    }
    
    html:not(.theme-light) .site-title {
      color: #4b91ff !important;
    }


    html:not(.theme-light) a.nav-link {
      color: var(--bs-body-color) !important
    }

    html:not(.theme-light) a.nav-link:hover {
      color: #b3d0e6 !important
    }

    html:not(.theme-light) a.nav-link:active {
      color: #b3d0e6 !important
    }

    html:not(.theme-light) .bg-success {
      background-color: rgb(0, 107, 59) !important;
    }

    html:not(.theme-light) .bg-success:hover {
      background-color: rgb(0, 149, 82) !important;
    }

    html:not(.theme-light) .accordion-button:not(.collapsed) {
      background-color: #232323 !important;
      box-shadow: none !important;
      color: var(--bs-body-color) !important;
    }

    html:not(.theme-light) .carousel-dark .carousel-control-next-icon, 
    html:not(.theme-light) .carousel-dark .carousel-control-prev-icon {
      filter: none;
    }

    html:not(.theme-light) .carousel-indicators {
        filter: invert(1);
    }

    html:not(.theme-light) .bsfc-container {
      background-color: var(--bs-body-bg) !important;
      border-width: 3px;
    }

        
    a.btn-primary,
    .bg-primary {
      color: white !important;
    }
  }

  .bsfc-container.accordion > .accordion-item,
  .bsfc-container.accordion > .accordion-item > .accordion-header > button {
    background-color: transparent;
    border: none;
  }

  .bsfc-container.accordion > .accordion-item > .accordion-header > button:focus {
    box-shadow: none;
  }

  .bsfc-container.accordion > .accordion-item > h3.accordion-header > button {
    font-size: 1.75rem;
  }


  /* END Container styles */


  /* Input styles */
  label[property].error {
    background-color: #ff6060 !important;
  }

  @keyframes spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }

  label > i.spinner {
    animation: spin 1.4s linear infinite;
    display: inline-block;
  }

  /*Show check marks next to checkbox based inputs*/
  input[type="checkbox"]:checked + label.btn::before {
    content: "✔";
  }

  /* END Input styles */

  /* CALLOUTS */

  .callout {
    --bs-link-color-rgb: var(--callout-link);
    --bs-code-color: var(--callout-code-color);
    padding:1.25rem;
    margin-top:1.25rem;
    margin-bottom:1.25rem;
    color:var(--callout-color, inherit);
    background-color:var(--callout-bg, var(--bs-gray-100));
    border-left:0.25rem solid var(--callout-border, var(--bs-gray-300))
  }
  .callout h4 {
    margin-bottom:.25rem
  }
  .callout>:last-child {
    margin-bottom:0
  }
  .callout+.callout {
    margin-top:-.25rem
  }
  .callout .highlight {
    background-color:rgba(0,0,0,0.05)
  }
  .callout-info {
    --callout-color: var(--bs-info-text-emphasis);
    --callout-bg: var(--bs-info-bg-subtle);
    --callout-border: var(--bs-info-border-subtle)
  }
  .callout-warning {
    --callout-color: var(--bs-warning-text-emphasis);
    --callout-bg: var(--bs-warning-bg-subtle);
    --callout-border: var(--bs-warning-border-subtle)
  }
  .callout-danger {
    --callout-color: var(--bs-danger-text-emphasis);
    --callout-bg: var(--bs-danger-bg-subtle);
    --callout-border: var(--bs-danger-border-subtle)
  }

  /* END CALLOUTS */


  /* MARKDOWN */

  .toastui-editor-contents h1,
  .toastui-editor-contents h2,
  .toastui-editor-contents h3,
  .toastui-editor-contents h4,
  .toastui-editor-contents h5,
  .toastui-editor-contents h6 {
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1em;
  }

  .toastui-editor-contents h1 {
    font-size: 30px;
  }

  .toastui-editor-contents h2 {
    font-size: 28px;
  }

  .toastui-editor-contents h3 {
    font-size: 26px;
  }

  .toastui-editor-contents h4 {
    font-size: 24px;
  }

  .toastui-editor-contents h5 {
    font-size: 22px;
  }

  .toastui-editor-contents h6 {
    font-size: 20px;
  }

  .toastui-editor-contents p {
    font-size: 20px;
  }

  /* END MARKDOWN */


  /*Safari error logging*/
#error-log {
    position: fixed;
    display: none;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    font-family: monospace;
    padding: 10px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    white-space: pre-wrap;
}
.alert ul {
  padding-left: 0;
  margin: 0;
  list-style-type: none;
}

  /* Mobile CSS overrides */
  @media (max-width: 767px) {
    
    ul {
      padding-left: 0;
    }

    

    .accordion-body {
      padding-left: 0;
      padding-right: 0;
    }

  }

  /* Desktop CSS overrides */
  @media (min-width: 767px) {
    .has-menu .page-content {
    }

    div.floating-header {
      display: none !important;
    }
  }
  

div.floating-header {
  position: fixed;
  top:-5em;
  left:0;
  right:0;
  width:100%;
  height:3em;
  color:var(--bs-body-color);
  background:var(--bs-body-bg);
  text-align: center;
  transition: top 1s;
  z-index: 100;
  opacity: 1;
  box-shadow: -1px 1px 13px 0px rgba(0,0,0,0.75);

  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.floating-header > * {
  width: 100%;
  flex-grow: 1;
  white-space: nowrap;
}

.scroll-to-top {
  position: absolute;
  left: 0;
  top: 13px;
  width: 4em;
  color: var(--bs-body-color);
}

div.floating-header.visible {
  top:0;
}
.floating-header >  div >  a {
  text-decoration: none;
  color:var(--bs-body-color) !important;
}


.alert-sticky {
  position: sticky;
  top: 10px;
  z-index: 100;
  box-shadow: 2px 2px 19px -1px rgba(0, 0, 0, 0.34);
  margin-bottom: 1em !important;
}

.callout-sticky {
  position: sticky;
  top: 10px;
  z-index: 100;
  box-shadow: 2px 2px 19px -1px rgba(0, 0, 0, 0.34);
  margin-bottom: 1em !important;
}

div.saving-indicator {
  display: flex;
  align-items: center;
}

div.saving-indicator span.saving-spinner {
  display: none;
  margin-right: 0.5em;
}

div.saving-indicator.visible span.saving-spinner {
  display: block;
}

.sticky-footer {
  position: sticky;
  bottom: 0;
  background-color: var(--bs-body-bg);
  padding: 1rem;
  border-top: 1px solid var(--bs-border-color);
  z-index: 99;
  margin-top: 1rem;
}

.relative-footer {
  position: relative;
  padding: 1rem;
  background-color: var(--bs-body-bg);
  padding-top: 0;
  display: flex;
  flex-wrap: wrap;
}

/* Hide sticky footer on desktop */
/* @media (min-width: 768px) {
  .sticky-footer {
    position: static;
    border-top: none;
    padding: 0;
  }
} */


/* Manual theme overrides */
html.theme-light {
  --bs-body-bg: #fff;
  --bs-body-color: #212529;
  --bs-secondary-color: rgba(33, 37, 41, 0.75);
}

html.theme-light .site-title {
  color: #3d50f5 !important;
}


html.theme-light a.nav-link {
  color: #212529 !important;
}

html.theme-light a.nav-link:hover {
  color: #0d6efd !important;
}

html.theme-light a.nav-link:active {
  color: #0d6efd !important;
}

html.theme-light .bg-success {
  background-color: rgb(25, 135, 84) !important;
}

html.theme-light .bg-success:hover {
  background-color: rgb(21, 115, 71) !important;
}

html.theme-light .accordion-button:not(.collapsed) {
  background-color: #e7f1ff !important;
  box-shadow: none !important;
  color: #212529 !important;
}

html.theme-light .carousel-dark .carousel-control-next-icon,
html.theme-light .carousel-dark .carousel-control-prev-icon {
  filter: invert(0);
}

html.theme-light .carousel-indicators {
  filter: none;
}

html.theme-light .bsfc-container {
  background-color: var(--bs-body-bg) !important;
  border-width: 2px;
}

html.theme-dark {
  --bs-body-bg: #121212;
  --bs-body-color: #8e8e8e;
  --bs-secondary-color: rgba(183, 202, 222, 0.75);
  --bs-dark-bg-subtle: #232323;
}

html.theme-dark .btn-primary {
  --bs-btn-color: #dcdcdc;
}

html.theme-dark .site-title {
  color: #4b91ff !important;
}


html.theme-dark a.nav-link {
  color: var(--bs-body-color) !important;
}

html.theme-dark a.nav-link:hover {
  color: #b3d0e6 !important;
}

html.theme-dark a.nav-link:active {
  color: #b3d0e6 !important;
}

html.theme-dark .bg-success {
  background-color: rgb(0, 107, 59) !important;
  color: #d5d5d5 !important;
}

html.theme-dark .bg-success:hover {
  background-color: rgb(0, 149, 82) !important;
  color: #d5d5d5 !important;
}

html.theme-dark .accordion-button:not(.collapsed) {
  background-color: #232323 !important;
  box-shadow: none !important;
  color: var(--bs-body-color) !important;
}

html.theme-dark .carousel-dark .carousel-control-next-icon,
html.theme-dark .carousel-dark .carousel-control-prev-icon {
  filter: none;
}

html.theme-dark .carousel-indicators {
  filter: invert(1);
}

html.theme-dark .bsfc-container {
  background-color: var(--bs-body-bg) !important;
  border-width: 3px;
}

/* Theme picker styles */
.dropdown-item.active {
  background-color: var(--bs-primary);
  color: white;
}

.dropdown-item.active i {
  color: white;
}

/* Dark mode theme picker adjustments */
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .dropdown-item.active {
    background-color: #4b91ff;
  }
}

html.theme-dark .dropdown-item.active {
  background-color: #4b91ff;
}

html.theme-dark a.btn-primary,
html.theme-dark .bg-primary {
  color: white;
}



/* Theme picker button styling */
#themePicker {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#themePicker:hover {
  transform: scale(1.05);
}

#themePicker i {
  font-size: 1.1rem;
}

/* Theme option icons */
.theme-option i {
  margin-right: 0.5rem;
  width: 16px;
  text-align: center;
}