/*====================================================
Scoped Reset For Floating Help Widget
====================================================*/
[class^="lifeline-"], [class*="lifeline-"] {
    box-sizing: border-box;
    font-size: 16px;
    margin: 0;
    padding: 0;
/*Global Widget Settings*/
  --lifeline-global-primary: #47607cdc;
  --lifeline-global-secondary: rgb(51, 51, 51);
  --lifeline-global-accent: rgb(206, 206, 206);
  --lifeline-global-border-base: 1px;
  --lifeline-global-border-medium: calc(var(--lifeline-global-border-base) * 2);
  --lifeline-global-border-large: calc(var(--lifeline-global-border-base) * 3);
  /*Float Widget Variables*/
  --lifeline-float-button-bg: var(--lifeline-global-primary);
  --lifeline-float-button-border: var(--lifeline-global-border-base) groove #333;
  --lifeline-float-shadow: 2px 4px 4px rgba(0,0,0,0.4);
  --lifeline-float-icon-pulse-interval: 15s;
  --lifeline-float-button-text: var(--lifeline-global-accent);
  --lifeline-float-bubble-bg: hsla(0, 1%, 10%, .99);
  --lifeline-float-bubble-border: var(--lifeline-global-border-base) groove #333;
  --lifeline-float-panel-width: 16.25rem;
  --lifeline-float-panel-bg:hsla(0, 1%, 5%, 0.95);
  --lifeline-float-panel-text: #bbb;
  --lifeline-float-panel-margin: 6.25rem;
  --lifeline-float-transition: .6s ease-in-out;
  --lifeline-float-icon-size: 5rem;
  --lifeline-float-bottom-margin: 3rem;
  --lifeline-float-right-margin: 1rem;
}
@font-face {
  font-family: 'Playfair Display', serif;
  src: url(../fonts/PlayfairDisplay-VariableFont_wght.ttf);
  font-style: normal;
}
@font-face {
  font-family: 'Playfair Display Italic', serif;
  src: url(../fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf);
  font-style: italic;
}
@font-face {
  font-family: "Portmanteau";
  src: 
    url("../fonts/portmanteau.woff") format("woff2"),
    url("../fonts/portmanteau.woff2") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
.active {
  z-index: 900;
}
/*====================================================
Floating Help Widget Styles
====================================================*/
.lifeline-float-main {
  position: fixed;
  bottom: var(--lifeline-float-bottom-margin);
  right: var(--lifeline-float-right-margin);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
/* Floating Icon */
.lifeline-float-main .lifeline-float-icon {
  width: var(--lifeline-float-icon-size);
  border: 8px groove rgba(0, 0, 0, 0);
  border-radius: 60%;
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  filter: brightness(.75) saturate(.75);
  justify-content: center;
  animation: lifeline-float-icon-pulse var(--lifeline-float-icon-pulse-interval) ease-in-out infinite;
}
@keyframes lifeline-float-icon-pulse {
    0%, 84%, 87%, 100% {
    background: transparent;
    border: 8px groove rgba(0, 0, 0, .0);
  }
    85% {
    background: radial-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.0));
    border: 3px groove rgba(0, 0, 0, .1);
  }
    84.5%, 86% {
    background: radial-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.0));
    border: 6px groove rgba(0, 0, 0, .05);
  }
}
.lifeline-float-main .lifeline-float-icon:hover {
  background: radial-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.0)) !important;
  backdrop-filter: blur(4px) !important;
  border: 3px groove rgba(0, 0, 0, .1) !important;
}
/* Float Bubble */
.lifeline-float-main .lifeline-float-bubble {
  background: var(--lifeline-float-bubble-bg);
  border-radius: 8px;
  box-shadow: var(--lifeline-float-shadow);
  font-size: .85rem;
  opacity: 0;
  transform: translateX(50px);
  transition: opacity var(--lifeline-float-transition), transform var(--lifeline-float-transition);
  position: absolute;
  bottom: var(--lifeline-float-bottom-margin);
  right: var(--lifeline-float-right-margin);
  font-weight: bold;
  text-align: center;
  border: var(--lifeline-float-bubble-border);
  height: auto;
  width: 16.75rem;
  align-content: center;
}
.lifeline-float-main .lifeline-float-bubble::after {
  content: "";
  position: absolute;
  width: 1.5625rem;
  height: 1.25rem;
  background: inherit;
  bottom: 5px;
  right: -25px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  box-shadow: inherit;
  opacity: 1;
}
.lifeline-float-main .lifeline-float-bubble-dismiss-icon {
  height: 20px;
  color: rgba(15, 15, 15, 0.85);
  position: absolute;
  top: 2px;
  right: 2px;
}
.lifeline-float-main .lifeline-float-bubble.show-intro {
  opacity: .85;
  position: fixed;
  color: #fff;
  bottom: calc(var(--lifeline-float-bottom-margin) * 1.25);
  right: calc(var(--lifeline-float-right-margin) * 6);
  transform: translateX(0);
  animation: lifeline-bubble-popup ease-in-out 1s 1, 
            lifeline-bubble-popup ease-in-out 1s 1 reverse 15s;
}
.lifeline-float-main .lifeline-float-bubble.hide {
  opacity: 0;
  position: fixed;
  bottom: 120px;
  right: 95px;
  transform: translateX(50);
  animation: lifeline-float-bubble-popup ease-in-out 1s 1 reverse;
}
@keyframes lifeline-float-bubble-popup {
  0% { width: 0rem; opacity: 0; }
  100% {width: 16rem; opacity: .85; }
}
/* Float Panel */
.lifeline-float-main .lifeline-float-panel {
  height: min(550px, calc(100vh - 7rem));
  width: var(--lifeline-float-panel-width);
  background: var(--lifeline-float-panel-bg);
  backdrop-filter: blur(24px);
  color: var(--lifeline-float-panel-text);
  border: 1px groove #000;
  border-radius: 8px;
  box-shadow:
    0px 2px 12px rgba(0, 0, 0, 0.45),
    2px 6px 16px rgba(20, 25, 30, 0.35),
    inset 0 2px 4px rgba(255, 255, 255, 0.35),
    inset 0 -2px 6px rgba(0,0,0,0.45);
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--lifeline-float-transition),
              transform var(--lifeline-float-transition);
  bottom: var(--lifeline-float-panel-margin);
  right: var(--lifeline-float-panel-margin);
  position: fixed;
  text-align: center;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.lifeline-float-panel-top-bar {
  height: 35px;
  min-height: 35px;
  background: linear-gradient(hsla(171, 15%, 10%, 0.949), hsla(212, 27%, 18%, 0.863));
  backdrop-filter: blur(4px);
  border-radius: 8px 8px 0 0;
  border-bottom: 1px groove #333;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-shadow:
   0px 1px 3px rgba(0, 0, 0, 0.3),
   0px 3px 4px rgba(20, 25, 30, 0.2),
   inset 0 1px 2px rgba(255, 255, 255, 0.2),
   inset 0 -1px 3px rgba(0,0,0,0.3);
  cursor: default;
  z-index: 10;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lifeline-float-panel-top-bar span {
  color: var(--color-active);
  font-weight: 600;
  font-size: 1rem;
  position: relative;
}
.lifeline-float-main .lifeline-float-panel.active {
  opacity: 1;
  pointer-events: auto;
  bottom: 3.25rem;
  right: var(--lifeline-float-panel-margin);
  position: fixed;
  text-align: center;
}
.lifeline-float-main .lifeline-float-panel-back-icon {
  height: 22px;
  width: 22px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 8px;
  color: rgba(215, 215, 215, 0.35);
}
.lifeline-float-main .lifeline-float-panel-back-icon:hover {
  height: 24px;
  width: 24px;
  color: rgba(235, 235, 235, 0.5);
  cursor: pointer;
}
.lifeline-float-main .lifeline-float-panel-close-icon {
  height: 25px;
  width: 25px;
  color: rgba(15, 15, 15, 0.85);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 7px;
}
.lifeline-float-main .lifeline-float-panel-close-icon:hover {
  height: 23px;
  width: 23px;
  filter: drop-shadow(2px 2px 3px rgba(1, 1, 1, 0.5));
  cursor: pointer;
}
.lifeline-float-main .lifeline-float-panel-animation-toggle {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 12px 24px;
  cursor: pointer;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  z-index: 100;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  min-width: 120px;
  min-height: 44px;
  pointer-events: all;
}
.lifeline-float-main .lifeline-float-panel-animation-toggle * {
  pointer-events: none;
}
.lifeline-float-main .lifeline-float-panel-animation-toggle.skip-mode {
  display: flex;
}
.lifeline-float-main .lifeline-float-panel-animation-toggle:hover {
  background: rgba(0, 0, 0, 0.85);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
/* Fade-in animation for instant mode */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.lifeline-float-message.fade-in {
  animation: fadeInUp 0.4s ease-out;
}
.lifeline-float-link.fade-in,
.lifeline-float-back.fade-in,
.lifeline-float-initial-link.fade-in,
.widget-search-row.fade-in,
.checkbox-wrapper.fade-in,
.slider-wrapper.fade-in,
.ranking-list.fade-in,
.contact-form.fade-in {
  animation: fadeInUp 0.3s ease-out;
  animation-fill-mode: both;
}
.lifeline-float-bubble-dismiss-btn,
.lifeline-float-panel-close-btn,
.lifeline-float-panel-back-btn,
.lifeline-float-panel-animation-toggle {
  background: none;
  border: none;
  cursor: pointer;
}
.thinking-dots {
  display: none; /* Hidden by default, shown via JS */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  align-items: center;
  gap: 12px;
  justify-content: center;
  z-index: 50;
}
.thinking-dots.active {
  display: flex;
}
.thinking-dots span {
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  opacity: 0.3;
  animation: bounce 1.2s infinite;
}
.thinking-dots span:nth-child(1) { animation-delay: 0s; }
.thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity:0.3; }
  40% { transform: translateY(-10px); opacity:1; }
}

