/* Logout button tweaks */
#logoutBtn {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 8px;
  background: #8b0000;
  border: 1px solid #ff4d4d;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}

#logoutBtn:hover {
  background: #a40000;
  box-shadow: 0 0 12px rgba(255, 50, 50, 0.85), 0 0 20px rgba(255, 0, 0, 0.4);
}
/* Component styles */
.btn {
    background: linear-gradient(45deg, #129990, #90D1CA);
    border: none;
    padding: 18px 36px;
    border-radius: 30px;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 12px;
}

@media (max-width: 768px) {
    .btn { padding: 12px 22px; font-size: 1rem; border-radius: 24px; }
}

body.light .btn { 
    background: #65cfba; 
    color: #011f19; 
}

body.light .btn:hover { box-shadow: 0 10px 20px rgba(1,31,25,0.18); }

.theme-toggle { padding: 8px 14px; border-radius: 10px; }
body.light .theme-toggle { background: rgba(255,255,255,0.85); color: #011f19; }

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(18, 153, 144, 0.35);
}

/* Micro-animations */
@keyframes idlePulse {
    0% { transform: translateY(0); box-shadow: 0 0 0 rgba(0,114,178,0); }
    50% { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,114,178,0.18); }
    100% { transform: translateY(0); box-shadow: 0 0 0 rgba(0,114,178,0); }
}

