.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: none; /* Anfangszustand: versteckt */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-box {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  align-items: right;
  text-align: right;
}

.popup-close {
  /*position: absolute;*/
  /*top: 10px;
  right: 20px;*/
  cursor: pointer;
  font-size: 1.5em;
}

#popup-text {
  text-align: center;
}

/*New pop up idea: Only appear on the side after submitting feedback, because it may be annoying to close the pop up every time the user submits feedback*/
.side-popup {
  position: fixed;               /* stays while scrolling */
  right: 1.5rem;                 /* distance from right edge */
  top: 1.5rem;                   /* distance from top edge – change to bottom if you prefer */
  max-width: 300px;
  background: #323232;
  color: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  font-family: system-ui, sans-serif;
  line-height: 1.4;
  overflow: hidden;              /* hide the timer bar when it shrinks */
  opacity: 0;
  transform: translateX(20px);   /* slide in from the right */
  transition: opacity .3s ease, transform .3s ease;
  z-index: 1000;
}

/* Visible state */
.side-popup.show {
  opacity: 1;
  transform: translateX(0);
}

/* Fade‑out state */
.side-popup.hide {
  opacity: 0;
  transform: translateX(20px);
}

/* -------------------------------------------------
    Close icon (×)
    ------------------------------------------------- */
.side-popup .close {
  position: absolute;
  top: .4rem;
  right: .5rem;
  font-size: 1.2rem;
  color: #ddd;
  cursor: pointer;
}
.side-popup .close:hover { color: #fff; }

/* -------------------------------------------------
    Timer bar – sits at the very top of the popup
    ------------------------------------------------- */
.side-popup .timer-bar {
  position: absolute;
  top: 0; left: 0;
  height: 4px;                 /* thickness of the bar */
  background: #ffcc00;         /* colour – change to match your brand */
  width: 100%;                 /* starts full */
  transition: width linear;    /* width will be animated by JS */
}

/* -------------------------------------------------
    Content area (adds a little padding so text
    doesn't sit under the timer bar)
    ------------------------------------------------- */
.side-popup .content {
  padding: 1rem 1.2rem;
  margin-top: 4px;             /* space for the timer bar */
}