/* Float Panel Content */
.lifeline-float-main .lifeline-float-step {
  display: none;
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.5rem;
  width: 100%;
}
.lifeline-float-main .lifeline-float-step.active {
  display: flex;
  flex-direction: column;
  animation: lifeline-float-step-fadeIn var(--lifeline-float-transition);
}
@keyframes lifeline-float-step-fadeIn {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}
.lifeline-float-main #lifeline-float-bubble-message {
  white-space: nowrap;
  cursor: default;
}
.lifeline-float-main #lifeline-float-bubble-message::after{
  content: "|";
  margin-left: 2px;
  opacity: 0.8;
  animation: lifeline-float-bubble-caret-blink 1s steps(1) infinite;
}
@keyframes lifeline-float-bubble-caret-blink {
  50% { opacity: 0.8}
}
.lifeline-float-main .lifeline-float-message {
  margin-bottom: 10px;
  font-size: .9rem;
  font-weight: bold;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  cursor: default;
  margin-top: .75rem;
}
.lifeline-float-main .lifeline-float-message::after{
  content: "|";
  margin-left: 2px;
  opacity: 0;
  animation: lifeline-float-bubble-caret-blink 1s steps(1) infinite;
  animation-delay: 1.25s;
}
.lifeline-float-main .lifeline-float-link,
.lifeline-float-main .lifeline-float-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 10px 0;
  padding: 12px 14px;
  min-height: 44px;
  background: linear-gradient(hsla(171, 15%, 12%, 0.949), hsla(212, 27%, 20%, 0.863));
  backdrop-filter: blur(4px);
  color: var(--lifeline-float-button-text);
  border: var(--lifeline-float-button-border);
  border-radius: 8px;
  text-align: center;
  font-size: .85rem;
  font-family: 'Playfair Display', serif;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
}
.tone-warm-confident .lifeline-float-link { border-color: rgba(255, 180, 90, 0.25); }
.tone-calm-reassuring .lifeline-float-link { border-color: rgba(120, 200, 255, 0.2); }
.tone-direct-motivational .lifeline-float-link { border-color: rgba(255, 120, 120, 0.2); }
.lifeline-float-main .lifeline-float-link:hover,
.lifeline-float-main .lifeline-float-back:hover {
  background: var(--lifeline-global-secondary);
  transform: translateY(-3px);
}
.initial-button-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}
.lifeline-float-main .lifeline-float-initial-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 8px;
  background: linear-gradient(hsla(171, 15%, 12%, 0.949), hsla(212, 27%, 20%, 0.863));
  backdrop-filter: blur(4px);
  color: var(--lifeline-float-button-text);
  border: var(--lifeline-float-button-border);
  border-radius: 8px;
  text-align: center;
  font-size: .85rem;
  font-family: 'Playfair Display', serif;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, color 0.2s ease;
  min-height: 80px;
}
.lifeline-float-main .lifeline-float-initial-link:hover {
  color: var(--color-active);
  transform: translateY(-3px);
}
.lifeline-float-main .lifeline-float-initial-link svg {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.lifeline-float-main .lifeline-float-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: rgba(235, 235, 235, 0.5);
}
.lifeline-float-main .lifeline-float-back svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  filter: invert(90%);
}
.results-wrapper {
  display: none;
}
/*====================================================
Checkboxes
====================================================*/
.checkbox-wrapper label{
  display: flex;
  margin-bottom: 12px;
  gap: 8px;
  align-items: center;
}
/* Minimal base for checkboxes — widget-specific visuals handled by .checkbox-option */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.ranking-list { list-style:none; margin:0; padding:0; max-width:640px; display:flex; flex-direction:column; gap:0.5rem; }

