/* ==========================================================================
   Base Styles
   ========================================================================== */

.heading {
  color: #339af0;
  /* Modern blue */
  font-weight: 700;
}

.thesaurus_results {
  position: relative;
  left: -10px;
  /* Kept original offset */
}

/* ==========================================================================
   Filter Pane
   ========================================================================== */

.filterpane {
  display: none;
  color: #000;
  margin: auto;
  padding-bottom: 15px;
  padding-top: 15px;
}

.filtertitle {
  font-size: 12px;
  cursor: pointer;
  display: inline-block;
  color: #6c757d;
  font-weight: 600;
}

#filteroptions {
  display: none;
}

.inactivefilter {
  color: #495057;
  width: 140px;
  margin: 3px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 2px 4px;
}

.activefilter {
  color: #0056b3;
  font-weight: bold;
  width: 140px;
  margin: 3px;
  background: #e7f5ff;
  border: 1px solid #74c0fc;
  border-radius: 4px;
  padding: 2px 4px;
}

.filterbreak {
  clear: both;
}

#clearfilter button {
  cursor: pointer;
  background: #ffe3e3;
  border: 1px solid #ffc9c9;
  border-radius: 4px;
}

/* ==========================================================================
   Results
   ========================================================================== */

.res {
  position: relative;
  display: inline-block;
  cursor: pointer;
  width: calc(100% - 30px);
  vertical-align: top;
}

.res a {
  text-decoration: none;
  /* Darker text for better contrast */
}

.res:hover {
  color: #0056b3;
}

.ressyn {
  background: #ffffbb;    
  /* Minty green */
  padding-left: 3px;
}

.ressyn a {
  text-decoration: none;
}

.resant {
  background: #fff5f5;
  /* Light red */
}

.resnum {
  font-size: 10px;
  text-align: right;
  vertical-align: middle;
  color: #adb5bd;
  width: 20px;
  display: inline-block;
}

.nonefound {
  color: #e03131;
}

.nextlink,
.prevlink {
  font-size: 14px;
  margin-top: 20px;
  cursor: pointer;
  color: #0056b3;
  padding: 5px;
  font-weight: 600;
}

.nextlink {
  float: right;
}

.prevlink {
  margin-right: 2px;
  float: left;
}

.query-res {
  color: #2b8a3e;
  font-size: .9em;
  display: inline;
  padding: 3px;
  border-color: #b2f2bb;
  border-width: 2px;
  border-style: solid;
  border-radius: 5px;
  background: #ebfbee;
}

.query-res:hover {
  background: #d3f9d8;
}

.query-res-spacer {
  display: block;
  margin-top: 5px;
}

.helpline {
  display: none;
  margin-top: 5px;
  color: black;
}

/* ==========================================================================
   Tabs
   ========================================================================== */

#tabs {
  overflow: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

#tabs li {
  float: left;
  margin: .5em .5em 0 0;
}

#tabs a {
  position: relative;
  background: #f8f9fa;
  background-image: linear-gradient(to bottom, #fff, #f8f9fa);
  padding: .4em 0.5em;
  float: left;
  text-decoration: none;
  color: #868e96;
  font-size: 12px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
  border-radius: 5px 0 0 0;
  box-shadow: 0 2px 2px rgba(0, 0, 0, .1);
}

#tabs a:focus,
#tabs a:focus::after {
  background: #fff;
}

#tabs a:focus {
  outline: 0;
  color: #000;
}

#tabs a::after {
  content: '';
  position: absolute;
  z-index: 1;
  top: 0;
  right: -.5em;
  bottom: 0;
  width: 1em;
  background: #f8f9fa;
  background-image: linear-gradient(to bottom, #fff, #f8f9fa);
  box-shadow: 2px 2px 2px rgba(0, 0, 0, .1);
  transform: skew(10deg);
  border-radius: 0 5px 0 0;
}

#tabs #current a,
#tabs #current a::after {
  background: #ffffff;
  color: #0056b3;
  z-index: 2;
  font-weight: 600;
}

/* ==========================================================================
   Content & Definitions
   ========================================================================== */

#content {
  display: none;
  padding: 0.5em;
  position: relative;
  z-index: 2;
  border-radius: 0 5px 5px 5px;
  box-shadow: 0 -1px 3px -2px rgba(0, 0, 0, .1);
  background: #f5f7ff;
  color: black;
}

.content-with-viz {
  border: none;
  box-shadow: none !important;
}

.more-info {
  padding: 15px 0 0 0 !important;
  left: 30px !important;
  top: 12px;
  z-index: 100;
  display: none;
  opacity: 0;
  line-height: 18px;
  transition: opacity 3s linear 3s;
  position: absolute;
}

.more-info-no-defs {
  width: auto;
}

.more-info-selected {
  display: inline;
  opacity: 1;
  padding: 15px 0 0 15px;
  box-sizing: border-box;
}

