/* ===== Intro Stage Styling (for future reuse) ===== */
#intro-stage {
  background: #eef4fb;
  border-left: 6px solid #007ACC;
  padding: 32px;
  border-radius: 8px;
  max-width: 800px;
  margin: 32px auto;
}

#intro-stage h2 {
  margin-top: 0;
}

#intro-stage p {
  font-size: 1.1rem;
  line-height: 1.5;
}
body {
  font-family: sans-serif;
  padding: 20px;
  background-color: #f9f9f9;
}

.container {
  max-width: 800px;
  margin: auto;
  padding-bottom: 60px; /* Reduced from 60px to prevent excess spacing under first stage */
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.option {
  padding: 0 !important;
  margin: 0;
  border: none;
  background: none;
  height: auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
  border-radius: 27px;
}

.option img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0px;
  margin: 0;
  padding: 0;
  object-fit: contain;
  image-rendering: optimizeQuality;
}

.option .card-text {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8px;
  font-size: 0.95rem;
  line-height: 1.2em;
  max-height: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.option .info-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  font-weight: bold;
  color: #333;
  cursor: help;
  font-size: 0.85rem;
  line-height: 1;
}

.option.selected {
  background-color: #007bff;
  color: white;
  border: 4px solid #0056b3;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
  border-radius: 26px;
  overflow: hidden;
}

.option:hover {
  transform: scale(1.02);
}

button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1em;
  background-color: #007ACC;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #005fa3;
}

button:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
}

.maxdiff-container {
  display: block;
  margin-top: 0;
}

#maxdiff-pool {
  max-width: 400px; /* or 480px or whatever suits your layout */
  margin: 0 auto;
}

.selection-column {
  width: 50%;
}

.grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 18px;
  /* border: 2px dashed #ccc;
  border-radius: 8px; */
  box-sizing: border-box;
}

.dropzones-column {
  display: flex;
  flex-direction: row;
  gap: 24px;
}

.dropzone {
  width: 200px;
  height: 200px;
  border: 2px dashed #ccc;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* font-style: italic; */
  background-color: #fdfdfd;
}

.dropzone .option {
  height: 100% !important;
  max-height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .maxdiff-container {
    display: block;
    margin-top: 0;
  }

  .selection-column,
  .dropzones-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .dropzones-column {
    flex-direction: column;
    gap: 24px;
    margin-bottom: 48px;
  }

  .grid-2x2 {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 16px;
    padding: 18px;
    margin-bottom: 24px;
    box-sizing: border-box;
  }

  .dropzone {
    width: 90%;
    max-width: 300px;
    height: 180px;
  }

  .option {
    width: 100%;
    min-height: 170px;
    height: 170px;
    max-height: 170px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .option .card-text {
    font-size: 0.9rem;
    padding: 0 4px;
    max-height: 120px;
  }

  #nextSetBtn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
}
  #maxdiff-pool {
    margin-bottom: 16px;
  }
  .selection-column {
    padding-bottom: 16px;
  }
@media screen {
  .only-print {
    display: none;
  }
}

@media print {
  .only-print {
    display: block;
  }
}
.dropzone .option img {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
/* ===== Tap-based MaxDiff Support ===== */
.tap-select-option {
  display: block;
  width: 100%;
  border: 2px solid #ccc;
  border-radius: 16px;
  cursor: pointer;
  position: relative;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.tap-select-option img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  margin: 0;
  padding: 0;
}

.tap-select-option::before {
  content: attr(data-label);
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.tap-best::before,
.tap-worst::before {
  opacity: 1;
}

.tap-best {
  border: 4px solid #28a745 !important; /* green */
}

.tap-worst {
  border: 4px solid #dc3545 !important; /* red */
}

/* Add margin-bottom to ensure the download button is not blocked by the fixed footer */
#downloadPdfBtn {
  margin-bottom: 80px;
}

#cx-assessment-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #000;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.75rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 1000;
}

#cx-assessment-btn:hover {
  background-color: #222;
}
/* Extra tactic description styling and stage badge */
ul li .tactic-desc {
  display: block;
  margin-top: 8px;
  margin-bottom: 8px;
  margin-left: 1em;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.5;
}

ul li::marker {
  color: #666;
}

.stage-badge {
  background-color: #e0e0e0;
  color: #333;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 1rem;
  display: inline-block;
  margin: 8px 0;
}

.footer-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  left: 0;
  background-color: rgba(240, 240, 240, 0.985);
  color: #333;
  text-align: center;
  padding: 10px 0;
  font-size: 0.85rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #ccc;
  z-index: 999;
}

.footer-bar .footer-logo {
  height: 20px;
  width: auto;
  vertical-align: middle;
}
/* Ensure bottom padding so buttons aren't hidden by the fixed footer */
#maxdiff-stage,
#results-stage-wrapper {
  padding-bottom: 0px; /* Prevents footer from overlapping content and keeps "Next" button visible above the footer */
}


