@font-face {
  font-family: 'Ink Free';
  src: URL('fonts/Inkfree.ttf') format('truetype');
}

:root {
  --bright-blue: #216cb1;
  --dark-blue: #14416A;
  --pale-blue: #e7f1ff;
  --paler-blue: #f6f8ff;  /* mdigi.tools/lighten-color */
  --light-grey: #dee2e6;
  --med-grey: #aaa;
  --dark-grey: #777;
  --pale-yellow: #FFFACD;
  --star-gold: #ffe34c;
  --star-silver: #ced4da;
  --bs-accordion-border-color: #dee2e6;  /* Fallback color if variable is not available */
  --bs-body-line-height: 1.2;
}

.color-bright-blue {
  color: var(--bright-blue);
}
.color-dark-blue {
  color: var(--dark-blue);
}

html, body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  margin: 0;
}

body {
  background-color: var(--dark-blue);
}

.progress {
  height: .3rem;
  display: block;
  visibility: hidden;
}

.loading .progress {
  visibility: visible;
}

.progress-bar {
  width: 100%;
}

.highlight {
  background-color: var(--pale-yellow);
  font-weight: bold;
}

.btn-primary.attention,
.btn-outline-secondary.attention,
.new-data-banner.attention {
  background-color: orange;
  color: white;
}

.j1author.attention {
  color: orange;
}

.post-btn.attention {
  color: orange;
  border-color: orange;
}

#error-resolve:empty {
  display: none;
}

.inkfree {
  font-family: 'Ink Free'
}

.shake {
  animation: shake 1s;
  color: rgba(var(--bs-danger-rgb));
  border: solid 1px rgba(var(--bs-danger-rgb)) !important;
}

.shake.attention {
  animation: shake 3s;
  border: solid 1px orange !important;
}

main.container {
  padding-bottom: 1rem;
}

.footer {
  background-color: var(--dark-blue);
  color: white;
  padding: 1rem;
  position: fixed;
  bottom: 0;
  width: 100%;
}

.footer a, nav a {
  color: white;
}

.footer a:hover, 
nav a:hover,
.overlay a {
  color: yellow;
}

.overlay a:hover {
  color: var(--dark-grey);
}

/* safe anchors */
/* Overlay container */
.safea-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1021; /* Ensure it is above other content */
}

/* Overlay content box */
.safea-overlay-content {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 80%;
  max-width: 400px;
  text-align: center;
}

/* Overlay buttons */
.safea-overlay-ctrls {
  margin-top: 20px;
}

