  /*Text in Viewer Page*/
  .visualizer h2,
  .visualizer p,
  .visualizer h3 {
    text-align: center;
  }
  
/*Viwer function*/

  /* Skin Tone Swatches */
/* Swatches */


.swatch.light { background: #F7E7CE; }
.swatch.olive { background: #D2A679; }
.swatch.medium { background: #8B5C30; }
.swatch.dark { background: #4B3621; }

.swatches {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 1rem 0;
}

.swatch {
  width: 96px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid #ccc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15); /* Adds soft shadow */
  position: relative; /* Needed for checkmark */
  transition: all 0.3s ease;
}
  .swatch:hover {
      transform: scale(1.05); /* Slightly enlarges on hover */
  }
  .swatch.selected {
      border: 2px solid #614ede; /* Purple border when selected */
    }


    
/* Swatches */
.swatches {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 1rem 0;
  }
  
  .swatch {
    width: 96px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    position: relative;
    transition: all 0.3s ease;
  }
  .swatch:hover { transform: scale(1.05); }
  .swatch.selected { border: 2px solid #614ede; }
  
  .swatch.light { background: #F7E7CE; }
  .swatch.olive { background: #D2A679; }
  .swatch.medium { background: #8B5C30; }
  .swatch.dark { background: #4B3621; }
  
  /* keep tone row off the edges on phones*/
@media (max-width: 480px){
  .skin-tone { padding-inline: 16px; }
  .skin-tone .swatches{ justify-content: space-between; }
  .severity { padding-inline: 16px; }
  .severity-buttons{ justify-content: space-between; }
  .region { padding-inline: 16px; }
  .region-buttons{ justify-content: space-between; }
}

  /* Gooey checkbox */
  .checkbox-wrapper-12 { position: relative; }
  .checkbox-wrapper-12 > svg { position: absolute; top: -130%; left: -170%; width: 110px; pointer-events: none; }
  .checkbox-wrapper-12 * { box-sizing: border-box; }
  .checkbox-wrapper-12 input[type="checkbox"] {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer; margin: 0;
  }
  .checkbox-wrapper-12 input[type="checkbox"]:focus { outline: 0; }
  .checkbox-wrapper-12 .cbx { width: 24px; height: 24px; position: relative; }
  .checkbox-wrapper-12 .cbx input {
    position: absolute; top: 0; left: 0;
    width: 24px; height: 24px;
    border: 2px solid #bfbfc0; border-radius: 50%;
  }
  .checkbox-wrapper-12 .cbx label {
    width: 24px; height: 24px; background: none; border-radius: 50%;
    position: absolute; top: 0; left: 0;
    transform: translate3d(0,0,0);
    pointer-events: none;
  }
  .checkbox-wrapper-12 .cbx svg { position: absolute; top: 5px; left: 4px; z-index: 1; pointer-events: none; }
  .checkbox-wrapper-12 .cbx svg path {
    stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 19; stroke-dashoffset: 19;
    transition: stroke-dashoffset 0.3s ease; transition-delay: 0.2s;
  }
  .checkbox-wrapper-12 .cbx input:checked + label { animation: splash-12 0.6s ease forwards; }
  .checkbox-wrapper-12 .cbx input:checked + label + svg path { stroke-dashoffset: 0; }
  
  @keyframes splash-12 {
    40% {
      background:#866efb;
      box-shadow:0 -18px 0 -8px #866efb,16px -8px 0 -8px #866efb,16px 8px 0 -8px #866efb,0 18px 0 -8px #866efb,-16px 8px 0 -8px #866efb,-16px -8px 0 -8px #866efb;
    }
    100% {
      background:#866efb;
      box-shadow:0 -36px 0 -10px transparent,32px -16px 0 -10px transparent,32px 16px 0 -10px transparent,0 36px 0 -10px transparent,-32px 16px 0 -10px transparent,-32px -16px 0 -10px transparent;
    }
  }
  
  /* Position the checkbox inside each swatch */
  .swatch .checkbox-wrapper-12 {
    position: absolute; top: 8px; right: 8px;
    width: 24px; height: 24px;
    filter: url(#goo-12);
  }
.swatch.selected {
  border: 2px solid #614ede; /* keep purple border */
}

/* Severity and Region Buttons */
.severity-buttons, .region-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 1rem;
}

.region h3 {
  margin-top: 1rem;
  text-align: center;
}
.severity h3 {
  margin-top: -1rem;
  text-align: center;
}


.severity-btn, .region-btn {
  padding: 0.5rem 1.5rem;
  border: 2px solid #614ede;
  background: white;
  color: #614ede;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s, color 0.3s;
}

.severity-btn.selected, .region-btn.selected {
  background: #614ede;
  color: white;
}

/* make two buttons per row on phones so none hangs alone
@media (max-width: 480px){
  .severity-btn { padding-inline: 16px; }
  .severity-buttons{
    display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between;
  }
  .severity-buttons .severity-btn{
    flex: 1 1 calc(50% - 6px);
  }*/

  /* NEW: keep region row off the edges on phones */
/* Force equal-width severity buttons on mobile */
@media (max-width: 480px) {
  .severity-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 equal columns */
    gap: 12px;
    justify-content: center;
  }

  .severity-buttons .severity-btn {
    width: 100%;              /* take full column width */
    padding: 0.75rem 0;        /* consistent height */
    text-align: center;
  }

  /* Same for Region buttons if you want equal widths */
  .region-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    justify-content: center;
  }

  .region-buttons .region-btn {
    width: 100%;
    padding: 0.75rem 0;
    text-align: center;
  }
}



  /* Optional: do the same for Region 
  .region { padding-inline:16px; }
  .region-buttons{
    display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between;
  }
  .region-buttons .region-btn{
    flex: 1 1 calc(50% - 6px);
  }
}*/
.section-divider{
  height:2px; background:#2f34a8; opacity:.65;
  width:90%; max-width:600px; margin:24px auto;
  border:none;
}

.descriptors{ width:90%; max-width:600px; margin:0 auto 8px; }
.descriptors h3{ text-align:center; }

.chip-list{
  display:flex; flex-wrap:wrap; gap:12px;
  justify-content:center;
}
.chip{
  border:2px solid #614ede; color:#614ede; background:#fff;
  border-radius:999px; padding:8px 14px; font-weight:700;
  line-height:1; white-space:nowrap;
}


/* Visualizer Image */
.image-area {
  margin: 2rem auto;
  width: 90%;
  max-width: 600px;
  background: #ddd;
  /*border: 3px solid #614ede;*/
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  }
  #visualizerImage {
    display: block;
    width: 100%;
    height: auto;
    max-width: 600px; /* Optional: limit max width */
    border-radius: 5px;
  }

.main-image {
  max-width: 100%;
  border-radius: 10px;
  border-color: #4656e0;
}
/* OG Custom dropdown style 
.custom-dropdown {
  position: relative;
  width: 90%;
  max-width: 400px;
  margin: 1rem auto;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 2px 8px rgba(131, 24, 253, 0.277);
  border-radius: 10px;
  
}

.dropdown-selected {
  padding: 0.7rem 1rem;
  border: 2px solid #614ede;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  color: #333;
  font-weight: bold;
  position: relative;
}

.dropdown-selected::after {
  content: "▼";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: #4656e0;
}

.dropdown-options {
  display: none;
  flex-direction: column;
  border: 2px solid #614ede;
  border-radius: 10px;
  margin-top: 5px;
  background: white;
  overflow: hidden;
  z-index: 100;
  position: absolute;
  width: 100%;
}

.dropdown-options div {
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.dropdown-options div:hover {
  background: #eee;
}

/* When dropdown is active 
.custom-dropdown.active .dropdown-options {
  display: flex;
}
html {
  scroll-behavior: smooth;
}*/

/* Custom dropdown style */
.custom-dropdown {
  position: relative;
  width: 90%;
  max-width: 400px;
  margin: 1rem auto;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 2px 8px rgba(131, 24, 253, 0.277);
  border-radius: 10px;
  z-index: 20; /* <-- added so it stacks above nearby content */
}

.dropdown-selected {
  padding: 0.7rem 1rem;
  border: 2px solid #614ede;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  color: #333;
  font-weight: bold;
  position: relative;
}

.dropdown-selected::after {
  content: "▼";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: #4656e0;
}

.dropdown-options {
  display: none;
  flex-direction: column;
  border: 2px solid #614ede;
  border-radius: 10px;
  margin-top: 5px;
  background: white;
  overflow: hidden;
  z-index: 9999;  /* <-- raised so it floats above everything */
  position: absolute; /* <-- ensure it anchors to dropdown */
  top: calc(100% + 4px); /* <-- drop below the selected field */
  left: 0;
  width: 100%;
  box-shadow: 0 12px 28px rgba(0,0,0,.12); /* optional polish */
}

.dropdown-options div {
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.dropdown-options div:hover {
  background: #eee;
}

/* When dropdown is active */
.custom-dropdown.active .dropdown-options {
  display: flex;
}

html {
  scroll-behavior: smooth;
}


/*VIEWER PAGE, About condition and dif diagnosis*/
/* Tabs Section */
.tab-section {
  width: 90%;
  max-width: 600px;
  margin: 2rem auto;
}

.tab-buttons {
  display: flex;
  gap: 5px;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 2px solid #ccc;
  background: #f9f9f9;
  color: #614ede;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.tab-btn.active {
  background: #614ede;
  color: white;
  border-color: #614ede;
}

.tab-content {
  /*background: #f9f9f9;*/
  padding: 1rem;
  border-radius: 8px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel ul {
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.tab-panel strong {
  font-size: 1.1rem;
}

/*Container*/
/*Button for comparison tool
.compare-access-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  z-index: 10;
}

.compare-access-btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.compare-access-btn img {
  width: 24px;
  height: 24px;
}*/
.image-area {
  position: relative;
}

/* ensure the image container can anchor the badge */
.image-area {
    position: relative;
    display:block;
  }

/* Prevent overlap between meta card and Compare on small screens */
@media (max-width: 640px) {
    .image-area {
      position: relative;
      padding-bottom: 4.5rem; /* space for controls at the bottom */
    }
    #imageMeta.image-meta-card {
      position: absolute;
      left: 0.5rem;
      bottom: 0.5rem;
      right: auto;
      max-width: 70%;
      z-index: 2;
    }
    #compareBtn.tono-btn {
      position: absolute;
      right: 0.5rem;
      bottom: 0.5rem;
      z-index: 3; /* sits above card edge */
    }
  }
  
  /* TONO image meta badge */
  .image-meta-card {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ffffffee;            /* translucent white */
    color: #1f2473;                    /* TONO deep indigo */
    font-weight: 700;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(31,36,115,.12);
    text-align: left;
    pointer-events: none;              /* clicks pass through to image */
    line-height: 1.25;
    flex-wrap: wrap;
    max-width: calc(100% - 140px); /* prevent overflow */
  }
  
/* Final style for the overlaid compare button */
.tono-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: #1f2473;
  color: #fff;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 8px 24px rgba(31,36,115,.18);
  cursor: pointer;
}

/* Tiny screens: give the badge a touch more room */
@media (max-width: 420px){
    .image-meta-card{ max-width: calc(100% - 120px); }
  }

.tono-btn:focus { outline: 3px solid #7a86ff; outline-offset: 2px; }

/*COMPPARISON FEATURE TRYYYYYINGGGGG
.comparison-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;
  overflow: hidden;
}

/*.comparison-image-wrapper {
  position: relative;
  width: 100%;
  height: auto;
}
.comparison-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3; /* This gives it a fixed height 
  overflow: hidden;
  background: #eee; optional fallback 
}

/*.comparison-image-wrapper .image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.comparison-image-wrapper .image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* this is the key fix 
  object-fit: cover;
}

.image-b {
  clip-path: inset(0 50% 0 0);
  transition: clip-path 0.2s ease;
  z-index: 2;
}*/

.slider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background-color: #333;
  cursor: ew-resize;
  z-index: 3;
}

.exit-comparison {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.compare-toggle-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 6px 12px;
  background: white;
  border: 1px solid #ccc;
  cursor: pointer;
  z-index: 2;
}
.imageB-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  align-items: center;
}

.imageB-controls label {
  font-weight: 500;
  margin-right: 0.25rem;
}

.imageB-controls select {
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}
/*.comparison-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.comparison-column {
  flex: 1 1 400px;
  max-width: 500px;
}

.image-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #eee;
  overflow: hidden;
  margin-bottom: 1rem;
}

.image {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  object-fit: cover;
}

.image-b {
  clip-path: inset(0 50% 0 0);
  z-index: 2;
}*/

.slider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 4px;
  background-color: #333;
  z-index: 3;
  cursor: ew-resize;
}

.image-label {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.imageB-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  padding-left: 0.5rem;
}

/*Css tweaks*/
.comparison-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.comparison-column {
  flex: 1 1 400px;
  max-width: 500px;
}

.image-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #eee;
  overflow: hidden;
  margin-bottom: 1rem;
}

.image {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  object-fit: cover;
}

.image-b {
  clip-path: inset(0 50% 0 0);
  z-index: 2;
}

/* --- Fix: remove gray gap & prevent overlaps; left-align text --- */
.image-area { 
  position: relative;          /* anchor for absolutely positioned children */
  padding-bottom: 0;           /* just in case something added padding */
}

#visualizerImage {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;         /* match the container radius */
}

/* The ID badge that shows Type • Region • Tone • Severity */
.image-meta-card {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 180px); /* leave room for the Compare button */
  padding: 12px 16px;
  background: #fff;
  opacity: 0.90;              /* slightly translucent */

  border: 2px solid #e9e9f6;
  border-radius: 30px;
  color: #1f2473;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;             /* <- not centered */
  box-shadow: 0 8px 24px rgba(31,36,115,.18);
  z-index: 3;                   /* sit above the image */
}

/* Compare button already absolute; make sure it wins the z-order */
.tono-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 4;
}

