#studyHeader {
  position: relative;
  display: flex;
  align-items: center;
}

.logo-box {
  width: 330px;
  height: 62px;
  background-image: url("/static/images/actonvaping_logo-330x53.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: left center;
  flex-shrink: 0;
}

.progress-wrapper {
  position: absolute;
  top: 50%;
  right: 1em;
  transform: translateY(-50%);
  background: rgb(255, 255, 204, 0.85);
  border: 2px solid #999;
  border-radius: 999px;
  padding: 0.0em 0.3em 0.0em 0.3em;
  overflow: hidden;
  max-width: calc(100% - 350px); /* keep off the logo */
  min-width: 2em;
  white-space: nowrap;
}

.progress-box {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
}

.progress-text {
  display: inline-block;
  white-space: nowrap;
  font-weight: bold;
}

.progress-box.fade::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 2em;
  height: 100%;
  background: linear-gradient(to right, transparent, #ffffcc);
  pointer-events: none;
  opacity: 0; /* default: invisible */
  transition: opacity 0.2s ease-in-out;
}

@media (max-width: 33em) {
  .progress-box.fade::after {
    opacity: 1; /* fade in only on narrow viewports */
  }
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  font-family: system-ui, sans-serif;
}

/* Modal card */
.modal-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  width: min(420px, 90%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  animation: modal-fade-in 0.15s ease-out;
}

/* Smooth entry */
@keyframes modal-fade-in {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Header and body text */
.modal-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #222;
}

.modal-card p {
  color: #444;
  font-size: 0.95rem;
  margin: 0 0 0.75rem 0;
}

/* Textarea */
.modal-card textarea {
  width: 100%;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.5rem;
  resize: vertical;
  margin-bottom: 1rem;
}

/* Buttons */
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-buttons button {
  border: 0;
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.modal-buttons .confirm {
  background-color: #1976d2;
  color: #fff;
}

.modal-buttons .confirm:hover {
  background-color: #1565c0;
}

.modal-buttons .cancel {
  background-color: #e0e0e0;
  color: #333;
}

.modal-buttons .cancel:hover {
  background-color: #d5d5d5;
}

