/* Modified from Twitter icons */
.ugc a[href^="https://twitter.com"]::after,
.ugc a[href^="https://www.twitter.com"],
.ugc a[href^="https://x.com"]::after,
.ugc a[href^="https://www.x.com"]::after,
.ugc a[href^="https://youtube.com"]::after,
.ugc a[href^="https://www.youtube.com"]::after,
.ugc a[href^="https://youtu.be.com"]::after,
.ugc a[href^="https://github.com"]::after,
.ugc a[href^="https://www.github.com"]::after,
.ugc a[href^="https://stackoverflow.com"]::after,
.ugc a[href^="https://www.stackoverflow.com"]::after,
.ugc a[href^="https://wikipedia.org"]::after,
.ugc a[href^="https://en.wikipedia.org"]::after,
.ugc a[href^="https://reddit.com"]::after,
.ugc a[href^="https://www.reddit.com"]::after,
.ugc a[href^="https://redd.it"]::after,
.ugc a[href^="https://substack.com"]::after,
.ugc a[href^="https://www.substack.com"]::after {
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -.125em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* My own addition */
  color: var(--bs-secondary-color);
  font-size: 0.75em;
}

.ugc a[href^="https://twitter.com"]::after,
.ugc a[href^="https://www.twitter.com"],
.ugc a[href^="https://x.com"]::after,
.ugc a[href^="https://www.x.com"]::after {
  content: ' \f5ef';
}

.ugc a[href^="https://youtube.com"]::after,
.ugc a[href^="https://www.youtube.com"]::after,
.ugc a[href^="https://youtu.be.com"]::after {
  content: ' \f62b';
}

.ugc a[href^="https://github.com"]::after,
.ugc a[href^="https://www.github.com"]::after {
  content: ' \f3ed';
}

.ugc a[href^="https://stackoverflow.com"]::after,
.ugc a[href^="https://www.stackoverflow.com"]::after {
  content: ' \f667';
}

.ugc a[href^="https://wikipedia.org"]::after,
.ugc a[href^="https://en.wikipedia.org"]::after {
  content: ' \f8cc';
}

.ugc a[href^="https://reddit.com"]::after,
.ugc a[href^="https://www.reddit.com"]::after,
.ugc a[href^="https://redd.it"]::after {
  content: ' \f650';
}

.ugc a[href^="https://veritula.com"]::after,
.ugc a[href^="https://www.veritula.com"]::after {
  content: ' V';
  color: var(--theme-color);
  font-size: 88%;
}

.ugc a[href^="https://substack.com"]::after,
.ugc a[href^="https://www.substack.com"]::after {
  content: ' \f8D7';
}
.idea-id {
  font-size: 95%;
}

.serif-font .idea-id {
  font-size: 85%;
}

.idea-core {
  scroll-margin-top: 2rem;
}

.footnotes hr {
  width: 10% !important;
}

.highlighted-idea {
  border: 2px solid var(--theme-color);
  margin: 0 !important;
  padding: 0.3rem 0.7rem !important;
}
.unread-notification {
  padding-right: 1rem !important;
  position: relative;
}

/* This is how Stack Overflow does rounded corners
   for the left border, along with the relative
   positioning above. */
.unread-notification:before {
  background: orange;
  border-radius: 8px;
  top: 10px;
  right: 0;
  bottom: 10px;
  content: "";
  position: absolute;
  width: 3px;
}
ins, del {
  font-family: inherit;
  border-radius: 0.2rem;
  padding: 0.2rem;
  text-decoration: none;
}

ins {
  background-color: #c5e1a5;
}

ins:before, ins:after {
  color: #6c757d;
}

ins:before, ins:after {
  content: '+';
}

ins:has(+ ins):after, /* ins that is followed by another ins */
ins + ins:before /* ins that is preceded by another ins */
{
  content: '';
}

ins:has(+ ins), del:has(+ del) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding-right: 0;
}

ins + ins, del + del {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding-left: 0;
}

del {
  background-color: #ef9a9a;
}

del:before, del:after {
  color: #6c757d;
}

del:before, del:after {
  content: '-';
}

del:has(+ del):after, /* del that is followed by another del */
del + del:before /* del that is preceded by another del */
{
  content: '';
}

.diff:empty {
  color: var(--bs-secondary-color);
  display: inline-block;
  margin: .25rem 0 .25rem;
}

.diff:empty:before {
  font-family: bootstrap-icons !important;
  content: '\f431  ';
}

.diff:empty:after {
  font-style: italic;
  content: 'No changes to the text';
  vertical-align: top;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --background-color: #f7f1e4;
  --theme-color: #dc0228;

  color-scheme: light dark;
}

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

.mh-lvh-100 {
  /* lvh to avoid flickering on mobile (as opposed to vh) */
  min-height: 100lvh;
}

