header {
    grid-area: header;
    display: flex;
    align-items: center;
    background-color: var(--primary);
    color: var(--color-contrast);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
    height: 74px;
}

.app-bar {
    width: 100%;
    color: var(--color-contrast);
    display: flex;
    align-items: center;
    gap: 1rem;
}

    #menu-toggle {
        display: none;
        width: 2.5rem;
        height: 2.5rem;
        background-color: var(--color-contrast);
        border: none;
        border-radius: 0.25rem;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        z-index: 1001;
        transition: transform var(--transition-fast);
        justify-content: center;
        align-items: center;
        color: #333;
    }

    #menu-toggle.open {
        /*transform: rotate(90deg);*/
    }


#global-search {
    display: flex;
    align-items: center;
    max-width: 450px;
    flex-grow: 1;
    position: relative;
}

.search-container {
    display: flex;
    overflow: hidden;
    width: 100%;
}

    .search-container.visible {
        max-width: 600px;
        opacity: 1;
    }

.search-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #bdc3c7;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    width: 100%;
}

.btn-search {
    padding: 0.5rem;
    background: #3498db;
    border: 1px solid #2980b9;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-search:hover {
        background: #2980b9;
    }

.results {
    padding: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 450px;
    height: 500px;
    max-height: calc(100vh - var(--header-height));
    background-color: white;
    box-shadow: 1px 1px 15px 0 rgba(0, 0, 0, 0.2);
    overflow: auto;
}

.result-item {
    padding: 0.75rem;
    border: 1px solid #ecf0f1;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text);
    text-decoration: none !important;
    scroll-margin: 6px;
}

    .result-item:hover {
        background: #ecf0f1;
    }

    /* aktivt/valgt resultat ved keyboard-navigation */
    .result-item.is-active,
    .btn-more.is-active {
        background: #ecf0f1;
        outline: 2px solid #bdc3c7;
    }


.result-source {
    color: #a7a7a7;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.btn-more {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    scroll-margin: 6px;
}

    .btn-more:hover {
        background: #bdc3c7;
    }


@media (max-width: 768px) {
    .app-bar {
        padding-inline: var(--spacing);
        justify-content: space-between;
    }

    #menu-toggle {
        display: flex;
    }
}