the-header {
    flex: 0 0 4rem;
    height: 4rem;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: none;
    border-bottom: 1px solid rgba(var(--primary-rgb), .5);
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(1rem);
    box-shadow: 0px .25rem 1rem 0 rgb(0 0 0 / 50%), inset 0 0 2rem 0 rgba(var(--primary-rgb), calc(var(--glow-intensity) / 3));
    position: relative;
    padding: 0 1rem;
    gap: 1rem;
}

the-header div.content {
    flex: 0 0 auto;
    width: 100%;
    max-width: 60rem;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: stretch;
    /* overflow: hidden; */
    gap: 1rem;
}

the-header div.content div.divider {
    flex: 0 0 1px;
    background-color: rgba(var(--primary-rgb), .25);
    align-self: stretch;
}

the-header div.global {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
}

the-header div.global svg.logo {
    flex: 0 0 5.5rem;
    width: 5.5rem;
    cursor: pointer;
}
the-header div.global svg.logo .st0 {
    fill:var(--primary-color);
}
the-header div.global svg.logo .st1{
    fill: var(--input-color);
}

/* --- Consolidated Link Styles --- */
the-header div.global a,
the-header div.local a {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: .25rem;
    text-decoration: none;
}
/* Local specific link styles */
the-header div.local a {
    color: var(--primary-color);
    text-transform: uppercase;
    /* font-size: .8rem; */ /* Original local style, commented out */
    font-weight: 600;
    padding: .5rem;
    text-shadow: 0 .25rem .5rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 4));
}

the-header div.global a *,
the-header div.local a * {
    pointer-events: none;
    user-select: none; /* Added from global */
}

/* the-header div.global a.active {
    cursor: default;
    pointer-events: none;
} */

the-header div.global a svg,
the-header div.local a svg {
    filter: drop-shadow(0 .25rem .25rem rgba(var(--primary-rgb), var(--glow-intensity)));
    background: rgba(0, 0, 0, 0);
    padding: 0rem;
    cursor: pointer;
    width: 1.5rem;
    height: 1.5rem;
    fill: var(--primary-color);
}

the-header div.global a.active svg,
the-header div.local a.active svg {
    fill: var(--input-color);
    filter: drop-shadow(0 .25rem .25rem rgba(var(--input-rgb), var(--glow-intensity))); /* Added from global */
}

the-header div.global a span,
the-header div.local a span {
    color: var(--primary-color);
    font-size: .6rem;
    font-weight: 600;
    text-transform: uppercase;
}
/* Global specific span style */
the-header div.global a span {
     text-shadow: 0 .25rem .5rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 4));
}


the-header div.global a.active span,
the-header div.local a.active span {
    color: var(--input-color);
}
/* Global specific active span style */
the-header div.global a.active span {
    text-shadow: 0 .25rem .5rem rgba(var(--input-rgb), calc(var(--glow-intensity) / 4));
}
/* Local specific active link style */
the-header div.local a.active {
    /* cursor: default; */ /* Original local style, commented out */
    color: var(--input-color);
}
/* --- End Consolidated Link Styles --- */

the-header div.local {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
    gap: 1rem;
}

the-header.loaded div.local {
    opacity: 1;
    pointer-events: all;
}

the-header[type='search'] div.local {
    gap: .5rem;
}
the-header div.local button {
    flex: 0 0 auto;
    border: 1px solid var(--primary-color);
    background: #000000;
    color: var(--primary-color);
    font-weight: 800;
    border-radius: .25rem;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}

the-header div.local button * {
    pointer-events: none;
}

the-header div.local button svg {
    width: 100%;
    height: 100%;
    fill: var(--primary-color);
}

/* Removed duplicated .local a styles as they are now consolidated above */

the-header div.local div.breadcrumb {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    font-size: .8rem;
    gap: .25rem;
}
the-header div.local div.breadcrumb a {
    padding: .5rem 0;
    color: var(--primary-color);
    text-shadow: 0 .25rem .5rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 3));
}
the-header div.local div.breadcrumb a.active {
    color: var(--input-color);
    text-shadow: 0 .25rem .5rem rgba(var(--input-rgb), calc(var(--glow-intensity) / 3));
}
the-header div.local div.breadcrumb span {
    color: rgba(var(--secondary-rgb), .75);
}

