/* General Styles */
body {  
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  height: 100vh;
  margin: 0em;
  flex-direction: column;
  padding-left: 1%;
  padding-right: 1%;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.3;
  color: #333;
}

#general-box {
  width: 100%;
  display: flex;
  flex-direction: row;
  margin-top: 1em;
}

#general-info-box {
  width: 100%;
}

#interaction-info-container {
  display: flex;
  width: 100%;
}

#info-box {
  width: 70%;
  margin-right: 1em;
}

#altmetric-container {
  width: 30%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#graph-container {
  /*margin-top: 2em;*/
}

#chart {
  display: inline-block;
  position: relative;
  width: 100%;
}

.legend {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 2em;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-right: 1.5em;
}

.legend-item__color {
  width: 20px;
  height: 20px;
  margin-right: 0.2em;
}

/* Typography Styles */

h1 {
  font-family: 'Georgia', serif;
  font-size: 2.5em;
  font-weight: bold;
  color: #2c3e50;
  margin-top: 0;
  padding-top: 0;
  text-align: center;
  width: 100%;
  line-height: 0.5em;
}

h2 {
  font-family: 'Georgia', serif;
  font-size: 2em;
  font-weight: bold;
  color: #34495e;
  margin-bottom: 0.75em;
}

h3 {
  font-family: 'Georgia', serif;
  font-size: 1.75em;
  font-weight: bold;
  color: #4f5b66;
  margin-bottom: 0.5em;
  margin-top: 0;
}

p {
  margin-bottom: 0.5em;
  margin-top: 0;
  line-height: 20px;
}

td.title_td {
  font-family: 'Georgia', serif;
  font-weight: bold;
  color: #4f5b66;
  line-height: 18px;
}

a {
  color: #3498db;
  text-decoration: none;
  font-weight: bold;
}

a:hover, a:focus {
  color: #2980b9;
  text-decoration: underline;
}

/* Selection Styles */

.selected {
  stroke: black;
  stroke-width: 3;
}

/* Axis Styles */

.axis text {
  font-family: 'Georgia', serif;
  font-size: 10px;
  font-weight: bold;
  color: #4f5b66;
  white-space: pre-wrap;
  word-wrap: break-word;
  width: 200px; /* Adjust width as needed */
}

.axis path,
.axis line {
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
}

/* Slider Styles */

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 15px;
  border-radius: 5px;  
  background: #d3d3d3;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%; 
  background: #04AA6D;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #04AA6D;
  cursor: pointer;
}

#slider-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.slider-row {
  display: contents;
}

.slider {
  width: 100%;
}

.slider-row span {
  text-align: right;
}

/* Responsive Design */

@media (max-width: 768px) {
  #general-box {
    flex-direction: column;
  }
  #interaction-info-container, #info-box, #altmetric-container {
    width: 100%;
    margin-right: 0;
    margin-bottom: 1em;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  h1 {
    font-size: 2em;
  }
  h2 {
    font-size: 1.5em;
  }
  h3 {
    font-size: 1.25em;
  }
}

/* Dark Mode Styles */

body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 {
  color: #ffffff;
}

body.dark-mode a {
  color: #bb86fc;
}

body.dark-mode a:hover, body.dark-mode a:focus {
  color: #3700b3;
}

body.dark-mode .title_td {
  color: #e0e0e0;
}

body.dark-mode .slider {
  background: #555555;
}

body.dark-mode .slider::-webkit-slider-thumb {
  background: #bb86fc;
}

body.dark-mode .slider::-moz-range-thumb {
  background: #bb86fc;
}

body.dark-mode .altmetric-embed {
  background-color: transparent !important;
  border: none !important;
}

body.dark-mode .altmetric-embed *,
body.dark-mode .altmetric-embed .altmetric-container,
body.dark-mode .altmetric-embed .altmetric-details,
body.dark-mode .altmetric-embed .altmetric-normal-legend a,
body.dark-mode .altmetric-embed .altmetric-see-more-details a {
  color: #e0e0e0 !important;
}

body.dark-mode .altmetric-normal-legend img {
  filter: brightness(0.8);
}

body.dark-mode .altmetric-embed .altmetric-badge .altmetric-score {
  color: #e0e0e0 !important;
}

body.dark-mode .axis path,
body.dark-mode .axis line {
  stroke: #e0e0e0;
}

body.dark-mode .axis text {
  fill: #e0e0e0;
}

/* Status Colors Light Mode */

.status-NA {
  fill: #303bc9;
}

.status-EoC {
  fill: #fec44f;
}

.status-Retracted {
  fill: #e02d19;
}

/* Status Colors Dark Mode */

body.dark-mode .status-NA {
  fill: #4a6cf7;
}

body.dark-mode .status-EoC {
  fill: #ffcf70;
}

body.dark-mode .status-Retracted {
  fill: #ff4c4c;
}

/* Circle Citation Styles Light Mode */

.circle-citation.NA {
  fill: #303bc9;
}

.circle-citation.EoC {
  fill: #fec44f;
}

.circle-citation.Retracted {
  fill: #e02d19;
}

.circle-citation {
  fill-opacity: 0.3;
}

/* Circle Citation Styles Dark Mode */

body.dark-mode .circle-citation.NA {
  fill: #4a6cf7;
}

body.dark-mode .circle-citation.EoC {
  fill: #ffcf70;
}

body.dark-mode .circle-citation.Retracted {
  fill: #ff4c4c;
}

/* Stacked Bar Styles Light Mode */

.stacked-bar.NA {
  fill: #303bc9;
}

.stacked-bar.EoC {
  fill: #fec44f;
}

.stacked-bar.Retracted {
  fill: #e02d19;
}

/* Stacked Bar Styles Dark Mode */

body.dark-mode .stacked-bar.NA {
  fill: #4a6cf7;
}

body.dark-mode .stacked-bar.EoC {
  fill: #ffcf70;
}

body.dark-mode .stacked-bar.Retracted {
  fill: #ff4c4c;
}

/* Legend Circle Styles Light Mode */

.legend-circle.NA {
  fill: #303bc9;
  fill-opacity: 0.3;
}

.legend-circle.EoC {
  fill: #fec44f;
  fill-opacity: 0.3;
}

.legend-circle.Retracted {
  fill: #e02d19;
  fill-opacity: 0.3;
}

/* Legend Circle Styles Dark Mode */

body.dark-mode .legend-circle.NA {
  fill: #4a6cf7;
  fill-opacity: 0.3;
}

body.dark-mode .legend-circle.EoC {
  fill: #ffcf70;
  fill-opacity: 0.3;
}

body.dark-mode .legend-circle.Retracted {
  fill: #ff4c4c;
  fill-opacity: 0.3;
}

/* Size Legend Styles */

.legend-circle-size {
  fill: gray;
  fill-opacity: 0.3;
}

body.dark-mode .legend-circle-size {
  fill: lightgray;
  fill-opacity: 0.3;
}