@keyframes starGlow {
    0%, 100% {
        filter: 
            drop-shadow(0 0 10px #FBC02D) 
            drop-shadow(0 0 20px rgba(251,192,45,0.8)) 
            drop-shadow(0 0 40px rgba(251,192,45,0.6)) 
            drop-shadow(0 0 60px rgba(251,192,45,0.4));
    }
    50% {
        filter: 
            drop-shadow(0 0 15px #FBC02D) 
            drop-shadow(0 0 30px rgba(251,192,45,0.9)) 
            drop-shadow(0 0 50px rgba(251,192,45,0.7)) 
            drop-shadow(0 0 80px rgba(251,192,45,0.5));
    }
}

.radar-point {
    animation: starGlow 2s ease-in-out infinite, radarPulse 2.6s ease-in-out infinite;
}

body.light .radar-point {
    animation: lightStarGlow 1.5s ease-in-out infinite, radarPulse 2.6s ease-in-out infinite;
}

@keyframes lightStarGlow {
    0% {
        filter: drop-shadow(0 0 12px rgba(251, 192, 45, 1))
               drop-shadow(0 0 28px rgba(251, 192, 45, 0.98))
               drop-shadow(0 0 56px rgba(251, 192, 45, 0.9));
    }
    50% {
        filter: drop-shadow(0 0 22px rgba(255, 215, 0, 1))
               drop-shadow(0 0 44px rgba(255, 215, 0, 0.98))
               drop-shadow(0 0 88px rgba(255, 215, 0, 0.9));
    }
    100% {
        filter: drop-shadow(0 0 12px rgba(251, 192, 45, 1))
               drop-shadow(0 0 28px rgba(251, 192, 45, 0.98))
               drop-shadow(0 0 56px rgba(251, 192, 45, 0.9));
    }
}

@keyframes radarPulse {
    0% { r: 15px; }
    50% { r: 18px; }
    100% { r: 15px; }
}

@keyframes selectionPop {
    0% { transform: scale(1); }
    60% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

.back-btn {
    background: rgba(9, 107, 104, 0.35);
    color: #DDF4E7;
    border: 2px solid rgba(9, 107, 104, 0.55);
}

body.light .back-btn {
    background: rgba(1, 31, 25, 0.06);
    color: #011f19;
    border-color: rgba(1,31,25,0.25);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Light mode button variant inside forms */
body.light #leadForm .btn { 
    background: #65cfba; 
    color: #011f19; 
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #129990, #90D1CA);
    border-radius: 3px;
    transition: width 0.3s ease;
}

body.light .progress-bar { background: rgba(1,31,25,0.2); }
body.light .progress-fill { 
    background: #65cfba; 
}

/* Place the assessment level bar near the very top and make it thicker */
.assessment-screen .progress-bar {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: min(92vw, 800px);
    height: 15px;
    margin: 0;
    z-index: 5;
    animation: progressBarFadeIn 3s ease-in;
}

@media (max-width: 768px) {
  .assessment-screen .progress-bar { top: 80px; }
}

@keyframes progressBarFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.slider-wrap { margin-top: 10px; display:flex; align-items:center; gap:12px; justify-content:center; margin-bottom: 10px; margin-top: 30px; width: 100%;}
.slider-wrap input[type=range] { width: 280px; display: block; margin: 0 auto; }
.slider-wrap #sliderStars { min-width: 72px; text-align:left; }

@media (max-width: 768px) {
  .slider-wrap { flex-direction: column; align-items: center; gap: 8px; }
  .slider-wrap #sliderStars { min-width: 0; text-align: center; }
}

.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Booking time slots */
.times-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
}
.time-slot {
    padding: 12px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    text-align: center;
}
.time-slot.selected { border-color: #129990; background: rgba(18,153,144,0.2); }
body.light .time-slot { background: rgba(255,255,255,0.9); border-color: rgba(1,31,25,0.25); color: #011f19; }
body.light .time-slot.selected { border-color: #65cfba; background: rgba(101,207,186,0.2); }

/* Thank-you CTAs layout */
.cta-row { display:flex; flex-wrap:wrap; justify-content:center; gap:12px; }

.attribute-question {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: white;
}

.attribute-tips {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.5;
    color: white;
}

.rating-option {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    animation: idlePulse 6s ease-in-out infinite;
}

body.light .rating-option { background: rgba(255,255,255,0.9); border-color: rgba(1,31,25,0.12); }

.rating-option:hover {
    border-color: #129990;
    transform: translateY(-5px);
}

.rating-option.selected {
    border-color: #129990;
    background: rgba(18, 153, 144, 0.2);
    animation: selectionPop 300ms ease-out;
}

body.light .rating-option.selected { border-color: #65cfba; background: rgba(101, 207, 186, 0.25); }

/* Stars and labels */
.stars { color: #f5c300; }
body.light .stars { color: #f5c300; }
.rating-label { color: inherit; font-weight: 600; }
/* Keep labels dark in light mode for contrast */
body.light .rating-label { color: #011f19; text-shadow: none; }

/* Theme Slider */
.theme-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-label {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

body.light .theme-label {
    color: rgba(1,31,25,0.7);
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.2);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #65cfba;
}

body.light .slider {
    background-color: rgba(1,31,25,0.2);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Theme Slider Icons */
.theme-label {
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.theme-dark-icon {
    margin-right: 10px;
}

.theme-light-icon {
    margin-left: 10px;
}

body.light .theme-dark-icon {
    opacity: 0.4;
}

body.light .theme-light-icon {
    opacity: 1;
}

body:not(.light) .theme-dark-icon {
    opacity: 1;
}

body:not(.light) .theme-light-icon {
    opacity: 0.4;
}

/* Background Music Controller */
.music-controller {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    z-index: 50;
}

body.light .music-controller {
    background: rgba(255,255,255,0.9);
    border-color: rgba(1,31,25,0.2);
}

.music-btn {
    appearance: none;
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: #fff;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.25);
    transition: transform .2s ease, background .2s ease;
}

.music-btn:hover { transform: translateY(-1px); }

body.light .music-btn {
    color: #011f19;
    background: rgba(1,31,25,0.06);
    border-color: rgba(1,31,25,0.2);
}

.music-volume { width: 110px; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000;
}

.modal-overlay[hidden] { display: none !important; }

.modal-card {
    width: min(92vw, 560px);
    background: #096B68;
    border: 1px solid #90D1CA;
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    color: #fff;
    text-align: center;
}

body.light .modal-card {
    background: rgba(255,255,255,0.95);
    border-color: rgba(1,31,25,0.2);
    color: #011f19;
}

.modal-card h3 { margin-bottom: 10px; font-size: 1.6rem; }
.modal-card p { opacity: .95; margin-bottom: 16px; }
.modal-actions { display:flex; gap:12px; justify-content:center; }

/* Chart tooltip */
#chartTooltip {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-9999px, -9999px);
    pointer-events: none;
    background: rgba(9,107,104,0.95);
    color: #fff;
    border: 1px solid rgba(144, 209, 202, 0.8);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    max-width: 320px;
    z-index: 12000;
    display: none;
}
body.light #chartTooltip {
    background: #ffffff;
    color: #011f19;
    border-color: rgba(1,31,25,0.2);
}
#chartTooltip .ct-title { font-weight: 800; margin-bottom: 4px; }
#chartTooltip .ct-stars { color: #f5c300; margin-left: 6px; }
#chartTooltip .ct-status { font-weight: 700; margin-right: 6px; }
#chartTooltip .ct-text { opacity: 0.95; }
/* Hide tooltip in PDF export */
body.pdf-export #chartTooltip { display: none !important; }

/* Mobile full-screen tooltip overlay */
#chartTooltipMobile {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  z-index: 13000;
  position: fixed;
}
#chartTooltipMobile .content {
  background: #096B68;
  color: #fff;
  border: 1px solid #90D1CA;
  border-radius: 16px;
  max-width: 92vw;
  width: 92vw;
  margin-top: 40px;
  padding: 18px;
  position: relative;
}
body.light #chartTooltipMobile .content { background: #ffffff; color: #011f19; border-color: rgba(1,31,25,0.2); }
#chartTooltipMobile #chartTooltipClose {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 0;
  /* Red X icon as background */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.3 5.7a1 1 0 0 0-1.4 0L12 10.6 7.1 5.7A1 1 0 1 0 5.7 7.1L10.6 12l-4.9 4.9a1 1 0 1 0 1.4 1.4L12 13.4l4.9 4.9a1 1 0 0 0 1.4-1.4L13.4 12l4.9-4.9a1 1 0 0 0 0-1.4z' fill='%23ff3b30'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  text-indent: -9999px; /* hide any text */
  overflow: hidden;
}
#chartTooltipMobile #chartTooltipClose:hover { color: #d10000; }
#chartTooltipMobile #chartTooltipClose:focus { outline: none; }
@media (min-width: 769px) {
  #chartTooltipMobile,
  #chartTooltipMobile #chartTooltipClose { display: none !important; }
}

/* Disable animations for PDF export/capture */
body.pdf-export .radar-point { animation: none !important; }

/* -------- Tooltip sizing adjustments -------- */
#chartTooltip { font-size: 16px; line-height: 1.45; }
#chartTooltip .ct-title { font-size: 18px; }
#chartTooltip .ct-text { font-size: 16px; }
#chartTooltip .ct-stars { font-size: 17px; }