a {
  text-decoration: none;
}

a:hover, a:active {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p, .text-wrap-pretty {
  text-wrap: pretty;
}

.dropdown-menu a {
  text-decoration: none;
}

.text-decoration-none {
  text-decoration: none;
}

#navbar-brand {
  margin-top: -4px !important;
  font-size: 2rem;
}

.navbar-brand {
  text-decoration: none !important;
}

.nav-link.active {
  background-color: var(--bs-primary-bg-subtle);
}

.huge {
  font-size: 20rem;
  line-height: 1;
}

.smaller {
  font-size: 14px;
}

.theme-color {
  color: var(--theme-color);
}

.theme-bg {
  background-color: #dc0228 !important;
  border-color: #dc0228 !important;
  color: #fff !important;
}

.theme-bg:hover {
  background-color: #ca0c2a !important;
  border-color: #ca0c2a !important;
}

.theme-bg:active {
  background-color: #ba0c2a !important;
  border-color: #ba0c2a !important;
}

.list-group > .idea-list-group-item.list-group-item:last-child {
  padding-bottom: 0 !important;
}

.comment-gutter {
  width: 6px;
  min-width: 6px;
  background-color: #d7d7d7;
  cursor: pointer;
}

.comment-gutter:hover {
  background-color: #a2a1a1;
}

.comment-gutter:has(~ .list-group:not(:empty)) {
  margin-top: 1rem;
}

.serif-font {
  font-family: eb-garamond, Georgia, serif !important;
}

.hyphens {
  hyphens: auto;
}

.ugc {
  font-family: eb-garamond, Georgia, serif !important;
  hyphens: auto;
}

.ugc hr {
  width: 50%;
}

.pre-wrap {
  white-space: pre-wrap;
}

blockquote {
  color: #424242;
  padding-left: 1rem;
  margin-left: 2px;
  position: relative;
}

/* This is how Stack Overflow does rounded corners
   for the left border, along with the relative
   positioning of the blockquote proper. */
blockquote:before {
  background: #dc0228; /* or maybe rgb(99, 41, 239) ? */
  border-radius: 8px;
  top: 4px;
  left: 0;
  bottom: 0px;
  content: "";
  position: absolute;
  width: 3px;
}

.blockquote-body > *:last-child {
  margin-bottom: 1.5rem !important;
}

.blockquote-footer, .blockquote-footer * {
  color: #dc0228 !important;
}

.idea-content {
  width: 768px;
}

.max-idea-content {
  max-width: 768px;
}

.fit-content {
  width: fit-content;
}

.idea-core {
  padding: 0.5rem;
  margin: -0.5rem;
}

.addresses-check-parent {
  width: 60px;
}

.badge {
  vertical-align: text-top;
}

.alert {
  width: fit-content;

  /* As opposed to Bootstrap's default 0.75rem 1.25rem */
  padding: 0.5rem .75rem;
}

.alert-success {
  border-color: #1cac3d;
}

.alert-info {
  border-color: #00bcff;
}

.alert-warning {
  border-color: chocolate;
}

.alert-danger {
  border-color: #e21d32;
}

hr {
  border-color: var(--bs-border-color);
  opacity: 1;
}

.breadcrumb {
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.cycle-link {
  vertical-align: -0.05rem;
}

.ugc code, .ugc .font-monospace {
  font-size: 0.85em;
  hyphens: none;
}

pre code {
  font-size: 0.9em !important;
}

.footnotes {
  font-size: 80%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --theme-color: #f41b41;
    --background-color: #1a1a1a;
  }

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

  #footer {
    background-color: #212529;
  }

  blockquote {
    color: #c7c7c7;
  }

  ins {
    background-color: #396804;
  }

  del {
    background-color: #880000;
  }

  ins:before, ins:after, del:before, del:after {
    color: #c4c4c4;
  }

  ol.breadcrumb {
    border: 1px solid var(--bs-primary-border-subtle);
  }

  .nav-link.active {
    border: 1px solid var(--bs-primary-border-subtle);
    margin: -1px;
  }

  a.link-primary, a.link-primary:hover {
    color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1)) !important;
    text-decoration-color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1)) !important;
  }

  .text-bg-warning a {
    color: #3e6db3;
  }

  .text-secondary {
    color: #c7c7c7 !important;
  }

  .text-success {
    color: #0ed176 !important;
  }

  .btn-outline-dark {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-border-color: var(--bs-body-color);
    --bs-btn-hover-color: var(--bs-body-color);
    --bs-btn-hover-bg: #343a3f;
    --bs-btn-hover-border-color: var(--bs-body-color);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #343a3f;
    --bs-btn-active-border-color: #fff;
  }

  .comment-gutter {
    background-color: var(--bs-secondary);
  }
}
