body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 700px;
}

header h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    font-size: 2em;
}

.mode-selection {
    margin-bottom: 25px;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 6px;
    background-color: #f9f9f9;
}

.mode-selection legend {
    font-weight: 500;
    color: #34495e;
    padding: 0 10px;
    font-size: 1.1em;
}

.mode-selection div {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}
.mode-selection div:last-child {
    margin-bottom: 0;
}

.mode-selection input[type="radio"] {
    margin-right: 8px;
    accent-color: #3498db;
}

.calculator-section {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
}

.calculator-section h2 {
    margin-top: 0;
    color: #3498db;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.calculator-section h3.passenger-title {
    font-size: 1.2em;
    color: #2980b9;
    margin-top: 20px;
    margin-bottom: 10px;
}

.input-group {
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.input-group label {
    font-weight: 500;
    color: #555;
    flex-basis: 100%; /* Full width for label on small screens */
}

.input-group input[type="date"],
.input-group input[type="text"] { /* If any text inputs were added */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    flex-grow: 1;
    min-width: 180px; /* Ensure date input is sufficiently wide */
}

.input-group input[type="date"]:disabled {
    background-color: #eee;
    cursor: not-allowed;
}


.input-group .add-btn {
    padding: 10px 15px;
    font-size: 0.95em;
}

.calculation-date-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calculation-date-group > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calculation-date-group input[type="checkbox"] {
    margin-right: 5px;
    accent-color: #3498db;
}

.date-list {
    list-style-type: none;
    padding-left: 0;
    margin-top: 10px;
    margin-bottom: 20px;
}

.date-list li {
    background-color: #e9f5fd;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    border: 1px solid #bde0fe;
}

.date-list .remove-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.date-list .remove-btn:hover {
    background-color: #c0392b;
}

.actions {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 25px;
    margin-top: 10px;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

button:active {
    transform: translateY(1px);
}

.primary-btn {
    background-color: #3498db;
    color: white;
}

.primary-btn:hover {
    background-color: #2980b9;
}

.secondary-btn {
    background-color: #95a5a6;
    color: white;
}

.secondary-btn:hover {
    background-color: #7f8c8d;
}

.add-btn {
    background-color: #2ecc71;
    color: white;
}
.add-btn:hover {
    background-color: #27ae60;
}


#resultsSection {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f9f9f9;
}

#resultsSection h2 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.results-output p, .results-output div {
    margin-bottom: 8px;
    font-size: 1.05em;
}

.results-output .result-item {
    padding: 8px;
    background-color: #e0f7fa;
    border-left: 4px solid #007bff;
    margin-bottom: 10px;
    border-radius: 0 4px 4px 0;
}

.error-messages {
    margin-top: 15px;
}

.error-messages .error-item {
    color: #c0392b;
    background-color: #fdd;
    padding: 10px;
    border-left: 4px solid #c0392b;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group label {
        margin-bottom: 5px; /* Add some space when stacked */
    }

    .input-group input[type="date"],
    .input-group .add-btn {
        width: 100%;
        box-sizing: border-box;
    }
    
    .input-group .add-btn {
        margin-top: 5px;
    }

    .actions {
        flex-direction: column;
    }

    .actions button {
        width: 100%;
    }

    .calculation-date-group {
        align-items: flex-start;
    }
     .calculation-date-group > div {
        width: 100%; /* Ensure labels and inputs take full width */
    }
    .calculation-date-group label[for="healthCalcDate"] {
        margin-bottom: 5px;
    }
    .calculation-date-group input[type="date"] {
         width: calc(100% - 22px); /* Adjust for padding/border */
    }
}
