/* Base Styles for Uniformity */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    font-size: 16px; /* Base font size */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 40px 20px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 40, 70, 0.15);
    border-radius: 12px;
    padding: 30px;
}

/* --- Headers --- */
h1 {
    color: #007bff;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 2.2rem; /* Standardized H1 size */
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

h2 {
    color: #343a40;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem; /* Standardized H2 size */
    border-left: 4px solid #007bff;
    padding-left: 10px;
    font-weight: 700;
}

/* --- Toggles and Accent UI --- */
.calculator-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.toggle-button {
    padding: 10px 20px;
    border: 2px solid #007bff;
    border-radius: 6px;
    background-color: transparent;
    color: #007bff;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem; /* Standardized button size */
    transition: background-color 0.3s, color 0.3s;
}

.toggle-button.active {
    background-color: #007bff;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.toggle-button:hover:not(.active) {
    background-color: #e6f0ff;
}

/* Layout */
.main-content {
    display: flex;
    flex-wrap: wrap; 
    gap: 30px;
}

.input-sections {
    flex: 2; 
    min-width: 300px; 
}

.result-section {
    flex: 1; 
    min-width: 300px; 
}

/* Input Group Styling */
.input-group {
    margin-bottom: 25px;
    border: 1px solid #e0e6ed;
    padding: 20px;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s;
}

.input-group:hover {
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.1);
}

/* --- 2-Column Layout --- */
.grid-row {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}
.input-group > .grid-row:first-of-type {
    margin-top: 0; 
}

.grid-col {
    flex: 1; 
    min-width: 0;
}

/* --- Form Elements --- */
label {
    display: block;
    margin-top: 5px;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.95rem; /* Slightly smaller label size */
    color: #555;
}

input[type="number"], select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem; /* Standard input size */
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="number"]:disabled, select:disabled {
    background-color: #f8f9fa; 
}

input[type="number"]:focus, select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-description {
    font-size: 0.85rem; /* Standard description size */
    color: #999;
    margin-top: 5px;
    margin-bottom: 10px;
    display: block;
}
.grid-row .input-description {
    margin-top: 2px;
    margin-bottom: 15px;
}

/* New suggestion text styling */
.suggestion-text {
    font-size: 0.9rem;
    color: #0056b3;
    font-weight: 600;
    margin-top: 10px;
    display: block;
}


/* Button Styling */
button {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s, transform 0.1s;
}

button:hover {
    background-color: #0056b3;
}

/* --- RESULTS STYLING (BLACK/GREY) --- */
.result-box {
    padding: 25px;
    border: 2px solid #333; /* Black border */
    border-radius: 8px;
    background-color: #f2f2f2; /* Light grey background */
}

#gsdResults {
    border-color: #007bff !important; /* Blue accent for GSD results container */
    background-color: #e6f0ff !important;
}
#gsdResults h3 {
    color: #007bff !important;
}


.result-box h3 {
    color: #333; /* Black header */
    text-align: center;
    font-size: 1.5rem;
    margin-top: 0;
    font-weight: 700;
    padding-bottom: 5px;
}

.result-item {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #ccc;
    font-size: 1rem; /* Standard result item size */
}

.result-item strong {
    font-size: 1.1rem; /* Slightly larger result value */
    color: #333; /* Black result value */
    float: right;
    font-weight: 700;
}
/* Overriding specific colors for clarity */
.result-item strong[style*="color:red"] { color: red !important; }
.result-item strong[style*="color:orange"] { color: orange !important; }
/* Green color for recalculated duration */
.result-item strong[style*="color:green"] { color: #28a745 !important; } 

.secondary-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
}

/* New style for secondary result line */
.secondary-result-line {
    display: block;
    margin-top: -10px; /* Pull up closer to the main path line */
    margin-bottom: 12px;
    padding: 0 0 8px 0;
    border-bottom: 1px dashed #ccc;
    font-size: 1rem;
    color: #333;
}
.secondary-result-line:last-of-type {
    border-bottom: none;
}


/* Error Message - Specific styling (Blue) */
.error-box {
    color: #007bff;
    background-color: #e0f0ff;
    border: 1px solid #cce5ff;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    font-weight: 700;
    text-align: center;
    font-size: 0.95rem;
}

.error-box .calculated-value {
    color: #0056b3;
    font-size: 1.05rem;
}

/* Media Query for Responsiveness */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column; 
    }
    .container {
        margin: 20px 10px;
        padding: 20px;
    }
    .grid-row {
        flex-direction: column; 
        gap: 0; 
    }
}