/* css/style.css */

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Body styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f7f8;
  margin: 0;
  padding: 0;
  color: #333;
}

/* Fixed header for graph & explanation 
#fixedHeader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #f4f7f8;
  padding: 20px;
  border-bottom: 1px solid #ccc;
  z-index: 1000;
}
*/

/* New sticky header code */
#fixedHeader {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: #f4f7f8;
  padding: 20px;
  border-bottom: 1px solid #ccc;
  z-index: 1000;
}


#fixedHeader h1 {
  margin-bottom: 20px;
  color: #2c3e50;
  text-align: center;
}

/* Intro container: graph (2/3) and description (1/3) */
#introContainer {
  display: flex;
  max-width: 800px;
  margin: 0 auto;
  gap: 20px;
  align-items: flex-start;
}

#graphContainer {
  flex: 2;
  position: relative;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#maturityCanvas {
  width: 100%;
  height: 300px;
  display: block;
}

.hotspot {
  position: absolute;
  top: 0;
  height: 100%;
  cursor: pointer;
}

#hotspotLight {
  left: 0;
  width: 33.33%;
}

#hotspotMedium {
  left: 33.33%;
  width: 33.33%;
}

#hotspotHigh {
  left: 66.66%;
  width: 33.33%;
}

#explanationContainer {
  flex: 1;
  padding: 15px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: left;
}

/* No arrow for explanation container */
#explanationContainer::after {
  content: none;
}

#startButton {
  background-color: #2c3e50;
  color: #fff;
  border: none;
  padding: 10px;
  margin-top: 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease;
  width: 100%;
}

#startButton:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#startButton:hover:not(:disabled) {
  background-color: #34495e;
}

/* Content area for questionnaire */
#content {
  margin-top: 450px; /* Adjust to leave space for fixed header */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px;
}

/* Questionnaire (Accordion) styles */
form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.accordion-section {
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}

.accordion-header {
  background: #2c3e50;
  color: #fff;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  position: relative;
}

.accordion-header::after {
  content: '\25BC';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
}

.accordion-header.active::after {
  transform: translateY(-50%) rotate(180deg);
}

.accordion-content {
  background: #f9f9f9;
  padding: 15px;
  display: none;
}

.accordion-content.active {
  display: block;
}

.question-text {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 10px;
}

.answer-option {
  display: block;
  background-color: #e8f0fe;
  border: 1px solid #d0e1fd;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.answer-option:hover {
  background-color: #d0e1fd;
  border-color: #a1c4fd;
}

.answer-option input {
  margin-right: 8px;
}

.navigation {
  text-align: center;
  margin-top: 20px;
}

.navigation button {
  background-color: #2c3e50;
  color: #fff;
  border: none;
  padding: 10px 20px;
  margin: 0 5px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease;
}

.navigation button:hover {
  background-color: #34495e;
}

a {
  text-decoration: none;
}
/* ... existing CSS rules ... */

/* Disabled button styles */
#startButton:disabled,
.navigation button:disabled {
  background-color: #ccc;
  filter: grayscale(100%);
  cursor: not-allowed;
}

/* Optionally, also update hover state for disabled buttons (ensuring no hover effect) */
#startButton:disabled:hover,
.navigation button:disabled:hover {
  background-color: #ccc;
  filter: grayscale(100%);
}
