/* checklist-tool.css */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background: #F8EFE0;
  color: #140F50;
}

.form-container {
  max-width: 900px;
  margin: 2em auto;
  padding: 0 1em;
}

/* hide report areas until report is generated */
#reportSummary,
#dashboard,
#chart,
#output {
  display: none;
}

.name-fields {
  display: flex;
  gap: 2em;
  margin-bottom: 1em;
}

.field-group {
  flex: 1;
}

label {
  display: block;
  margin: 1em 0 0.5em;
  font-weight: bold;
}

input[type="text"],
input[type="url"] {
  width: 100%;
  padding: 0.7em;
  border: 1px solid #ccc;
  border-radius: 5px;
}

textarea {
  width: 100%;
  padding: 0.7em;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: monospace;
}

.strengths-areas {
  display: flex;
  gap: 1em;
  margin: 1em 0;
}

fieldset {
  border: 2px solid #836bff;
  border-radius: 8px;
  padding: 1em;
  margin-bottom: 2em;
  background: #fff;
}

legend {
  font-weight: bold;
  padding: 0 0.5em;
  font-size: 1.1em;
}

.help-icon {
  margin-left: 0.5em;
  text-decoration: none;
  font-weight: bold;
  border: 1px solid #140F50;
  border-radius: 50%;
  width: 1.2em;
  height: 1.2em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
  color: #140F50;
}

/* ——— Slider styling with filled track ——— */

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  outline: none;
  margin: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
  border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #1448FF;
  border: 2px solid #fff;
  border-radius: 50%;
  margin-top: -6px; /* (thumb height - track height)/2 */
  cursor: pointer;
  z-index: 3;
  position: relative;
}

input[type="range"]::-moz-range-track {
  height: 8px;
  background: #ddd;
  border-radius: 4px;
}

input[type="range"]::-moz-range-progress {
  background: #1448FF;
  height: 8px;
  border-radius: 4px;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #1448FF;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
}

/* slider-container with ticks */
.slider-container {
  position: relative;
  margin-top: 0.5em;
}

.slider-container .ticks {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 0;
  pointer-events: none;
  z-index: 1;
}

.slider-container .ticks span {
  position: absolute;
  top: 0;
  width: 12px;
  height: 12px;
  border: 2px solid #1448FF;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
}

.slider-container .ticks span:nth-child(1) { left:   0%; }
.slider-container .ticks span:nth-child(2) { left:  33.333%; }
.slider-container .ticks span:nth-child(3) { left:  66.666%; }
.slider-container .ticks span:nth-child(4) { left: 100%; }
/* ——— end slider styling ——— */

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85em;
  margin-top: 0.2em;
  padding: 0 0.2em;
  color: #555;
}

.primary {
  background: #1448FF;
  color: white;
  font-weight: bold;
  font-size: 1em;
  padding: 0.75em 1.5em;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 1em;
}

.output-section {
  margin-top: 2em;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}

.dashboard-table th,
.dashboard-table td {
  border: 1px solid #ccc;
  padding: 0.5em;
  text-align: left;
}

.dashboard-table tr.low-score {
  background: #ffe6e6;
}

.output-section canvas {
  display: block;
  margin: 2em auto;
  max-width: 100%;
}

.output-section textarea {
  border: 1px solid #ccc;
  padding: 1em;
  border-radius: 5px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.action-buttons {
  display: flex;
  gap: 1em;
  margin-top: 1em;
}

.action-buttons button {
  background: #836BFF;
  color: white;
  font-weight: bold;
  padding: 0.6em 1.2em;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

footer {
  text-align: center;
  background: #140F50;
  color: white;
  padding: 1em;
  margin-top: 3em;
}

footer a {
  color: white;
  text-decoration: underline;
}