/* Ensure ranking lists always stack vertically even if other rules try to change flow */
.lifeline-float-step .ranking-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  width: 100% !important;
}
.lifeline-float-step .ranking-list .ranking-item {
  width: 100% !important;
  box-sizing: border-box;
}
.ranking-item {
  display:flex;
  align-items:center;
  gap:0.75rem;
  padding:0.25rem 0.5rem;
  padding-left: 2.2rem;
  margin:0.5rem 0 0.5rem 0;
  background: linear-gradient(#273533f2, #47607cdc);
  backdrop-filter: blur 4px;
  border: 2px groove #515151;
  border-radius:6px;
  cursor:grab;
  user-select:none;
  position: relative;
  color: #ddd;
  font-weight: 250;
  font-size: .85rem;
  width: 100%;
}
.ranking-item:active { 
  cursor:grabbing; 
}
.dragging { 
  opacity:0.45; 
  transform: scale(.995); 
}
.lifeline-float-main .ranking-item svg {
  width: 16px;
  height: 16px;
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  cursor: grab;
  user-select: none;
  opacity: 0.7;
}
.lifeline-float-main .ranking-item svg:active {
  cursor: grabbing;
  opacity: 1;
}
/*====================================================
Sliders
====================================================*/
/* --- slider base (keep these resets) --- */
input[type="range"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  margin: 0;
  background: transparent; /* IMPORTANT: allow inline background from JS to show */
  cursor: pointer;
  outline: none;
}
/* --- MAKE PSEUDO-TRACKS TRANSPARENT SO INLINE BG SHOWS --- */
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;     /* <- critical */
  border-radius: 3px;
}
input[type="range"]::-moz-range-track {
  height: 6px;
  background: transparent;     /* <- critical */
  border-radius: 3px;
}
input[type="range"]::-ms-track {
  height: 6px;
  background: transparent;
  border-color: transparent;
  color: transparent;
}
/* Optional fallback styling if JS is disabled (keep separate) */
/* .range-no-js { background: linear-gradient(to right, #4a90e2 50%, #ddd 50%); } */
/* --- THUMB (keeps polish) --- */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #666;
  cursor: grab;
  margin-top: -6px; /* vertically center against 6px track */
  box-shadow: 0 2px 6px rgba(0,0,0,0.28);
  border: 2px solid #fff;
  transition: background .18s ease, transform .08s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { background: #777; transform: scale(1.06); }
input[type="range"]::-webkit-slider-thumb:active { background: #555; cursor: grabbing; transform: scale(.98); }
/* Firefox thumb */
input[type="range"]::-moz-range-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #666;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0,0,0,0.28);
  border: 2px solid #fff;
  transition: background .18s ease, transform .08s ease;
}
input[type="range"]::-moz-range-thumb:hover { background: #777; transform: scale(1.06); }
input[type="range"]::-moz-range-thumb:active { background: #555; transform: scale(.98); }
/* Edge / IE thumb */
input[type="range"]::-ms-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #666;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0,0,0,0.28);
  border: 2px solid #fff;
}
/* small accessibility nicety: make sure track has some min-height for touch */
@media (pointer: coarse) {
  input[type="range"] { height: 12px; }
  input[type="range"]::-webkit-slider-thumb { height: 24px; width: 24px; margin-top: -8px; }
}
/* Slider visual polish */
.polished {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #4CAF50 0%, #ddd 100%);
  outline: none;
  cursor: pointer;
  transition: background 0.3s;
}
/* Thumb styling */
.polished::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4CAF50;
  border: 2px solid #333;
  cursor: grab;
  transition: background 0.2s, transform 0.2s;
}
.polished::-webkit-slider-thumb:active {
  transform: scale(1.1);
}
/* For Firefox */
.polished::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4CAF50;
  border: 2px solid #333;
  cursor: grab;
  transition: background 0.2s, transform 0.2s;
}
/* Displayed value next to slider */
.range-value {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  font-weight: bold;
  color: #333;
  margin-left: 10px;
  font-size: 14px;
}
/* Slider wrapper styling */
.slider-wrapper {
  display: flex;
  flex-direction: column; /* Stack question, slider, and value vertically */
  align-items: flex-start; /* Align sliders and labels to the left */
  gap: 8px; /* Space between question, slider, and value */
  border-radius: 8px;
  background-color: transparent;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

/*====================================================
Bipolar Scale Slider
====================================================*/
.bipolar-scale-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 15px 0;
  width: 100%;
}

