#symptom-checker {
    width: 800px;
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

#symptom-input {
    width: calc(100% - 20px);
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
    display: block;
}

.autocomplete-list {
    border: 1px solid #ccc;
    border-radius: 5px;
    background: white;
    max-height: 150px;
    overflow-y: auto;
    position: absolute;
    width: calc(100% - 40px);
    z-index: 10;
    left: 20px;
    display: none;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
}

.autocomplete-item:hover {
    background: #007BFF;
    color: white;
}

/* lock the symptom-container to a row of [chip] [grid] [remove] */
/* .symptom-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 5px;
    padding: 5px 20px;
    background: #f9f9f9;
    border-radius: 5px;
} */

/* turn each symptom line into 3 columns: symptom | grid | remove */
.symptom-container {
    display: grid;
    grid-template-columns: 300px 1fr auto;
    column-gap: 75px;
    align-items: center;
    padding: 4px 30px;
    background: #f9f9f9;
    border-radius: 5px;
    margin: 8px;
}

.symptom-chip {
    flex: 0 0 300px;           /* never shrink/grow, always 250px */
    max-width: 300px;          /* but don’t exceed 300px if the text’s long */
    background: #007BFF;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    white-space: nowrap;
    text-align: center;
}

.symptom-chip:hover {
    background: #0056b3;
}

.severity-select {
    flex: 1;
    padding: 5px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
}

/* each line: label + number input */
.severity-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0;
    padding: 0;
    line-height: 1;         /* keep label and input close together */
}

.severity-row label {
    flex: 0 0 80px;       /* all labels get exactly 80px */
    white-space: nowrap;
    font-size: 0.9em;
}

.severity-row input {
    flex: 0 0 100px;        /* all qty inputs get exactly 50px */
    padding: 2px 4px;       /* only a few pixels of padding */
    height: auto;           /* let line-height dominate */
    line-height: 1.2;       /* ensure the text sits nicely */
}

.severity-label {
    width: 80px;
    font-size: 14px;
}

.severity-quantity {
    width: 50px;
    flex: none;                /* don’t let the flexbox stretch them */
    padding: 0 4px;
    margin: 0;                 /* kill any bottom margin */
    /* font-size: 14px; */
    height: 22px;              /* fixed, slim height */
    font-size: 0.9em;          /* slightly smaller text */
    line-height: 22px;         /* vertically center the number */
    box-shadow: none;          /* drop any input-shadow */
    border: 1px solid #ccc;
    border-radius: 3px;
    text-align: center;
}

/* container around all five severity inputs */
.severity-grid {
    display: flex;
    flex-direction: column;
    flex: 1;               /* take up remaining width */
    gap: 4px;              /* space between rows */
    margin: 0 10px;        /* small left/right gutter */
}

.remove-button {
    flex: 0 0 30px;
    margin: 5px;
    height: 30px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-button:hover {
    background: #c82333;
}

.symptom-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.symptom-button {
    background: #eee;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
}

.symptom-button:hover {
    background: #ddd;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    background: #28a745;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 20px;
}

button:hover {
    background: #218838;
}

#results {
    margin-top: 20px;
    padding: 10px;
    border-top: 1px solid #ddd;
    background: #fff;
    display: none;
}

/* General styling for all input elements */
input {
    width: calc(100% - 20px); /* Make inputs align with other elements */
    padding: 12px; /* Add padding for better usability */
    font-size: 16px; /* Consistent font size */
    border: 1px solid #ccc; /* Neutral border color */
    border-radius: 5px; /* Rounded corners for a modern look */
    margin-bottom: 15px; /* Add spacing below inputs */
    display: block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    transition: border-color 0.3s, box-shadow 0.3s; /* Smooth transitions */
}

/* Focus state for input elements */
input:focus {
    border-color: #007BFF; /* Blue border on focus */
    box-shadow: 0 0 6px rgba(0, 123, 255, 0.5); /* Highlighted shadow */
    outline: none; /* Remove default outline */
}

/* Specific styling for number inputs (e.g., quantity or road length) */
input[type="number"] {
    appearance: textfield; /* Standard property for compatibility */
    -moz-appearance: textfield; /* Remove spinner in Firefox */
    width: calc(100% - 20px); /* Ensure it fits within the container */
    padding: 10px; /* Match padding with other inputs */
    font-size: 16px; /* Consistent font size */
    margin: 0; /* Center-align and add spacing below */
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none; /* Remove spinner in Chrome */
    margin: 0;
}