/* Tighten things on narrow phones and keep badge & button side-by-side */
@media (max-width: 480px) {
  .image-meta-card {
    max-width: calc(100% - 140px);
    padding: 10px 12px;
    font-size: 0.95rem;
  }
}

/* Card style for info section only */
.info-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem auto;
  box-shadow: 0 8px 24px rgba(31,36,115,.12);
  width: 90%;
  max-width: 700px;
  border: 1px solid #536fa9;
}

/* Better bullet spacing */
.info-card ul {
  margin-left: 1.25rem;
  padding-left: 1rem;
}
.info-card li {
  margin-bottom: 0.5rem;
}

/* Back to top (responsive/collapsible) */
.back-to-top{
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 1000;
}

/* pill on desktop */
.backtotop-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 10px 14px;
  text-decoration: none;
  color: #1f2473;
  box-shadow: 0 6px 16px rgba(31,36,115,.12);
}

/* collapse to round icon on small screens */
@media (max-width: 640px){
  .backtotop-btn { padding: 10px; width: 44px; height: 44px; justify-content: center; }
  .backtotop-btn .label { display: none; } /* hide text, keep aria-label for a11y */
  .backtotop-btn .icon { width: 20px; height: 20px; }
}

/* optional: subtle show/hide animation */
.back-to-top[data-hidden="true"]{
  opacity: 0; transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.back-to-top[data-hidden="false"]{
  opacity: 1; transform: translateY(0);
  transition: opacity .2s, transform .2s;
}