.bipolar-scale-labels {
  display: flex;
  /* Stack labels vertically (user requested vertical orientation) */
  flex-direction: column !important;
  gap: 10px;
  margin-bottom: 10px;
}

.bipolar-label {
  flex: 1;
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px groove rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.bipolar-label.left {
  border-left: 3px solid #ff6b6b;
}

.bipolar-label.right {
  border-right: 3px solid #4ecdc4;
}

.bipolar-label strong {
  display: block;
  font-size: 1.1rem;
  color: var(--lifeline-float-button-text);
  margin-bottom: 5px;
  font-family: 'Playfair Display', serif;
}

.bipolar-label .label-description {
  font-size: 0.85rem;
  color: #999;
  margin: 0;
  line-height: 1.3;
}

.bipolar-slider-wrapper {
  display: flex;
  /* arrange slider vertically with indicator to the right */
  flex-direction: row;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
}

/* Visual track behind rotated slider for better affordance */
.bipolar-slider-wrapper::before {
  content: '';
  width: 8px;
  height: 180px;
  background: linear-gradient(#ff6b6b 0%, #ffd93d 50%, #4ecdc4 100%);
  border-radius: 6px;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.06), 0 2px 6px rgba(0,0,0,0.4);
  margin-left: 6px;
  display: inline-block;
}

.slider-track-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 5px;
  color: #777;
  font-size: 0.9rem;
  font-weight: bold;
}

/* For bipolar slider wrappers we render the track labels vertically and add visible ticks */
.bipolar-slider-wrapper .slider-track-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 180px; /* match slider visual height */
  padding: 0 6px;
}

.bipolar-slider-wrapper .slider-track-labels span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e9eef6;
  font-weight: 700;
}

.bipolar-slider-wrapper .slider-track-labels span::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 1px 4px rgba(0,0,0,0.6);
  display: inline-block;
}

.bipolar-scale-slider {
  /* Make the slider vertical: rotate it and adjust dimensions so it reads vertically */
  width: 8px;              /* visual track width */
  height: 180px;          /* visual track height */
  transform: rotate(-90deg);
  transform-origin: center;
  background: linear-gradient(to right, #ff6b6b 0%, #ffd93d 50%, #4ecdc4 100%);
  border-radius: 4px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  margin: 0; /* spacing handled by wrapper */
  appearance: none; /* ensure custom track rendering is visible across browsers */
  background: transparent; /* rely on wrapper track visuals */
  position: relative; /* ensure thumb overlays the wrapper track */
  z-index: 5;
}

.bipolar-scale-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--lifeline-float-button-text);
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  border: 2px solid var(--lifeline-global-primary);
  transition: all 0.2s ease;
}

.bipolar-scale-slider:focus {
  outline: none;
}

.bipolar-scale-slider:focus-visible {
  box-shadow: 0 0 0 4px rgba(78,205,196,0.15), 0 2px 6px rgba(0,0,0,0.4);
  border-radius: 50%;
}

/* Ensure the clickable area around the rotated input is generous */
.bipolar-slider-wrapper { padding-left: 12px; padding-right: 12px; }
.bipolar-scale-slider { cursor: pointer; }

.bipolar-scale-slider::-webkit-slider-thumb:hover {
  background: #fff;
  transform: scale(1.15);
}

.bipolar-scale-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(0.95);
}

.bipolar-scale-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--lifeline-float-button-text);
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  border: 2px solid var(--lifeline-global-primary);
  transition: all 0.2s ease;
}

.bipolar-scale-slider::-moz-range-thumb:hover {
  background: #fff;
  transform: scale(1.15);
}

.bipolar-scale-slider::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(0.95);
}

.slider-indicator {
  text-align: center;
  padding: 12px;
  background: rgba(71, 96, 124, 0.2);
  border: 2px groove rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slider-indicator .current-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--lifeline-float-button-text);
  display: block;
  margin-bottom: 5px;
}

.slider-indicator .current-tendency {
  font-size: 0.95rem;
  color: #bbb;
  font-style: italic;
  display: block;
  min-height: 20px;
}

.bipolar-submit {
  margin-top: 15px;
}