/* Specific styling for quantity input */
.quantity-input {
    flex: 1; /* Ensure it aligns with other flex items */
    padding: 5px; /* Match padding with other elements */
    font-size: 14px; /* Match font size with other elements */
    border: 1px solid #ccc; /* Neutral border color */
    border-radius: 5px; /* Rounded corners for consistency */
    margin: 0; /* Remove margin to align vertically */
    height: 8px; /* Let the height adjust naturally */
    text-align: center; /* Center-align the text */
    box-shadow: none; /* Remove extra shadow for consistency */
}

/* Super-compact qty inputs */
input.severity-quantity {
    box-sizing: border-box;       /* include border in height calculation */
    width: 50px;                  /* fixed narrow width */
    height: 20px;                 /* slim height */
    padding: 0 4px;               /* no vertical padding, small horizontal */
    margin: 0;                    /* kill global bottom margin */
    font-size: 0.85em;            /* slightly smaller text */
    line-height: 20px;            /* center the text vertically */
    border-radius: 3px;           /* small rounded corners */
    border: 1px solid #ccc;       /* match style but stay slim */
    box-shadow: none;             /* remove any shadow */
    display: inline-block;        /* don’t stretch in flex/grid */
    appearance: none;             /* remove native styling */
    -moz-appearance: textfield;   /* Firefox number field */
}
  
/* Remove spinner arrows in WebKit browsers */
input.severity-quantity::-webkit-inner-spin-button,
input.severity-quantity::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* make the checkbox + label sit on one line */
#table-options {
    display: flex;
    align-items: center;
    gap: 8px;          /* space between box and text */
    margin-top: 10px;  /* or whatever spacing you prefer */
}

/* don’t let the global input rule blow your checkbox up */
#table-options input[type="checkbox"] {
    width: auto;       /* natural width */
    padding: 0;        /* remove all padding */
    margin: 0;         /* remove any default margins */
    display: inline-block;
    vertical-align: middle;
}
  
/* nudge the label back up beside the box */
#table-options label {
    margin: 0;
    display: inline-block;
    vertical-align: middle;
}

#road-selector {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
}

#road-selector svg {
    width: 100%;
    height: auto;
    user-select: none;
}

/* Make every group in your road-selector SVG look clickable */
#road-selector svg g {
    cursor: pointer;
}

#road-selector svg g {
    transition: fill 0.2s, stroke 0.2s;
}

/*  
  1) Allow pointer events on every shape inside each group  
  2) Force our hover/active fill to override the SVG's inline fill
*/
#road-selector svg g,
#road-selector svg g * {
  pointer-events: all;
}

/* Hover = light, quick tint */
#road-selector svg g:hover,
#road-selector svg g:hover * {
  fill: rgba(0, 123, 255, 0.15) !important;
  fill-opacity: 1 !important;
  stroke: rgba(0, 86, 179, 0.8) !important;
  transition: fill 0.1s, stroke 0.1s;
}

/* Active = stronger tint + outline */
#road-selector svg g.active,
#road-selector svg g.active * {
  fill: rgba(0, 86, 179, 0.5) !important;
  fill-opacity: 1 !important;
  stroke-width: 1.2 !important;
  transition: fill 0.1s, stroke-width 0.1s;
}
.step {
    display: none;
}

.step-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.step-nav .nav-item {
    background: #eee;
    padding: 6px 12px;
    border-radius: 4px;
}

.step-nav .nav-item.active {
    background: #007BFF;
    color: #fff;
}

.navigation {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.navigation button {
    width: 48%;
}

.navigation.justify-right {
    justify-content: flex-end;
}

.navigation.justify-right button {
    width: 48%;
}

.navigation.single {
    justify-content: center;
}

.navigation.single button {
    width: 48%;
}

.step1-grid {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.step1-grid > div {
    flex: 1;
    text-align: center;
}

.road-length input {
    width: 65%;
    display: block;
    margin: 0 auto;
}

.step1-grid label {
    display: block;
    margin-bottom: 8px;
}

.material-toggle {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    width: 100%;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
}

.material-toggle input {
    display: none;
}

.material-toggle label {
    flex: 1;
    display: block;
    padding: 8px 0;
    cursor: pointer;
    text-align: center;
    user-select: none;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #f0f0f0;
    transition: background 0.2s;
}

.material-toggle label:hover {
    background: #e0e0e0;
}

.material-toggle input:checked + label {
    background: #007BFF;
    color: #fff;
    border-color: #007BFF;
}