.safea-overlay-ctrls .btn {
  margin: 10px;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

/* Button styles */
.safea-overlay-continue {
  background-color: #007bff;
  color: #fff;
}

.safea-overlay-continue:hover {
  background-color: #0056b3;
}

.safea-overlay-cancel {
  background-color: #6c757d;
  color: #fff;
}

.safea-overlay-cancel:hover {
  background-color: #5a6268;
}

.alert-info {
  background-color: var(--pale-blue);
}

.feed-filter-container .alert-info {
  color: var(--dark-blue);
}

.stream-top-strip.sticky-top {
  background-color: #ffffff;
}

.feed-filter-container {
  max-height: 70vh;
  overflow-y: auto;
}

.feed-filter-ctrls .btn {
  padding: 0.1em 0.2em;
  border-style: none;
}

.feed-filter-ctrls a.btn:hover {
  border-style: solid;
}

.not-yet-loaded {
  background-image: url('/images/loadingmedia.gif');
  background-position: center 1em;
  background-repeat: no-repeat;
  background-size: auto;
}

.shunted.not-yet-loaded {
  background-image: none;
}

.not-yet-loaded .search-box-feed-accounts,
.not-yet-loaded .btn-account-filter-on-toggle,
.not-yet-loaded .btn-account-followall-on-toggle,
.not-yet-loaded .feed-filter {
  display: none;
}

.psnfa-filter-bar {
  display: flex;
}

.shunted .psnfa-filter-bar,
.shunted .feed-filter {
  display: none;
}

.main-area {
  background-color: #ffffff; /* White background for the top area */
  padding: 20px 5px;
  border-top: 30px solid var(--dark-blue); /* Thin margin area with background color */
  border-left: 30px solid var(--bright-blue); /* Left margin area with background color */
  border-right: 30px solid var(--bright-blue); /* Right margin area with background color */
  min-height: calc(100vh);
  /* commented out below... seems fine */
  /* overflow-y: auto; Enables scrolling for overflowing content */
}

.stream-profile-icon {
  max-width: 80px; 
  height: auto;
}

.small-if-sm {
  font-size: 1em;
}

.more-info {
  border-bottom: 1px dotted var(--med-grey);
  cursor: default;
}

.viz-if-narrow {
  display: none;
}
.viz-if-wide {
  display: inline;
}

@media (max-width: 576px) {
  :root {
    font-size: 14px;
  }
  small, .small {
    font-size: 13px;
  }
  .small-if-sm {
    font-size: 12.5px;
  }
  html, body {
    padding: 0px;
  }
  footer {
    display: none;
  }
  .main-area {
    padding: 0;
    border-top: none;
    border-left: none;
    border-right: none;
  }
  .stream-profile-icon {
    max-width: 48px; 
    height: auto;
  }
  .viz-if-narrow {
    display: inline;
  }
  .viz-if-wide {
    display: none;
  }
}

.left-nav {
  background-color: var(--dark-blue);
  color: white;
  height: 100%;
}

.menu-col, .right-col {
  background-color: var(--dark-blue);
}

.btn-primary {
  color: #fff;
  background-color: var(--bright-blue);
  border-color: var(--bright-blue);
}

.btn-primary:hover {
  background-color: var(--dark-blue);
  border-color: var(--dark-blue);
}

.btn-outline-primary {
  color: var(--bright-blue);
  border-color: var(--bright-blue);
}

.btn-outline-primary:hover {
  background-color: var(--dark-blue);
  border-color: var(--dark-blue);
}

.font-size-2em {
  font-size: 2em;
}

h1:focus {
  outline: none;
}

a, .btn-link {
  color: var(--bright-blue);
}

a:hover {
  color: var(--dark-blue);
}

.logo_dark_blue {
  color: var(--dark-blue);
}

.left_nav_section {
  height: 100vh;
  top: 0px;
}

.inline-image {
  height: 1em;
}

.welcome-box {
  background-color: white;
  border: solid 2px var(--med-grey);
  padding-right: 275px;
}

.welcome-mascot {
  width: 260px;
  margin-top: 4.5rem;
  border: solid 1px var(--light-grey);
  padding-top: 2px;
  padding-left: 2px;
  padding-right: 2px;
  padding-bottom: 0px;
}

.chop-med-line {
  display: inline;
}

@media (max-width: 875px) {
  .welcome-box {
    padding-right: 215px;
  }
  
  .welcome-mascot {
    width: 200px;
  }

  .chop-med-line {
    display: block;
  }
  
}

@media (max-width: 576px) {
  .welcome-box {
    padding-right: 145px;
  }
  
  .welcome-mascot {
    width: 130px;
  }

  .chop-med-line {
    display: block;
  }
}

.banner {
  display: block;
  border-radius: .2em;
}

.new-data-banner {
  background-color: var(--med-grey);
  color: white;
}

.new-data-banner.d-chill {
  background-color: var(--light-grey);
}
.new-data-banner.d-chill.attention {
  background-color: orange;
}

.new-data-banner:hover,
.btn-primary:hover {
  color: yellow;
}

.banner.new-data-banner.d-none {
  display: none;
}

.new-data-num {
  color: var(--light-grey);
  display: none;
}

main.container>.row {
  display: none;
}

main[data-page="stream"]>.row.stream,
main[data-page="stories"]>.row.stories,
main[data-page="about"]>.row.about,
main[data-page="privacy"]>.row.privacy,
main[data-page="terms"]>.row.terms {
  display: block;
}

main.container {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

main .row {
  margin-left: 0;
  margin-right: 0;
}

main .row>* {
  padding-left: 0;
  padding-right: 0;
}

.row > .close-btn {
  width: auto;
}

.close-btn {
  line-height: 1;
}

a.close-btn-dark {
  background-color: var(--dark-grey);
  color: white;
}

a.close-btn-dark:hover {
  color: var(--light-grey);
}

nav[data-page="stream"] a[data-page="stream"],
nav[data-page="stories"] a[data-page="stories"],
nav[data-page="about"] a[data-page="about"],
nav[data-page="privacy"] a[data-page="privacy"],
nav[data-page="terms"] a[data-page="terms"] {
  color: var(--med-grey);
}

.stream-filter-tab a {
  min-width: 3ch;
  text-align: center;
  display: inline-block;
}

.stream-filter-ctrl .nav-link {
  color: var(--dark-blue);
  background-color: #fff;
  background-color: #fff;
  border-left: 1px solid #dee2e6;
  border-top: 1px solid #dee2e6;
  border-right: 1px solid #dee2e6;
  border-bottom: none;
  margin-top: 1em;
  position: relative;
}

.stream-filter-ctrl .nav-link.attention {
  border-color: orange;
}

.stream-filter-ctrl .nav-link.active {
  background-color: var(--pale-blue);
  border-color: var(--med-grey);
  z-index: 2; /* Bring active tab to the front */
}

.stream-filter-ctrl .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px; /* Adjust height to cover the top border of the pane */
  background-color: var(--pale-blue); /* Match the background color of the active tab */
  z-index: 3; /* Ensure the cover is above the pane border */
}

.stream-filter-pane.active {
  padding: 1rem;
  background-color: var(--pale-blue);
  border-left: solid 1px var(--med-grey);
  border-top: solid 1px var(--med-grey);
  border-right: solid 1px var(--med-grey);
  border-bottom: solid 1px var(--med-grey);
  position: relative;
  top: -1px;
}

.stream-filter-pane.active::before {
  content: "";
  display: block;
  border-top: 1px solid var(--med-grey); /* Add top border for the pane */
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1; /* Position behind the active tab */
}

.stream-filter-ctrl a.nav-link:hover {
  color: var(--bright-blue);
  border-color: var(--dark-blue);
}

.stream-filter-ctrl .nav-link {
  margin-top: 1em;
}

@media (max-width: 800px) {
  .stream-filter-ctrl .nav-link {
    padding: .5em .25em;
    margin-top: .5em;
  }
}

.row.authoring,
.row.news-filter {
  display: none;
}

.stream.whooting .row.authoring,
.stream.filter-editing .row.news-filter {
  display: flex;
}


.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.grid-list li {
  list-style-type: none;
  background-color: var(--paler-blue);
  padding: 10px;
  border: 1px solid var(--light-grey);
  border-radius: 5px;
}

.psnfa {
  overflow: hidden;
  padding: 1em;
}

.psnfa-label {
  flex: 1 1 auto;
  min-width: 0; /* Ensure the label can shrink */
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.psnfa-mdp {
  margin-left: 0.2em;
}

.psnfa-site, .psnfa-rss {
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  margin-left: 0.2em;
}
.collapse-all {
  display: none;
}

.custom-feed-tip-bar.hide-tips {
  margin-bottom: 1em;
}

.stream.has-expandeds .collapse-all {
  display: flex;
}

.search-box-feed-accounts {
  max-width: 350px;
  margin-bottom: 0rem;
}

.post {
  border: solid 1px var(--light-grey);
  position: relative;
}

.post-top-collapse-btn {
  display: block;
  font-size: 1.3rem;
  position: absolute;
  transform: translateX(-50%);
  top: 0px;
  left: 50%;
  z-index: 99;
}

.post-minmax-btn {
  display: block;
  font-size: 1.3rem;
  position: absolute;
  transform: translateX(-50%);
  bottom: 0px;
  left: 50%;
  z-index: 99;
}

.post.expanded .post-maximize, 
.post .post-minimize {
  display: none;
}

.post.expanded .post-minimize,
.post .post-maximize {
  display: block;
}

.post.teaser-only .post-minmax-btn,
.post.teaser-only .post-top-collapse-btn {
  display: none;
}

.truncate-lines-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
}

.teaser-img {
  opacity: 50%;
}

.teaser-video-btn, .teaser-audio-btn {
  color: red;
  cursor: pointer;
}

.row.posts > .post,
.row.post-main,
.row.post-sharedby,
.row.post-sharedby > *,
.row.post-main > * {
  padding-left: 0;
  margin-left: 0;
  padding-right: 0;
  margin-right: 0;
}

.post-main {
  display: flex;
  flex-wrap: nowrap;
}

.stream iframe {
  width: 100%;
  border: none;
}

.stream .progress {
  margin-top: 1em;
}

img.inline-height {
  height: 1em;
}

.post-main .avatar {
  width: 80px;
  max-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: dotted 1px var(--light-grey);
  margin-bottom: .2em;
}

@media (max-width: 576px) {
  .post-main .avatar {
    width: 55px;
    max-height: 55px;
  }  
}

.post-main .avatar img {
  max-width: 100%; /* Keep the image responsive */
  max-height: 100%;
  object-fit: cover; /* Ensures the image covers the container */
}

.post-sharedby {
  background-color: var(--paler-blue);
}

.post-sharedby-avatar .avatar,
.post-sharedby-avatar .avatar-ctrls {
  display: inline;
}

.avatar-ctrls a {
  border: solid 1px var(--light-grey);
  padding: 0.2em;
  margin: 0.1em;
}

.post-sharedby-avatar .avatar .media-container {
  margin-left: .5em;
}

.post.expanded .post-rich-content,
.post-teaser {
  display: block;
}

.post-rich-content,
.post.expanded .post-teaser {
  display: none;
}

.post-content {
  padding-right: 2rem;
}

.post-btns {
  background-color: var(--paler-blue);
  height: 100%;
  width: 2rem;
  font-size: 1.3rem;
}

.post-teaser {
  padding-top: .5em;
  max-height: 7rem;
  overflow: hidden;
  position: relative;
  max-width: 100%;
}

.post-teaser .teaser-title {
  font-weight: bold;
}

.post-teaser .teaser-title,
.post-teaser .teaser-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  /* show just a few lines */
  -webkit-line-clamp: 2;
  line-clamp: 2;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.post-teaser .teaser-img-container {
  padding-top: .5em;
  position: relative;
  width: 100%;
  height: auto;
}

.post-teaser img.teaser-img {
  position: relative;
  bottom: 0;
  left: 0;
  max-width: 100%;
  height: auto;
}

.post-card-text {
  padding-bottom: 0.2em;
}

.post-card img {
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .post-card img {
    max-height: 225px;
  }
}

@media (max-width: 480px) {
  .post-card img {
    max-height: 175px;
  }
}

.spinner-border {
  color: var(--dark-blue);
}

.btn-primary .spinner-border,
.btn-success .spinner-border {
  color: white;
}

.toggle-btn .toggle-on,
.toggle-btn.toggle-btn-on .toggle-off {
  display: none;
}

.toggle-btn.toggle-btn-on .toggle-on,
.toggle-btn .toggle-off {
  display: flex;
}

.j1feed {
  background-color: orange;
  color: white;
  display: none;
}

.j1feed.j1mode {
  display: flex;
}

.j1feed-label {
  max-width: 250px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

@media (max-width: 576px) {
  .j1feed-label {
    max-width: 100px;
  }
}

.hide-tips .expanded-tip {
  display: none;
}

.form-check-label, 
.vert-middle {
  vertical-align: middle;
}

a.canstar i.bi-star-fill,
a.canstar.applied i.bi-star {
  display: none;
}

a.canstar i.bi-star,
a.canstar.applied i.bi-star-fill {
  display: flex;
}

a.canstar i.bi-star {
  color: var(--star-silver);
}

a.canstar:hover {
  border: solid 1px var(--light-grey);
}

a.canstar:hover i.bi-star {
  color: var(--star-gold);
}

a.canstar i.bi-star-fill {
  color: var(--star-gold);
}

a.canstar:hover i.bi-star-fill {
  color: var(--star-silver);
}