body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: white;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

h1, h2 {
    color: #333;
    text-align: center;
}

h3.subheading {
    color: #666;
    text-align: center;
    margin-top: -1em;
    margin-bottom: 2em;
}

.info-line {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 0.2em;
}

.info-line-bold {
    font-size: 0.9em;
    color: #777;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 2em;
}

.field-info {
    font-size: 0.8em;
    color: #888;
    margin-top: 0.2em;
    margin-bottom: 0.5em;
}

.form-group {
    margin-bottom: 1.5em;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5em;
    color: #555;
}

.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 0.8em;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px; /* Prevents mobile zoom on input focus */
}

/* Style for the slider */
.form-group input[type="range"] {
    -webkit-appearance: none;
    width: 90%;
    height: 10px;
    background: #ddd;
    outline: none;
    border-radius: 5px;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #007BFF;
    border-radius: 50%;
    cursor: pointer;
}

.form-group #tabValueDisplay {
    display: inline-block;
    width: 10%;
    text-align: center;
    font-weight: bold;
}

.form-group input.error,
.form-group select.error,
.button-options-row.error {
    border: 2px solid #ff4d4d;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1em;
}

.hidden {
    display: none;
}

/* New style to group the label and input for handouts */
.handout-input-group {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
}

.handout-input-group:first-of-type {
    border-top: none;
    padding-top: 0;
}

.handout-input-group input {
    font-size: 16px; /* Prevents mobile zoom on input focus */
}

/* New CSS rule for spacing within the Multi Page Handouts section */
#multiPage-input-group label:last-of-type {
    margin-top: 1em; 
}

/* New CSS rule for spacing between Q14 buttons and Q15 label */
#certificateOptions label[for="numCerts"] {
    margin-top: 1em;
}


button {
    width: 100%;
    padding: 1em;
    border: none;
    background-color: #007BFF;
    color: white;
    font-size: 1em;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3;
}

/* New button styles */
.button-group {
    display: block;
    text-align: left;
}

.button-options {
    display: flex;
    gap: 10px;
}

.option-button {
    flex: 1;
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ccc;
    font-weight: normal;
    padding: 0.8em;
    text-align: center;
    transition: all 0.2s;
    margin-top: 0; /* Override default button margin */
}

.option-button:hover {
    background-color: #eaf3ff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.option-button.active {
    background-color: #007BFF;
    color: white;
    border-color: #007BFF;
    font-weight: bold;
}

/* Handout options as buttons in a row */
.button-options-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center; /* Center the buttons */
}

.toggle-button {
    flex: 1; /* Distribute space equally */
    position: relative;
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ccc;
    padding: 1em;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    user-select: none; /* Prevent text selection */
    min-width: 150px; /* Ensure buttons don't get too small */
}

.toggle-button:hover {
    background-color: #e0e0e0; /* Reverted to previous hover color */
}

.toggle-button.active {
    background-color: #28a745; /* Green for active */
    color: white;
    border-color: #28a745;
}

.toggle-button .tick-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2em;
    color: white; /* White tick for active buttons */
    display: none; /* Hidden by default */
}

.toggle-button.active .tick-icon {
    display: block; /* Show tick for active buttons */
}

/* New Image Selection styles for Q5 */
.image-options-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.image-option {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
    flex-basis: 22%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.image-option img {
    width: 100%;
    height: auto;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.image-option span {
    display: block;
    padding: 5px;
    font-size: 0.9em;
    color: #555;
    width: 100%;
    box-sizing: border-box;
}

.image-option:hover {
    transform: scale(1.05);
    background-color: #eaf3ff;
}

.image-option.active {
    border-color: #007BFF;
    background-color: #eaf3ff;
}

.image-option.active span {
    color: #007BFF;
}

#result {
    margin-top: 2em;
    text-align: center;
    border-top: 1px solid #ddd;
    padding-top: 1em;
}

#totalCost {
    font-size: 2em;
    font-weight: bold;
    color: #007BFF;
}