/* General body and layout styles */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    margin: 0;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    width: 100%;
    gap: 2rem;
}

/* Header styling */
.site-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #f4f4f4;
    border-bottom: 2px solid #ccc;
    font-family: "Anton", sans-serif;
    width: 100%;
    box-sizing: border-box;
}

/* Branding aligned to far left */
.branding {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    gap: 0.5rem;
}

.logo {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

.calculator-header {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-family: "Anton", sans-serif;
}

.calculator-header h1 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.2;
}

.calculator-header b {
    color: #666;
}

/* Styling for the calculator container */
.calculator {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    width: 100%;
    border: 5px solid #4CAF50;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    margin: 0 auto;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
    width: 100%;
}

.calculator-column,
.breakdown-column,
.map-subcolumn {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    overflow-y: auto;
    box-sizing: border-box;
}

.map-box {
    height: 200px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 6px;
    border: 1px dashed #999;
    margin-bottom: 0.5rem;
}

/* Form styling */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-family: "source sans pro", sans-serif;
    font-weight: 900;
}

form input[type="text"],
form input[type="number"],
form select,
form button {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.load-details {
    min-height: 40px;
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    background-color: #f5f5f5;
    color: #888;
    font-weight: bold;
    cursor: not-allowed;
}

.breakdownLog {
    min-height: 440px;
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 12px;
    background-color: #f5f5f5;
    color: #888;
    font-weight: 500;
    cursor: not-allowed;
    white-space: pre-wrap; 
    word-break: break-word;
    overflow-wrap: break-word;
    overflow-x: auto;
    max-width: 100%; 
}

.pricing-radio-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pricing-radio-buttons input[type="radio"] {
    margin-right: 5px;
    vertical-align: middle;
}

.pricing-radio-buttons label {
    font-size: 14px;
    font-weight: bold;
}

.pricing-radio-buttons input[id="elitePrice"] + label {
    color: #4CAF50;
}

.pricing-radio-buttons input[id="proPrice"] + label {
    color: crimson;
}

.wholesale-toggle-inline {
    display: flex;
    align-items: center;
}

.wholesale-toggle-inline label {
    font-size: 14px;
    font-weight: bold;
    margin-left: .5rem;
}

.wholesale-toggle-inline input[type="checkbox"] {
    accent-color: black;
    margin-top: .4rem;
}

form button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

form button:hover {
    background-color: #45a049;
    transform: scale(1.03);
}

#totalCost {
    font-weight: bold;
}

.help-text {
    color: red !important;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.result-navigator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
    font-weight: bold;
    font-size: 1rem;
    white-space: nowrap;
}

#resultCounter {
    text-align: center;
    display: inline-block;
}

.nav-arrow {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 5px 12px;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nav-arrow:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.nav-arrow:hover:not(:disabled) {
    background-color: #555;
}

/* Disabled input styling */
input[readonly] {
    background-color: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}

/* Focus styling for accessibility */
input:focus,
select:focus,
button:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Footer styling */
.site-footer {
    background-color: #f4f4f4;
    color: #333;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.95rem;
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 50%;
    margin: 0 auto;
    padding: 1rem 1rem;
    box-sizing: border-box;
} 

.footer-col h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-family: "Anton", sans-serif;
    letter-spacing: .25px;
}

.icon {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.footer-col p {
    margin: 0.5rem 0;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.address-text {
    display: block;
    margin-left: 0.25rem;
}

.footer-col a {
    color: #2c7a2c;
    text-decoration: none;
}

.footer-col a:hover {
    text-decoration: underline;
}

.footer-bottom {
    background-color: #ddd;
    color: #444;
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
    border-top: 1px solid #ccc;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 20px;
        width: 95vw;
    }
    .calculator-layout {
        grid-template-columns: 1fr;
    }
    .breakdownLog {
        min-height: 40px;
    }
    .site-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: static;
        text-align: center;
        gap: 1rem;
    }

    .calculator-header {
        position: static;
        transform: none;
        width: 100%;
    }

    .branding {
        align-items: center;
        justify-content: center;
    }

    .logo {
        max-height: 70px;
    }

    .form-group {
        margin-bottom: 1rem;
    }
    form input[type="text"],
    form input[type="number"],
    form select,
    form button {
        font-size: 14px;
        padding: 10px;
    }
    form button {
        font-size: 14px;
    }
    .footer-columns {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem 0.5rem;
        max-width: 90%;
    }
    
    .footer-col {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid #ccc;
    }
    
    .footer-col:last-child {
        border-bottom: none;
    }
    
    .footer-col h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .footer-col p {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        margin: 0.2rem 0;
        gap: 0.4rem;
        line-height: 1.4;
        font-size: 0.9rem;
    }
    
    .address-text {
        margin-left: 0;
        display: inline;
        text-align: left;
    }
}

@media (max-width: 480px) {
    body {
        padding: 20px;
        width: 90vw;
    }
    .calculator {
        width: 100%;
        box-shadow: none;
    }

    form button {
        font-size: 14px;
    }
}