body {
  font-family: 'Open Serif', serif;
  font-size: 16px;
  margin: 0;
  padding: 0;
  background-color: #ceeff6; /* Light cyan for the main background */
  color: #333; /* Slightly softer than pure black */
  box-sizing: border-box;
}

a, a:visited {
  color: #d02929; /* Electorama red */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

#content {
  max-width: calc(100vw - 20vw); /* 1 vw is 1% of the viewport's width */
  margin: 20px auto;
  padding: 20px;
  background-color: #fff; /* White background for content */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
  border: 2px solid #d02929; /* Electorama red border */
}

header {
  background: #ceeff6;
  padding: 10px 0;
  text-align: center;
  border-bottom: 2px solid #d02929;
  background-image: linear-gradient(180deg, #97dbec 1px, transparent 1px),
                    linear-gradient(180deg, #ceeff6 1px, transparent 1px);
  background-size: 100% 5px; /* Creates horizontal pinstripes */
}

header img {
  max-height: 60px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  border: 1px solid #ddd;
  padding: 8px;
}

th {
  background-color: #d02929;
  color: #fff;
}

input[type="submit"] {
  background-color: #d02929;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

input[type="submit"]:hover {
  background-color: #bb2525;
}

#submitButton.throbbing {
  animation: throb 0.5s ease-in-out infinite alternate;
}

@keyframes throb {
  from { background-color: #d02929; }
  to { background-color: #821b1b; }
}

.example-section {
  display: flex;
}

textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

textarea.examplearea {
  background-color: #fff0f0;
  border: 1px dashed #333;
  float: right;
  width:100%;
  margin:5px 0;
  padding:3px;
}

.exampleareacontainer {
  padding-right: 8px;
}

pre {
  white-space: pre-wrap; /* Allows text to wrap within container */
  overflow-x: auto; /* Provides a horizontal scrollbar if needed */
  background-color: #f8f8f8; /* Light background for the pre element */
  border: 1px solid #ddd; /* Border to match other inputs */
  padding: 10px;
  margin: 0 20px 20px 20px; /* Margin to match the #content padding */
}

@media (min-width: 768px) {
  #content {
    margin: 20px auto;
  }
}

.hscroll {
  overflow-x: auto;
  width: 100%;
}

.vscroll {
  height: 22.5em;
  overflow-y: auto;
}

svg {
  max-width: 100%;
  height: auto;
}

.scaletable {
  transform: scale(0.8);
  transform-origin: top left;
  width: 125%;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

#abifbox {
  display: none;
}

#abifbox.active {
  display: block;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  float: right;
  width: 99%;
  padding-left: 1%;
}

.tab-links {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
  float: left;
}

.tab-links li {
  /* display: inline-block; */
  margin-right: 10px;
  padding: 8px 15px;
  border: 1px solid #ddd;
  border-right: none;
  background-color: #f5f5f5;
  cursor: pointer;
  width: 150px;
}

.tab-links li.active {
  background-color: #fff;
  border-bottom: 1px solid #fff;
}

.hatnote {
    margin-top: -1.2rem;
    font-size: smaller;
    margin-left: 2rem;
}

.election-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-right: 2em;
}

.election-id {
  /* Optional: add left-side styling if desired */
}

.election-tags {
  font-size: 85%;
  color: #aaa;
  text-align: right;
  min-width: 80px;
  margin-left: 1em;
}
