
/* Consistent styles for input and select elements */
input, select {
  font-size: 0.8rem;
  padding: 0.25em 0.75em;
  border: 1px solid #bbb;
  border-radius: 6px;
  background: #f8f8fa;
  color: #222;
  margin: 0.25em 0.5em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  border-color: #352779;
  box-shadow: 0 0 0 2px #e0d7ff;
}

input::placeholder {
  color: #888;
  opacity: 1;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23352779" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.75em center;
  background-size: 1em;
  padding-right: 2em;
}
.rd-bar {
  display: block;
  height: 12px;
  background: #4caf50;
  border-radius: 4px;
  margin-bottom: 4px;
  transition: width 0.3s;
}
.rd-bar.negative {
  background: #f44336;
  margin-left: 0;
  margin-right: 0;
  align-self: flex-end;
}
 .rd-bar.negative {
   float: right;
   direction: rtl;
 }
.rank-divergence-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  /* ...existing code... */
}
 .rd-bar.negative {
   float: right;
   direction: rtl;
   text-align: right;
 }
:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  background-color: #ffffff;
  color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --uvm-green: #164734
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  padding: 20px;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

/* style for input elements */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: 1em;
  background-color: white;
  color: black;
}

#app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vanilla:hover {
  filter: drop-shadow(0 0 2em #f7df1eaa);
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

button {
  color: white;
  border: 1px solid transparent;
  padding: 0.3em 0.9em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: var(--uvm-green);
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

#wiki-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1em;
  margin-top: 2em;
  min-height: 600px;
}

.wiki-preview {
  border: 0.5px solid gray;
  padding: 6px;
}

.img-placeholder {
  background-color: gray;
  height: 100px;
  width: 100%;
}

.hard-drop-shadow {
  box-shadow: 5px 5px 0px #888888;
  border: 3px solid #292929;
}
#wiki-previews .wiki-preview:hover {
  background-color: #f3f3f3;
}

#wiki-thumb-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  /* center the grid */
  justify-content: center;
  gap: 1em;
  margin-top: -1em;
  margin-bottom: -1em;
  padding: 20px
}

#wiki-thumb-previews img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

#wiki-thumb-previews .article-preview {
  cursor: pointer;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
}

#wiki-thumb-previews .article-preview.expanded {
  max-height: 200px; /* Adjust as needed for the content */
}

.color-circle {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 0.5em;
}

#ngram-search {
  margin-bottom: 2em;
  width: 100%;
  height: 30px;
  padding: 10px
}

.preview-highlight {
  background-color: #a7a7a7;
  border: #242424;
}

.y-axis-label {
  -webkit-text-fill-color: white; /* Or any desired color */
  -webkit-text-stroke-width: 1px; /* Adjust the width as needed */
  -webkit-text-stroke-color: white;
}

.outline-label {
    font-size:  14px;
    paint-order: stroke;
    stroke: #f3f3f3;
    stroke-width: 1px;
    stroke-linecap: butt;
    stroke-linejoin: miter;
    font-weight: 800;

}

.chart-tooltip {
  position: absolute;
  background-color: white;
  color: black;
  border: 2px solid #000;
  padding: 10px;
  font-size: 16px;
  font-family: 'Courier New', Courier, monospace; /* Retro font style */
  box-shadow: 5px 5px 0px #888888; /* Hard drop shadow for retro feel */
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}

#rank-divergence-container {
  display: flex;
  gap: 20px; /* Optional: Add spacing between items */
  margin-top: 20px;
  font-size: 14px
}

#pos-rd-list {
  color: #474747;
  flex: 1 1 50%; /* Two columns */
}

#neg-rd-list {
  color: #352779;
  flex: 1 1 50%; /* Two columns */
}

.rank-divergence-line {
  flex: 1 1 calc(19% - 4px); /* Three items per row with spacing */
  box-sizing: border-box;
  padding: 4px;
  background-color: #f6f6f6;
  border-radius: 4px;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  margin-bottom: 8px
}

.read-on-wiki {
  display: inline-flex;
  align-items: center;
  margin-top: 0px;
  color: #646cff;
  text-decoration: none;
  font-size: 0.8em;
}

.read-on-wiki::after {
  content: "↗";
  font-size: 0.8em;
  margin-left: 0.2em;
  vertical-align: middle;
}