.thes_defs ul {
  list-style-type: none;
  margin: 0;
  padding: 10px 0 0 0;
}

.thes_defs li {
  list-style-position: inside;
  text-indent: -1.25em;
  padding-left: 1.25em;
  padding-bottom: 5px;
}

.thes_defs_marker_with_sense:hover {
  background: #fff3cd;
}

.defgloss_selected {
  background: #fff3cd;
}

.thes_defattrib {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 0.8em;
  color: #868e96;
}

.thes_defmorewords {
  font-size: 0.8em;
}

.helpstring {
  font-size: 0.8em;
  color: #868e96;
}

/* ==========================================================================
   Usage Graph
   ========================================================================== */

.thes-usage-span {
  box-sizing: border-box;
  position: relative;
  height: 7em;
  margin-top: 10px;
  display: inline-block;
}

.thes-usage-span>.graph {
  box-sizing: border-box;
  height: 100%;
  border: 1px solid #dee2e6;
  padding: 0.5em;
  background: #f8f9fa;
}

.test-thes-centering {
  text-align: center;
}

.thes-usage-helpstring {
  font-size: 0.8em;
  color: #868e96;
}

.negative-space {
  opacity: 0;
}

.bar {
  fill: #69db7c;
}

.bar.select {
  fill: #ffd43b;
  stroke: #fab005;
  stroke-width: 0.1px;
  stroke-dasharray: 0.3 0.3;
}

.baseline {
  stroke-width: 0.1px;
  pointer-events: none;
}

.baseline.show {
  stroke: #495057;
}

.tooltip {
  position: absolute;
  border: 1px solid #dee2e6;
  padding: 0.5em;
  background-color: white;
  font-size: 1em;
  display: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.tooltip.show {
  display: block;
}

/* ==========================================================================
   Popover
   ========================================================================== */

.popover {
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  gap: 10px;
  max-height: 800px;
  min-width: 450px;
  overflow-y: scroll;
  background: #fdfdf7;
  color: #212529;
  border: 2px solid #dee2e6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.close_btn {
  background-color: transparent;
  border: none;
  padding: 0;
  position: absolute;
  top: 5px;
  left: 5px;
  color: #adb5bd;
  cursor: pointer;
}

/* ==========================================================================
   Quick Links
   ========================================================================== */

.thes_ql {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin: auto;
  margin-bottom: 0px;
}

.ql_btn {
  box-sizing: border-box;
  font-size: 1em;
  display: inline-block;
  color: #495057 !important;
  padding: 4px;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  text-decoration: none;
  background: white;
}

.ql_btn:hover {
  color: #0056b3 !important;
  background-color: #e7f5ff;
  border-color: #74c0fc;
}

/* ==========================================================================
   Usage Examples
   ========================================================================== */

.thes-usage-examples ul {
  list-style-type: none;
  margin: 0;
  padding: 10px 0 0 0;
}

.thes-usage-examples li {
  padding: 0 0 5px 0;
}

.thes-usage-examples a {
  font-size: 0.8em;
  color: #495057;
}

.thes-usage-examples a:before {
  content: "\2014\0020";
  color: #adb5bd;
}

.thes-more-examples {
  align-self: flex-end;
}

/* ==========================================================================
   Miscellaneous
   ========================================================================== */

.meter_btn_selected {
  background: #e7f5ff;
  cursor: pointer;
}

.meter_btn_unselected {
  background: #ffffff;
  cursor: pointer;
}

#meterdoc {
  width: 90%;
  font-size: 14px;
  padding: 10px 15px;
  margin: 30px 0px 0px 0px;
  border-radius: 5px 5px 5px 5px;
  border: 2px solid #dee2e6;
}

.wke_sentence {
  cursor: text !important;
}

.topcluster-hover {
  background: #e7f5ff !important;
}

.thesaurus-top-gloss-selected {
  background: #fff3cd;
}

.thesaurus-top-gloss:hover {
  background: #fff3cd;
  cursor: pointer;
}

.activesort .ui-selectmenu-text {
  background: #e7f5ff;
}

.olthes_usage_help_startyear {
  display: inline-block;
  width: 70px;
  text-align: left;
  font-weight: bold;
}

.olthes_usage_help_endyear {
  display: inline-block;
  width: 70px;
  text-align: right;
  font-weight: bold;
}

.olthes_usage_help_title {
  margin: auto;
  margin-top: 10px;
  display: block;
  text-align: center;
}

.olthes_usage_help_firstyear {
  display: block;
  text-align: center;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

@media screen and (max-width: 500px) {

  .inactivefilter,
  .activefilter {
    width: 140px;
  }

  .popover {
    max-width: 300px;
    min-width: 300px;
  }

  .res {
    font-size: 1.2em;
  }
}