/*====================================================
Contact Form
====================================================*/
.contact-form button {
  display: block;
  width: 40%;
  margin: 6px 0;
  padding: 3px 4px;
  background: linear-gradient(#273533f2, #47607cdc);
  backdrop-filter: blur(4px);
  color: var(--lifeline-float-button-text);
  border: var(--lifeline-float-button-border);
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
  font-family: 'Playfair Display', serif;
  cursor: pointer;
  text-decoration: none;
  left: 65%;
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
}
.contact-form button:hover {
  background: var(--lifeline-global-secondary);
  transform: translateY(-3px);
}
.contact-form svg {
  width: 20px;
  height: 20px;
  margin-right: 4px;
  top: 4px;
  position: relative;
}
.contact-form input {
  border: 2px groove #9e9e9e;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: bold;
  color: #bbb;
  font-family: 'Playfair Display', serif;
  font-size: .85rem;
  margin-top: 4px;
  margin-bottom: 4px;
  width: 100%;
  background: #222;
}
.contact-form select {
  border: 2px groove #9e9e9e;
  border-radius: 8px;
  padding: 6px 12px;
.tone-warm-confident .lifeline-float-message { text-shadow: 0 0 6px rgba(255, 200, 120, 0.15); }
.tone-calm-reassuring .lifeline-float-message { text-shadow: 0 0 6px rgba(120, 200, 255, 0.12); }
.tone-direct-motivational .lifeline-float-message { text-shadow: 0 0 6px rgba(255, 120, 120, 0.12); }
  font-weight: bold;
  color: #777;
  font-family: 'Playfair Display', serif;
  font-size: .85rem;
  margin-top: 4px;
  margin-bottom: 4px;
  width: 100%;
  background: #222;
}
.contact-form textarea {
  border: 2px groove #9e9e9e;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: bold;
  color: #bbb;
  font-family: 'Playfair Display', serif;
  font-size: .85rem;
  margin-top: 4px;
  width: 100%;
  height: 5rem;
  background: #222;
}
/*====================================================

Glossary Search

====================================================*/
  /* search input styling */
.widget-search-row{
  display:flex;
  gap:10px;
  align-items:center;
  width:100%;
  position: relative;
}
.widget-search-input{
  flex:1;
  background: #333;
  border: 3px groove rgba(0,0,0,0.5);
  color: #d3d3d3;
  padding:5px 40px 5px 12px;
  border-radius:8px;
  outline:none;
  font-size: 1rem;
  min-width:0;
  font-weight: bold;
}
.widget-search-input::placeholder{
  color:rgba(255,255,255,0.35);
  font-weight: 400;
}
.widget-search-row svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color:rgba(255,255,255,0.35);
  pointer-events: none;
}

/*====================================================

Glossary Results Styling

====================================================*/

#glossary-results {
  margin-top: 15px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 5px;
}

#glossary-results::-webkit-scrollbar {
  width: 6px;
}

#glossary-results::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

#glossary-results::-webkit-scrollbar-thumb {
  background: rgba(71, 96, 124, 0.5);
  border-radius: 3px;
}

#glossary-results::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 96, 124, 0.7);
}

.glossary-result-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glossary-result-item:hover {
  transform: translateX(3px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15) !important;
}

/*====================================================

Form Status Message Styling

====================================================*/

.form-status {
  padding: 10px;
  border-radius: 6px;
  font-size: 0.85em;
  text-align: center;
  font-weight: bold;
  animation: fadeInUp 0.3s ease-out;
}

/*====================================================

Training Plan Results Styling

====================================================*/

.training-plan-results {
  animation: fadeInUp 0.4s ease-out;
}

.training-plan-results::-webkit-scrollbar {
  width: 6px;
}

.training-plan-results::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.training-plan-results::-webkit-scrollbar-thumb {
  background: rgba(71, 96, 124, 0.5);
  border-radius: 3px;
}

.training-plan-results::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 96, 124, 0.7);
}

/*====================================================

Button Hover & Sizing Fixes - Comprehensive

====================================================*/
/* Ensure ALL buttons use translateY on hover (no scaling) and maintain consistent sizing */
.lifeline-float-main .lifeline-float-link,
.lifeline-float-main .lifeline-float-initial-link,
.lifeline-float-main .lifeline-float-back {
  white-space: normal;
  text-overflow: clip;
  overflow: visible;
  min-height: 44px;
  line-height: 1.3;
}

/* Force translateY hover for all button types */
.lifeline-float-main .lifeline-float-link:hover,
.lifeline-float-main .lifeline-float-initial-link:hover,
.lifeline-float-main .lifeline-float-back:hover,
.lifeline-float-main .contact-form button:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Remove any active state scaling */
.lifeline-float-main .lifeline-float-link:active,
.lifeline-float-main .lifeline-float-initial-link:active,
.lifeline-float-main .lifeline-float-back:active,
.lifeline-float-main .contact-form button:active {
  transform: translateY(0) !important;
}

/* Ensure SVG icons are properly sized and aligned */
.lifeline-float-main .lifeline-float-link svg,
.lifeline-float-main .lifeline-float-initial-link svg,
.lifeline-float-main .lifeline-float-back svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  align-self: center;
}
/*====================================================

Mobile Responsiveness

====================================================*/

/* Tablet and Medium Screens */
@media (max-width: 1024px) {
  .lifeline-float-main {
    --lifeline-float-icon-size: 4.25rem;
    --lifeline-float-bottom-margin: 2rem;
    --lifeline-float-right-margin: 0.75rem;
    --lifeline-float-panel-width: 18rem;
    --lifeline-float-panel-margin: 4rem;
  }
  
  .lifeline-float-main .lifeline-float-panel,
  .lifeline-float-main .lifeline-float-panel.active {
    bottom: 3rem;
    right: 0.75rem;
    max-height: calc(100vh - 180px);
  }
  
  .lifeline-float-panel-top-bar {
    width: 18.25rem;
  }
}