the-header div.local div.select-workflow-button {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    align-self: center;
    outline: none;
    padding: .25rem;
    flex: 0 1 auto;
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--primary-color);
    background: #000000;
    border-radius: .25rem;
    font-size: 1.25rem;
    cursor: pointer;
    user-select: none;
    /* margin: 0 auto; */
    box-shadow: 0 .5rem 1.5rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 5));
}
the-header div.local div.select-workflow-button * {
    pointer-events: none;
}
the-header div.local div.select-workflow-button span {
    flex: 1 1 auto;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 0 .5rem 1.5rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 5));
}
the-header div.local div.select-workflow-button svg {
    flex: 0 0 auto;
    filter: drop-shadow(0 .25rem .25rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 2)));
    background: rgba(0, 0, 0, 0);
    cursor: pointer;
    fill: var(--primary-color);
    width: 1.5rem;
    height: 1.5rem;
}
the-header div.local div.select-workflow-button svg:first-of-type {
    padding: .125rem;
}
the-header div.local div.select-workflow-button svg path {
    /* stroke: var(--primary-color); */
    /* filter: drop-shadow(0 .25rem .75rem rgba(var(--primary-rgb), var(--glow-intensity))); */
}

/* --- Consolidated Select Button Styles --- */
the-header div.local div.select-workflow-button,
the-header div.local div.select-folder-button {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    align-self: center;
    outline: none;
    padding: .25rem;
    flex: 0 1 auto;
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--primary-color);
    background: #000000;
    border-radius: .25rem;
    font-size: 1.25rem;
    cursor: pointer;
    user-select: none;
    /* margin: 0 auto; */
    box-shadow: 0 .5rem 1.5rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 5));
}

the-header div.local div.select-workflow-button *,
the-header div.local div.select-folder-button * {
    pointer-events: none;
}

the-header div.local div.select-workflow-button span,
the-header div.local div.select-folder-button span {
    flex: 1 1 auto;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 0 .5rem 1.5rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 5));
}

the-header div.local div.select-workflow-button svg,
the-header div.local div.select-folder-button svg {
    flex: 0 0 auto;
    filter: drop-shadow(0 .25rem .25rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 2)));
    background: rgba(0, 0, 0, 0);
    cursor: pointer;
    fill: var(--primary-color);
    width: 1.5rem;
    height: 1.5rem;
}

the-header div.local div.select-workflow-button svg:first-of-type,
the-header div.local div.select-folder-button svg:first-of-type {
    padding: .125rem;
}

the-header div.local div.select-workflow-button svg path,
the-header div.local div.select-folder-button svg path {
    /* stroke: var(--primary-color); */
    /* filter: drop-shadow(0 .25rem .75rem rgba(var(--primary-rgb), var(--glow-intensity))); */
}
/* --- End Consolidated Select Button Styles --- */


the-header div.local input[type=text] {
    flex: 1 1 auto;
    width: 100%;
    max-width: 14rem;
}
/*********** MEDIA QUERIES START HERE ***********/
@media only screen and (max-width: 720px) {

    the-header {
        flex: 0 0 3.125rem;
        height: 3.125rem;
        padding: 0 .5rem;
        gap: .5rem;
    }

    the-header div.content {
        gap: .5rem;
    }

    the-header div.global, the-header div.local {
        gap: .5rem;
    }

    the-header div.global svg.logo {
        flex: 0 1 4.75rem;
        /* width: 4.75rem; */
        height: 2.125rem;
    }

    the-header div.global a svg, the-header div.local a svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    /* the-header div.local a {
        font-size: .7rem;
    } */

    /* Combined media query styles for select buttons */
    the-header div.local div.select-workflow-button,
    the-header div.local div.select-folder-button {
        font-size: 1rem;
    }

}

@media only screen and (max-width: 640px) {
    the-header {
        flex: 0 0 5.75rem;
        height: 5.75rem;
        flex-direction: column;
        justify-content: flex-start;
        padding: .5rem;
    }
    the-header div.content {
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
    }
    the-header div.content div.global {
        justify-content: flex-start;
    }
    the-header div.content div.global svg.logo {
        margin-right: auto;
    }
    the-header div.content div.global a span {
        font-size: .5rem;
    }
    the-header div.content div.local {
        justify-content: center;
    }
}
/*********** MEDIA QUERIES END HERE ***********/
