#navigation ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
}

#navigation li {
    float: left;
}

#navigation li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

#navigation li a:hover:not(.active) {
    background-color: #111;
}

#navigation .active {
    background-color: #04AA6D;
}

#upperright {
    position: relative;
    z-index: 2000;
}

#upperright ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
}

#upperright li {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    float: right;
}

.grid-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    background-color: #333;
}

.footer {
    font-size: small;
    float: right;
    padding: 20px;
}

/* comparison switcher (top-right): a button that opens a dropdown list of
   all available comparisons. Kept responsive so it stays usable on phones. */
.comparison-switcher {
    position: relative;
    float: right;
    font-size: small;
    z-index: 2000;
}

.cs-toggle {
    background-color: #333;
    color: white;
    border: none;
    padding: 14px 16px;
    cursor: pointer;
    font: inherit;
}

.cs-toggle:hover {
    background-color: #111;
}

.cs-list {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin: 0;
    padding: 0;
    list-style-type: none;
    background-color: #333;
    min-width: 12em;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* show the dropdown without JS: on hover, when the button is focused
   (keyboard), or when the JS enhancement adds the .cs-open class */
.comparison-switcher:hover .cs-list,
.comparison-switcher:focus-within .cs-list,
.comparison-switcher.cs-open .cs-list {
    display: block;
}

.cs-list li a {
    display: block;
    color: white;
    text-align: left;
    padding: 14px 16px;
    text-decoration: none;
}

.cs-list li a:hover {
    background-color: #111;
}

.cs-list .cs-active {
    background-color: #04AA6D;
}

/* keep touch targets large enough and let the switcher wrap on narrow
   screens instead of overflowing the header */
@media (max-width: 600px) {
    .grid-wrap {
        grid-template-columns: 1fr;
    }

    .comparison-switcher {
        float: none;
        width: 100%;
    }

    .cs-toggle {
        width: 100%;
        text-align: left;
    }

.cs-list {
    position: static;
    width: 100%;
    min-width: 0;
    box-shadow: none;
    }
}

/* comparison table (map popup) */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8em;
    table-layout: fixed;
    word-wrap: break-word;
}
.comparison-table th {
    background: #f0f0f0;
    text-align: left;
    padding: 3px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comparison-table td {
    padding: 3px 4px;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* widen Leaflet popup for comparison table */
.leaflet-popup-content {
    min-width: 400px;
    max-width: 700px;
}
/* ODP feature blocks in table view — visual separation between multiple features */
.odp-feature-block + .odp-feature-block {
    margin-top: 0.5em;
    padding-top: 0.5em;
    border-top: 1px solid #ccc;
}
.prop-different {
    background-color: #fff3cd;
}
.prop-missing {
    background-color: #ffe0b2;
}
.prop-error {
    background-color: #dc3545;
    color: white;
}
