/* The DoR population page follows the existing RoR graph layout. */
body {
  font-family: Arial, sans-serif;
  background: #2b2b2b url('/dor_graph_media/dor-background.jpg?v=20260907-02') center / cover no-repeat fixed;
  color: #f0f0f0;
  margin: 0;
}

.dor-page-title {
  margin: 32px 12px 15px;
  color: #ffb019;
  text-align: center;
  font-size: 1.8em;
}

a {
  color: #00afff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.dor-population {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
}

.dor-observation {
  width: min(250px, 100%);
  margin: 0 auto 18px;
  font-size: 0.8em;
  line-height: 1.35;
}

.dor-status {
  display: block;
}

.dor-status[hidden] {
  display: none;
}

.dor-population[data-state="stale"] .dor-status,
.dor-population[data-state="unavailable"] .dor-status {
  color: #ffcb8a;
}

.dor-counts {
  margin: 5px 0 0;
  font-size: 0.9em;
  line-height: normal;
}

.dor-order-text {
  color: lightblue;
}

.dor-destruction-text {
  color: #ffa07a;
}

.dor-balance {
  width: 207px;
  height: 35px;
  margin: 16px auto 1px;
}

.dor-realm-bar {
  display: block;
  width: 207px;
  height: 35px;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.dor-realm-bar[hidden] {
  display: none;
}

.dor-balance-fallback {
  font-size: 0.75em;
  color: #ccc;
  line-height: 35px;
}

.dor-balance-note,
.dor-history-note {
  margin: 8px auto;
  color: #ccc;
  font-size: 0.8em;
  line-height: 1.5;
}

.dor-controls {
  text-align: center;
  margin: 0;
}

.dor-graph-label {
  font-size: 0.9em;
}

.dor-controls select {
  width: 215px;
  background: #444;
  color: #f0f0f0;
  border: 1px solid #888;
  border-radius: 4px;
  font-size: 0.9em;
  padding: 2px 4px;
  margin: 0 8px;
  text-overflow: ellipsis;
  scrollbar-width: thin;
  overflow: hidden;
  white-space: nowrap;
}

.dor-direct-link {
  font-size: 0.7em;
}

.dor-cycle {
  font-size: 0.9em;
  vertical-align: middle;
}

.dor-switch {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 14px;
  margin-left: 5px;
  vertical-align: middle;
}

.dor-switch input {
  opacity: 0;
  width: 10px;
  height: 10px;
}

.dor-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #444;
  transition: 0.4s;
  border-radius: 28px;
}

.dor-slider::before {
  position: absolute;
  content: "";
  height: 10px;
  width: 10px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  transition: 0.4s;
  border-radius: 50%;
}

.dor-switch input:checked + .dor-slider {
  background-color: #ffb019;
}

.dor-switch input:focus + .dor-slider {
  box-shadow: 0 0 2px #ffb019;
}

.dor-switch input:checked + .dor-slider::before {
  transform: translateX(11px);
}

.dor-countdown {
  min-height: 1.2em;
  margin: 5px 0 0;
  color: #aaa;
  font-size: 0.8em;
}

.dor-graph-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto;
  max-width: 1440px;
}

.dor-graph {
  flex: 1 1 calc(50% - 40px);
  min-width: 0;
  max-width: 697px;
  margin: 5px;
  text-align: center;
}

.dor-graph h2 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 0.83em 0;
  font-size: 1.5em;
}

.dor-graph img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid #444;
  border-radius: 8px;
  box-shadow: 0 4px 10px #0008;
}

.dor-graph img[hidden] {
  display: none;
}

.dor-graph-unavailable {
  padding: 70px 12px;
  margin: 0;
  border: 2px solid #444;
  border-radius: 8px;
  background: #2b2b2bbb;
  color: #ccc;
  font-size: 0.85em;
}

.dor-arrow {
  cursor: pointer;
  padding: 2px 6px;
  background: #333;
  color: #f0f0f0;
  border: 1px solid #666;
  border-radius: 2px;
  font-size: 0.3em;
  margin: 0 4px;
}

.dor-arrow:hover {
  border-color: #999;
}

.dor-footer {
  margin: 20px 12px;
  text-align: center;
  color: #ccc;
  font-size: 0.9em;
  line-height: 1.5;
}

.dor-sister-link {
  margin: 12px 0 0;
  font-size: 0.8em;
}

@media (max-width: 768px) {
  .dor-graph {
    flex: 1 1 100%;
    margin: 10px 0;
  }

  .dor-graph img,
  .dor-graph-unavailable {
    max-width: 90%;
    margin: 0 auto;
  }
}
