#studyHeader {
  margin-top: 5px;
  margin-left: 10px;
  background-image: url("/static/images/gems_logo-681x788.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-color: #FFF;
  height: 53px;
/*  border-bottom: 3px solid #001330; */
  padding-bottom: 3px;
  margin-bottom: 5px;
}

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

#studyHeader::before {
  display: inline-block;
  content: "GEMS";
  padding-top: 8px;
  padding-left: 54px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 3em;
  background: linear-gradient(to bottom, #0081c0, #00699d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


#productionHeader{
  background: #B2A4D4;
}

.surveyFooter {
    background-image: none;
    background-color: #0081c0;
}

.buttonWrapper {
    border: 2px solid #0081c0;
}

#progressHolder {
    color: #0081c0;
}

DIV.studyLogo {
  display: flex;
  align-items: center;
  border-bottom: 3px solid #00699d;
  height: 62px;
}

DIV.studyLogo::after {
  content: "GEMS";
  padding-left: 5px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 3em;
  background: linear-gradient(to bottom, #0081c0, #00699d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

UL.app_activation_steps LI {
  padding-bottom: 0.4em;
}

.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% - 200px); /* 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: 20.5em) {
  .progress-box.fade::after {
    opacity: 1; /* fade in only on narrow viewports */
  }
}


/*  WIDE */
@media screen and (min-width: 600px){
  #studyHeader {
    margin-left: 0px;
  }
}

H1.consentHeader {
  color: #2f5496;
  font-weight: bold;
  text-align:center;
  font-size: 1.25em;
}

span.consentHeader {
  color: #2f5496;
  font-weight: bold;
}

#consentIntro p:last-of-type {
  border-bottom: 3px solid #000;
}

H2.consent {
  color: #2f5496;
  font-size: 1.25em;
  margin-bottom: 0;
  margin-top: 1em;
}

H2.consent + P {
  margin-top: 0.5em;
}

.consent-emphasis {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.consent-lead {
  font-weight: bold;
}

UL.consent LI {
  margin-bottom: 1em;
}

#install-table-container {
  margin-bottom: 1.5em;
}



/* 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;
}

IMG.small-gem {
  height: 16px;
}


tr.session-0 td:first-child,
tr.session-1 td:first-child,
tr.session-2 td:first-child {
    position: relative;
    padding-left: 0.75em;
}

tr.session-0 td:first-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: hsl(210, 70%, 60%);
}

tr.session-1 td:first-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: hsl(40, 80%, 55%);
}

tr.session-2 td:first-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: hsl(0, 100%, 27%);
}

/* Base: allow absolute positioning */
tr[class*="line-type-"] td:last-child {
    position: relative;
    overflow: visible;   /* usually default, but keep it safe */
    padding-right: 0.75em;
}

tr.line-type-app_event td:last-child::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;             /* flush against right edge */
    width: 5px;           /* thickness of the strip */
    background-color: hsl(210, 70%, 60%);   /* blue-ish */
}

tr.line-type-experiment_status td:last-child::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 5px;
    background-color: hsl(140, 55%, 45%);   /* green-ish */
}

tr.line-type-sms_message td:last-child::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 5px;
    background-color: hsl(30, 80%, 55%);    /* orange-ish */
}

tr.line-type-app_access td:last-child::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 5px;
    background-color: hsl(0, 100%, 55%);    /* deep yellow */
}


.table-with-legends {
  display: inline-block;      /* or block, depending on layout */
}


/* Row that holds both legends */
.legends-row {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;   /* left & right corners */
  align-items: flex-start;
  font-size: 0.8rem;
}

/* Each legend: vertical stack */
.legend {
  display: flex;
  flex-direction: column;           /* stack items vertically */
  gap: 4px;
  background: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  white-space: nowrap;
}

/* Color swatches */
.legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 2px;
}

.swatch-session-primary    { background: hsl(40, 80%, 55%); }
.swatch-session-alternate  {background:  hsl(210, 70%, 60%);}
.swatch-session-pending    { background: hsl(0, 100%, 27%); }

.swatch-app-generated      { background: hsl(210, 70%, 60%); }
.swatch-back-end-generated { background: hsl(140, 55%, 45%); }
.swatch-text-message       { background: hsl(30, 80%, 55%);  }
.swatch-app-access         { background: hsl(0, 100%, 55%);  }


TABLE.gemsPpts TR TD:nth-child(7),
TABLE.gemsPpts TR TD:nth-child(8) {
  text-align: right;
}