/* Mobile and Small Screens */
@media (max-width: 768px) {
  .lifeline-float-main {
    --lifeline-float-icon-size: 3.75rem;
    --lifeline-float-bottom-margin: 1.25rem;
    --lifeline-float-right-margin: 0.5rem;
    --lifeline-float-panel-width: calc(100vw - 2rem);
    --lifeline-float-panel-margin: 1rem;
    bottom: 70px; /* Account for mobile nav */
  }
  
  .lifeline-float-main .lifeline-float-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5),
                0 0 8px rgba(158, 240, 249, 0.3);
  }
  
  .lifeline-float-main .lifeline-float-bubble {
    width: calc(100vw - 6rem);
    max-width: 280px;
    font-size: 0.8rem;
    right: 4rem;
  }
  
  .lifeline-float-main .lifeline-float-bubble.show-intro {
    bottom: calc(var(--lifeline-float-bottom-margin) + 70px);
    right: 4rem;
  }
  
  .lifeline-float-main .lifeline-float-panel,
  .lifeline-float-main .lifeline-float-panel.active {
    width: calc(100vw - 1rem);
    max-width: 380px;
    height: min(500px, calc(100vh - 160px));
    bottom: 70px;
    right: 0.5rem;
    left: 0.5rem;
    margin: 0 auto;
    border-radius: 12px;
  }
  
  .lifeline-float-panel-top-bar {
    width: 100%;
    min-height: 35px;
    border-radius: 12px 12px 0 0;
  }
  
  .lifeline-float-panel-top-bar span {
    font-size: 0.95rem;
  }
  
  .lifeline-float-main .lifeline-float-step {
    padding: 1rem;
  }
  
  .lifeline-float-main .lifeline-float-step.active {
    padding: 1rem;
  }
  
  .lifeline-float-main .lifeline-float-message {
    font-size: 0.85rem;
  }
  
  .lifeline-float-main .lifeline-float-link,
  .lifeline-float-main .lifeline-float-initial-link {
    font-size: 0.8rem;
    padding: 12px 10px;
    min-height: 44px; /* Touch-friendly */
  }
  
  .lifeline-float-main .lifeline-float-link svg {
    width: 14px;
    height: 14px;
  }
  
  .initial-button-grid {
    gap: 8px;
  }
  
  .lifeline-float-main .lifeline-float-initial-link {
    min-height: 70px;
  }
  
  .lifeline-float-main .lifeline-float-initial-link svg {
    width: 36px;
    height: 36px;
  }
  
  .contact-form button {
    width: 100%;
    left: 0;
    position: relative;
    min-height: 44px;
  }
  
  .ranking-item {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem 0.3rem 2rem;
    min-height: 44px;
  }
  
  .widget-search-input {
    font-size: 0.9rem;
    padding: 8px 12px;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .lifeline-float-main {
    --lifeline-float-icon-size: 3.25rem;
    --lifeline-float-bottom-margin: 1rem;
    --lifeline-float-right-margin: 0.5rem;
    bottom: 60px;
  }
  
  .lifeline-float-main .lifeline-float-icon {
    font-size: 1.6rem;
  }
  
  .lifeline-float-main .lifeline-float-bubble {
    width: calc(100vw - 5rem);
    max-width: 240px;
    font-size: 0.75rem;
    right: 3.5rem;
  }
  
  .lifeline-float-main .lifeline-float-bubble.show-intro {
    bottom: calc(var(--lifeline-float-bottom-margin) + 60px);
  }
  
  .lifeline-float-main .lifeline-float-panel,
  .lifeline-float-main .lifeline-float-panel.active {
    width: calc(100vw - 1rem);
    max-width: 340px;
    height: min(450px, calc(100vh - 140px));
    bottom: 60px;
    right: 0.5rem;
    left: 0.5rem;
  }
  
  .lifeline-float-panel-top-bar {
    width: 100%;
    height: 32px;
    min-height: 32px;
  }
  
  .lifeline-float-panel-top-bar span {
    font-size: 0.9rem;
  }
  
  .lifeline-float-main .lifeline-float-panel-back-icon,
  .lifeline-float-main .lifeline-float-panel-back-icon:hover {
    height: 20px;
    width: 20px;
  }
  
  .lifeline-float-main .lifeline-float-panel-close-icon,
  .lifeline-float-main .lifeline-float-panel-close-icon:hover {
    height: 22px;
    width: 22px;
  }
  
  .lifeline-float-main .lifeline-float-step {
    padding: 0.85rem;
  }
  
  .lifeline-float-main .lifeline-float-message {
    font-size: 0.8rem;
    margin-top: 0.5rem;
  }
  
  .lifeline-float-main .lifeline-float-link,
  .lifeline-float-main .lifeline-float-initial-link {
    font-size: 0.75rem;
    padding: 10px 8px;
  }
  
  .lifeline-float-main .lifeline-float-link svg {
    width: 14px;
    height: 14px;
  }
  
  .initial-button-grid {
    gap: 6px;
  }
  
  .lifeline-float-main .lifeline-float-initial-link {
    min-height: 65px;
  }
  
  .lifeline-float-main .lifeline-float-initial-link svg {
    width: 32px;
    height: 32px;
  }
  
  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    font-size: 0.8rem;
    padding: 8px 10px;
  }
  
  .contact-form button {
    font-size: 0.85rem;
    padding: 8px 10px;
  }
  
  .ranking-item {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem 0.25rem 1.8rem;
  }
  
  .lifeline-float-main .ranking-item svg {
    width: 14px;
    height: 14px;
    left: 6px;
  }
  
  .widget-search-input {
    font-size: 0.85rem;
    padding: 6px 10px;
  }
  
  .widget-search-row svg {
    width: 18px;
  }
  
  input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }
  
  .checkbox-wrapper label {
    font-size: 0.8rem;
  }
  
  .slider-wrapper {
    gap: 6px;
  }
  
  input[type="range"] {
    height: 10px;
  }
  
  input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    margin-top: -7px;
  }
  
  input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .lifeline-float-main .lifeline-float-panel,
  .lifeline-float-main .lifeline-float-panel.active {
    height: calc(100vh - 6rem);
    bottom: 3rem;
  }
  
  .lifeline-float-main {
    bottom: 2rem;
  }
  
  .lifeline-float-main .lifeline-float-bubble.show-intro {
    bottom: calc(var(--lifeline-float-bottom-margin) + 2rem);
  }
  
  .lifeline-float-panel-top-bar {
    position: sticky;
    top: 0;
  }
}

