/* Qountdown - time bar stacked on the RevealJS progress bar. */

.reveal .qountdown {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  z-index: 10;
  background: var(--qountdown-track-color, rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.reveal .qountdown-bar {
  width: 0;
  height: 100%;
  background-color: var(--qountdown-color, #f0a202);
  transition: width 0.3s linear, background-color 0.4s ease;
}

.reveal .qountdown.is-warning .qountdown-bar {
  background-color: var(--qountdown-warning-color, #f25c05);
}

.reveal .qountdown.is-overtime .qountdown-bar {
  background-color: var(--qountdown-overtime-color, #d7263d);
  animation: qountdown-pulse 1.4s ease-in-out infinite;
}

.reveal .qountdown.is-paused .qountdown-bar {
  opacity: 0.45;
}

@keyframes qountdown-pulse {
  50% { opacity: 0.3; }
}

/* The clock. Corner and offsets are set by the plugin; the modifier classes
   (--bl, --br, --tr, --tl) are there for your own CSS. */
.reveal .qountdown-label {
  position: absolute;
  z-index: 11;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--r-main-font, sans-serif);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0.75;
  pointer-events: none;
}

.reveal .qountdown-label.is-paused {
  opacity: 0.4;
}

.reveal .qountdown-label.is-overtime {
  background: var(--qountdown-overtime-color, #d7263d);
  opacity: 1;
}

/* Duration prompt: press `M`, type the minutes, Enter. Hidden until then. */
.reveal .qountdown-prompt {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 12;
  display: none;
  align-items: baseline;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 4px;
  font-family: var(--r-main-font, sans-serif);
  font-size: 22px;
  line-height: 1.4;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
}

.reveal .qountdown-prompt.is-open {
  display: flex;
}

.reveal .qountdown-prompt input {
  width: 3em;
  margin: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--qountdown-color, #f0a202);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
  outline: none;
  box-shadow: none;
}

.reveal .qountdown-prompt input::placeholder {
  color: currentColor;
  opacity: 0.35;
}

.reveal .qountdown-prompt-unit {
  font-size: 0.7em;
  opacity: 0.6;
}

@media print {
  .reveal .qountdown,
  .reveal .qountdown-label,
  .reveal .qountdown-prompt { display: none; }
}
