/* GLOBAL */

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* SIDEBAR-OPEN */

@media (max-width: 768px) {
    .sidebar-open {
        display: block;
        position: fixed;
        top: 12px;
        right: 12px;
        z-index: 2001;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 4px 10px;
    }
}


/* SIDEBAR */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: white;
    color: #222;
    padding: 16px;
    box-sizing: border-box;
    border-right: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
}

.sidebar h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.4rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        border-right: none;
        z-index: 2000;
        overflow-y: auto;
    }
}

.sidebar__content {
    flex: 1;
}

.sidebar__close {
    display: none;
}

@media (max-width: 768px) {
    .sidebar__close {
        display: block;
        position: absolute;
        top: 12px;
        right: 12px;
        border: none;
        background: none;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 4px 8px;
    }
}

.sidebar__panel>h3 {
    margin-top: 24px;
    margin-bottom: 8px;
    font-size: 1rem;
}

.sidebar__panel>span {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
    margin-bottom: 8px;
}

.sidebar__panel>label {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.8;
    cursor: pointer;
}

.sidebar__version {
    flex-shrink: 0;
    text-align: right;
    font-size: 0.75rem;
    color: #666;
    padding-top: 12px;
}


/* KEY */

.key {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    line-height: 1.2;
}

.key__line {
    width: 40px;
    flex-shrink: 0;
    margin-top: 7px;
}

.key__line--major-route {
    border-top: 4px solid #A52714;
}

.key__line--major-link {
    border-top: 4px dotted #A52714;
}

.key__line--local-route {
    border-top: 2px solid #FF5252;
}

.key__text {
    display: flex;
    flex-direction: column;
}

.key__title {
    font-weight: 600;
}

.key__description {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
}


/* MAP */

#map {
    position: absolute;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
}

@media (max-width: 768px) {
    #map {
        left: 0;
    }
}


/* OTHER */

.gps-button {
    width: 34px;
    height: 34px;

    border: none;
    background: white;

    cursor: pointer;

    font-size: 18px;

    box-shadow:
        0 1px 5px rgba(0, 0, 0, 0.4);
}

.gps-button:hover {
    background: #f4f4f4;
}

.high-street-label {
    background: transparent;
    border: none;
    box-shadow: none;

    color: #000;
    font-size: 13px;
    font-weight: 600;

    pointer-events: none;
}

.high-street-label::before {
    display: none;
}

#diagnostics {
    position: fixed;
    right: 8px;
    bottom: 8px;
    width: 200px;
    height: 100px;
    background-color: #FFFFFF;
    z-index: 1000;
    padding: 8px;
    border: solid #BBBBBB 1px;
}