/* Chromebook and Short Landscape Screens */
@media (max-width: 1366px) and (max-height: 768px) {
  .lifeline-float-main .lifeline-float-panel,
  .lifeline-float-main .lifeline-float-panel.active {
    height: calc(100vh - 5rem);
    bottom: 2.5rem;
  }
  
  .lifeline-float-panel-top-bar {
    position: sticky;
    top: 0;
  }
}

/* Very Short Screens (Chromebook in portrait or small tablets) */
@media (max-height: 600px) {
  .lifeline-float-main .lifeline-float-panel,
  .lifeline-float-main .lifeline-float-panel.active {
    height: calc(100vh - 4rem);
    bottom: 2rem;
    padding: 0;
  }
  
  .lifeline-float-main {
    bottom: 1.5rem;
  }
  
  .lifeline-float-panel-top-bar {
    width: 100%;
    height: 30px;
    min-height: 30px;
    position: sticky;
    top: 0;
  }
  
  .lifeline-float-panel-top-bar span {
    font-size: 0.9rem;
  }
  
  .lifeline-float-main .lifeline-float-message {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .lifeline-float-main .lifeline-float-link,
  .lifeline-float-main .lifeline-float-initial-link {
    padding: 8px 6px;
    margin: 4px 0;
    font-size: 0.8rem;
  }
  
  .lifeline-float-main .lifeline-float-link svg {
    width: 12px;
    height: 12px;
  }
  
  .lifeline-float-main .lifeline-float-initial-link {
    min-height: 60px;
  }
  
  .lifeline-float-main .lifeline-float-initial-link svg {
    width: 28px;
    height: 28px;
  }
  
  .initial-button-grid {
    gap: 4px;
  }
}

/* Extreme Short Screens */
@media (max-height: 480px) {
  .lifeline-float-main .lifeline-float-panel,
  .lifeline-float-main .lifeline-float-panel.active {
    height: calc(100vh - 3rem);
    bottom: 1.5rem;
    padding: 0;
  }
  
  .lifeline-float-main {
    --lifeline-float-icon-size: 3rem;
    bottom: 1rem;
  }
  
  .lifeline-float-panel-top-bar {
    width: 100%;
    height: 28px;
    min-height: 28px;
  }
  
  .lifeline-float-panel-top-bar span {
    font-size: 0.85rem;
  }
  
  .lifeline-float-main .lifeline-float-message {
    font-size: 0.75rem;
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
  }
  
  .lifeline-float-main .lifeline-float-link,
  .lifeline-float-main .lifeline-float-initial-link {
    padding: 6px 4px;
    margin: 3px 0;
    font-size: 0.75rem;
  }
  
  .lifeline-float-main .lifeline-float-link svg {
    width: 12px;
    height: 12px;
  }
  
  .lifeline-float-main .lifeline-float-initial-link {
    min-height: 55px;
  }
  
  .lifeline-float-main .lifeline-float-initial-link svg {
    width: 26px;
    height: 26px;
  }
  
  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    padding: 6px 8px;
    margin: 2px 0;
    font-size: 0.75rem;
  }
  
  .ranking-item {
    padding: 0.2rem 0.3rem 0.2rem 1.5rem;
    margin: 0.3rem 0;
    font-size: 0.7rem;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Ensure minimum touch targets */
  .lifeline-float-main .lifeline-float-icon {
    min-width: 48px;
    min-height: 48px;
  }
  
  .lifeline-float-main .lifeline-float-link,
  .lifeline-float-main .lifeline-float-initial-link,
  .contact-form button,
  .ranking-item {
    min-height: 44px; /* iOS recommendation */
  }
  
  /* Remove hover effects, use active states */
  .lifeline-float-main .lifeline-float-icon:hover {
    background: transparent;
    border: 8px groove rgba(0, 0, 0, 0);
  }
  
  .lifeline-float-main .lifeline-float-icon:active {
    transform: scale(0.95);
    background: radial-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.0));
  }
  
  .lifeline-float-main .lifeline-float-link:active,
  .lifeline-float-main .lifeline-float-initial-link:active {
    transform: translateY(0);
    background: rgba(158, 240, 249, 0.15);
  }
  
  .contact-form button:active {
    transform: scale(0.98);
  }
  
  /* Larger touch-friendly sliders */
  input[type="range"] {
    height: 12px;
  }
  
  input[type="range"]::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    margin-top: -8px;
  }
  
  input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
  }
}

/* Prevent widget from interfering with mobile navigation */
@media (max-width: 1024px) {
  .mobile-nav.active ~ #lifeline-float-widget-container .lifeline-float-main {
    z-index: 997; /* Below mobile nav (999) and overlay (998) */
    opacity: 0.5;
    pointer-events: none;
  }
  
  .mobile-nav.active ~ #lifeline-float-widget-container .lifeline-float-main .lifeline-float-panel {
    opacity: 0;
    pointer-events: none;
  }
}

/* Smooth transitions for all screen sizes */
.lifeline-float-main,
.lifeline-float-main .lifeline-float-icon,
.lifeline-float-main .lifeline-float-panel,
.lifeline-float-main .lifeline-float-bubble {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Scrollbar Styling for Panel */
.lifeline-float-main .lifeline-float-panel::-webkit-scrollbar {
  width: 8px;
}

.lifeline-float-main .lifeline-float-panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.lifeline-float-main .lifeline-float-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(158, 240, 249, 0.4), rgba(100, 200, 220, 0.4));
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.lifeline-float-main .lifeline-float-panel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(158, 240, 249, 0.6), rgba(100, 200, 220, 0.6));
}

/* Firefox scrollbar */
.lifeline-float-main .lifeline-float-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(158, 240, 249, 0.4) rgba(0, 0, 0, 0.2);
}

