MediaWiki:Gadget-owidslider.css

/* 2025-08-09 Forked from https://mdwiki.org/wiki/MediaWiki:Gadget-owidslider.css (Creative Commons Attribution-ShareAlike 3.0 and 4.0 International Public License) */
@media print {

  html .OWIDSlider-play,
  #OWIDSliderLoading {
    display: none
  }
}

.OWIDSlider-viewer {
  text-align: center;
}

.OWIDSlider-caption {
  margin-top: 0.2em;
}

.OWIDSliderSVGContainer {
  height: 100%; /* js sets an aspect-ratio which makes this work */
  max-width: 100%;
}

.OWIDSlider-viewer #details-popup {
  text-align: start;
  z-index: 3;
}

.OWIDSlider-play {
  background: transparent;
  font-size: 300%;
  cursor: pointer;
  text-align: center;
  user-select: none;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 70px;
  height: 70px;
  display: inline-block;
  line-height: 1.5;
  border: 0;
  padding: 0;
}

.OWIDSlider-play .circle {
  fill: rgba(128, 128, 128, 0.9)
}
.OWIDSlider-play .triangle {
  fill: white
}

.OWIDSlider-play:hover .circle {
  fill: rgba(169, 169, 169, 0.9);
}
.OWIDSlider-play:hover .triangle {
  fill: black;
}

.OWIDSlider-play:active .triangle {
  fill: red;
}

.OWIDSlider-loading {
  cursor: wait;
}

.OWIDSliderCredit {
  text-align: center;
  font-size: small;
  margin: auto;
  box-sizing: border-box;
}

.OWIDSliderSliderContainer {
  text-align: center;
  width: 100%;
}

.OWIDSliderSlider {
  position: relative;
  display: inline-block;
  vertical-align: sub;
  width: calc(75% - 8em);
  margin-left: 1em;
  margin-right: 1em;
}

.OWIDSliderSlider input {
  width: 100%;
}

.OWIDSliderSliderYearPopup {
  position: absolute;
  top: -2.2em;
  background-color: black;
  color: white;
  padding: 5px;
  border-radius: 5px;
  opacity: 0.8;
}

@media (max-width: 600px) {

  .OWIDSliderSlider {
    width: calc(100% - 8em);
    margin-left: 0.5em;
    margin-right: 0.5em;
  }
  .OWIDSliderSVGContainer {
	position: relative;
	z-index: 2;
  }
}

.OWIDSliderImgContainer {
  text-align: center;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#OWIDSliderLoading {
  position: fixed;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  padding-left: 1em;
  padding-right: 1em;
  bottom: 1em;
  right: 1em;
  background-color: #fda;
  color: black;
  border: thin black solid;
  z-index: 10000;
}

.OWIDSliderDialog .oo-ui-messageDialog-text {
  box-sizing: border-box;
  height: 100%;
}

#OWIDSliderViewSelector {
  /* position: absolute; */
  /* right: 5%; */
  font-size: 1.25em;
}

.OWIDSlider-country-back {
  background: #36c;
  border-color: #36c;
  color: white;
  padding: 5px 10px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
}

.OWIDSlider-country-back:hover {
  background-color: #447ff5;
  outline: 1px solid transparent;
}

.owid-select-container {
  position: relative;
  width: 250px;
  display: inline-block;
  margin-top: 20px;
  margin-bottom: 20px;
}

.owid-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #c4c4c4;
  border-radius: 4px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  background-color: var(--background-color-interactive, white);
  color: var(--color-base, black);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.owid-select:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.owid-select:hover {
  border-color: rgba(0, 0, 0, 0.87);
}

.owid-select-label {
  position: absolute;
  left: 8px;
  top: 16px;
  color: #1976d2 ;
  padding: 0 4px;
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
  transition: 0.2s ease all;
  background-color: var(--background-color-interactive, white);
}

.owid-select:focus~.owid-select-label,
.owid-select:not([value=""]):valid~.owid-select-label {
  top: -8px;
  font-size: 12px;
  color: #1976d2;
}

.owid-select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(0, 0, 0, 0.54);
}

.owid-select:focus~.owid-select-arrow {
  border-top: 5px solid #1976d2;
}

.owid-helper-text {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
}


.OWIDSliderDialog .oo-ui-messageDialog-message,
.OWIDSliderDialog .oo-ui-messageDialog-message .OWIDSlider-viewer,
.OWIDSliderDialog .oo-ui-messageDialog-message .OWIDSlider-viewer .OWIDSliderImgContainer {
  height: 100%;
}