/* Hide footerBar on mobile devices */
@media screen and (max-width: 768px), screen and (max-device-width: 768px) {
  #footerBar {
    display: none !important;
  }
}

.card-wrapper {
  position: relative;
}

.card-wrapper .tooltip-box {
  display: none;
  position: absolute;
  top: 30px;
  right: 8px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  max-width: 220px;
  font-size: 14px;
  z-index: 10;
}

/* Hover Button */

.info-icon-svg {
  opacity: 0.25;
  transition: opacity 0.3s ease;
}

.info-icon-svg:hover {
  opacity: 1;
}

.info-icon-svg {
  cursor: pointer;
}

/* No visual effect for screen, but used for print page-break control */

@media print {
  img {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .option,
  .result-card,
  .tap-select-option,
  .maxdiff-container > div,
  .selection-column,
  .dropzones-column {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  h2, h3, p {
    page-break-after: avoid;
    break-after: avoid;
  }

  #results-stage-wrapper > div {
    page-break-inside: avoid;
  }

  .pdf-block {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}
/* Page break for PDF/print and HTML structure */
.page-break {
  page-break-before: always;
  break-before: always;
}


#graphs > div {
  flex: 1 1 auto;
  min-height: 620px;
}

/* Logo */

.cx-fundamentals-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 140px;
  margin-bottom: 20px;
  font-family: sans-serif;
  font-size: 0.75rem;
  color: #000;
}

.color-blocks {
  display: flex;
  gap: 5px;
  margin-bottom: 6px;
}

.color-block {
  width: 20px;
  height: 20px;
  border-radius: 3px;
}

/* Individual colors */
.trust { background-color: #66c2a5; }
.personalisation { background-color: #8da0cb; }
.efficiency { background-color: #a6d854; }
.empowerment { background-color: #e78ac3; }
.ease { background-color: #fc8d62; }
.loyalty { background-color: #FFC708; }

/*
.cx-fundamentals-footer {
  position: fixed;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
}
*/

/* Integrate - Positioning Cop */

.term-alignment-box {
  background: #fff8e1;
  border-left: 6px solid #ffb300;
  padding: 32px;
  border-radius: 8px;
  max-width: 800px;
  margin: 32px auto;
  font-family: sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
}

.term-category-heading {
  margin-top: 16px;
  font-weight: 600;
}

.term-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.term-column {
  flex: 1 1 250px;
  padding: 16px;
  border-radius: 6px;
}

.primary-terms {
  background: #f1f8e9;
}

.secondary-terms {
  background: #e3f2fd;
}

.term-subtitle {
  margin: 0 0 8px 0;
  font-weight: 600;
}

.term-footer {
  margin-top: 16px;
  font-size: 0.9rem;
  color: #666;
}

.term-column ul {
  margin: 0;
  padding-left: 20px;
}

.term-alignment-box p {
  max-width: 700px;
}

/* --- CX Cards notice (intro only) --- */
.cards-notice {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: center;
  border: none;
  border-left: none;
  border-radius: 8px;
  padding: 32px;
  margin: 32px auto;
  box-shadow: none;
  max-width: 800px;
  box-sizing: border-box;
}
.cards-notice h4 { margin: 0 0 6px 0; font-size: 1.05rem; }
.cards-notice p {
  margin: 0 0 16px 0;
  color: #2f4158;
  line-height: 1.5;
  font-size: 0.95rem; /* slightly smaller */
}
.cards-notice a.cards-cta {
  display: inline-block;
  text-decoration: none;
  background-color: #007ACC;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
}
.cards-notice a.cards-cta:hover {
  background-color: #005fa3;
}
.cards-notice small {
  display: block;            /* put it on its own line */
  margin-top: 10px;          /* add space away from the button */
  margin-left: 0;            /* reset previous left offset */
  color: #6b7c93;
  font-size: 0.85rem;        /* a little smaller */
}


.cards-notice figure {
  margin: 0;
  width: 200px;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
}

.cards-notice figure img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain; /* show full image inside 120×120 without cropping */
}

.cards-notice svg { width: 100%; height: 100%; display: block; }



@media (max-width: 560px) {
  .cards-notice a.cards-cta { display:block; width:100%; text-align:center; }
}

/* Video pair layout (side-by-side on desktop, stacked on mobile) */
.video-pair {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.video-pair iframe {
  aspect-ratio: 16 / 9; /* maintain YouTube 16:9 */
  width: 360px;         /* desktop size */
  height: auto;         /* let height follow aspect-ratio */
  border: 0;
  border-radius: 6px;
  max-width: 100%;
}

@media (max-width: 820px) {
  .video-pair iframe {
    width: 100%;       /* full-width stack on small screens */
    max-width: 480px;  /* comfortable cap */
  }
}