/* Scroll shadow indicator at bottom of panel */
.lifeline-float-main .lifeline-float-panel::after {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lifeline-float-main .lifeline-float-panel.has-scroll::after {
  opacity: 1;
}

/* Add body padding to avoid widget overlap on small screens */
@media (max-width: 480px) {
  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/*====================================================
Assessment Performance Test Styles
====================================================*/

/* Situational Awareness Test */
.sa-image-container {
  margin: 1rem 0;
  text-align: center;
  border: 2px solid var(--lifeline-global-accent);
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
}

.sa-test-image {
  max-width: 100%;
  height: auto;
  display: block;
}

.sa-questions {
  margin-top: 1rem;
}

.sa-question-prompt {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--lifeline-float-panel-text);
}

.sa-start-btn {
  margin-top: 1rem;
}

/* Scenario Decision Test */
.scenario-container {
  margin: 1rem 0;
}

.scenario-block {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.scenario-block h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--lifeline-global-accent);
}

.scenario-text {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  color: var(--lifeline-float-panel-text);
}

.scenario-timer {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.timer-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #4ecdc4, #ff6b6b);
  transition: width 3000ms linear;
}

.scenario-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scenario-option {
  background: rgba(71, 96, 124, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 0.75rem;
  color: #fff;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scenario-option:hover {
  background: rgba(71, 96, 124, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateX(4px);
}

.scenario-option.selected {
  background: rgba(78, 205, 196, 0.3);
  border-color: #4ecdc4;
}

.scenario-complete {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.scenario-complete h3 {
  color: var(--lifeline-global-accent);
  margin-bottom: 1rem;
}

.score-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4ecdc4;
  margin: 1rem 0;
}

.score-interpretation {
  font-size: 0.9rem;
  color: var(--lifeline-float-panel-text);
  line-height: 1.5;
}

.scenario-start-btn {
  margin-top: 1rem;
}

/* Performance assessment button variations */
.performance-assessment .lifeline-float-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.performance-assessment .lifeline-float-link:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Priority Sliders */
.slider-label {
  display: block;
  font-size: 0.9rem;
  color: var(--lifeline-float-panel-text);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.slider-label:first-of-type {
  margin-top: 0;
}

.priority-slider {
  width: 100%;
}

/* Dynamic Loader Priority Sliders */
.priority-sliders {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slider-row label {
  font-size: 0.9rem;
  color: var(--lifeline-float-panel-text);
  font-weight: 500;
}

.slider-scale {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slider-scale span {
  font-size: 0.85rem;
  color: var(--lifeline-global-accent);
  min-width: 1.5rem;
  text-align: center;
}

.slider-scale input[type="range"] {
  flex: 1;
}

.slider-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #4ecdc4;
  text-align: center;
  min-width: 2rem;
}

/* Radio Button Groups */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.radio-option input[type="radio"] {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--lifeline-global-accent);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.radio-option input[type="radio"]:checked {
  border-color: #4ecdc4;
}

.radio-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.625rem;
  height: 0.625rem;
  background: #4ecdc4;
  border-radius: 50%;
}

.radio-option span {
  color: var(--lifeline-float-panel-text);
  font-size: 0.95rem;
}

/* Checkbox Groups */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative; /* anchor any absolute children (hidden inputs) */
}

.checkbox-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.checkbox-option input[type="checkbox"] {
  /* Visually hide native checkbox but keep it accessible */
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
}

.checkbox-option .checkbox-box {
  width: 18px;
  height: 18px;
  border: 2px solid #333;
  border-radius: 4px;
  flex-shrink: 0;
  display: inline-block;
  position: relative;
}

.checkbox-option .checkbox-box::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  top: 2px;
  left: 6px;
  transform: rotate(45deg) scale(0);
  transition: transform 0.18s ease-in-out;
}

/* When the input is checked, target the visual box that follows */
.checkbox-option input[type="checkbox"]:checked + .checkbox-box {
  background: radial-gradient(hsl(215, 75%, 25%, .75), hsla(215, 75%, 25%, 0.6));
  border-color: #1a3e65;
}
.checkbox-option input[type="checkbox"]:checked + .checkbox-box::after {
  transform: rotate(45deg) scale(1);
}

.checkbox-option .checkbox-label-text {
  color: var(--lifeline-float-panel-text);
  font-size: 0.95rem;
}

/* Situational Awareness (SA) test styles */
.sa-test-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}
.sa-test-instructions p {
  margin: 0.25rem 0;
  color: var(--lifeline-float-panel-text);
}
.sa-test-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 0;
}
.sa-test-image-wrapper img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}
.sa-test-questions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.sa-question {
  padding: 0.75rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
}
.sa-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.sa-option input[type="radio"] {
  flex-shrink: 0;
}
.sa-option:hover { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); }

/* Scenario test styles */
.scenario-test-instructions { margin-bottom: 0.5rem; }
.scenario-test-scenarios { display:flex; flex-direction:column; gap:0.5rem; }
.scenario { padding: 0.75rem; border-radius: 8px; border:1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.02); }
.scenario-option { display:inline-block; margin:0.25rem 0.25rem 0 0; padding:0.45rem 0.75rem; border-radius:6px; cursor:pointer; background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.04); }
.scenario-option:hover { background: rgba(255,255,255,0.05); }

/* Training Plan Summary */
.training-plan-summary {
  background: rgba(71, 96, 124, 0.15);
  border: 1px solid rgba(71, 96, 124, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

/* Global choice container spacing override (safeguard) */
.lifeline-float-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.training-plan-summary h4 {
  color: #fff;
  font-size: 1.1rem;
  margin: 0 0 0.75rem 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5rem;
}

.plan-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.highlight-item {
  color: var(--lifeline-float-panel-text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.highlight-item strong {
  color: #fff;
  display: inline-block;
  min-width: 140px;
}

.plan-note {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(206, 206, 206, 0.9);
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
}

