/* Build on the first desktop-header template and preserve its mobile behavior. */
@import url("template_responsive_new.css");

@media only screen and (min-width: 601px) {
    :root {
        --right-column-width: clamp(200px, 18vw, 280px);
        --panel-gap: 16px;
    }

    .top-top {
        display: grid;
        grid-template-columns: minmax(0, 1fr) var(--right-column-width);
        gap: var(--panel-gap);
        height: 176px;
        box-sizing: border-box;
        padding: 0;
        border: 0;
        background: var(--header);
    }

    .header-left-panel {
        position: relative;
        min-width: 0;
        height: 100%;
        box-sizing: border-box;
        padding: 18px 20px 22px;
        border-radius: 5px;
        border-bottom: 1px solid rgba(255, 255, 255, .15);
        background: var(--header);
    }

    .header-left-panel .top-banner-logo img {
        width: 50%;
        height: auto;
    }

    .header-right-panel {
        position: relative;
        z-index: 101;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 100%;
        min-width: 0;
        height: 100%;
        box-sizing: border-box;
        padding: 16px;
        border-radius: 5px;
        background: var(--header);
        color: #fff;
    }

    .content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) var(--right-column-width);
        gap: var(--panel-gap);
        align-items: stretch;
    }

    .middle-panel,
    .right-panel {
        min-width: 0;
        box-sizing: border-box;
    }

    .right-panel {
        width: 100%;
    }

    .header-logout-form {
        margin: 0;
        text-align: right;
    }

    .header-logout-button {
        padding: 8px 16px;
        border: 1px solid rgba(255, 255, 255, .75);
        border-radius: 5px;
        background: #fff;
        color: var(--header);
        font: inherit;
        font-weight: 700;
        cursor: pointer;
    }

    .header-logout-button:hover,
    .header-logout-button:focus {
        background: #e5e7eb;
        outline: 2px solid #fff;
        outline-offset: 2px;
    }

    .header-user-menu {
        position: relative;
        width: 100%;
    }

    .header-user-trigger {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 9px;
        width: 100%;
        padding: 10px 0;
        border: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .5);
        background: transparent;
        color: #fff;
        font: inherit;
        font-weight: 700;
        text-align: right;
        cursor: pointer;
    }

    .header-user-arrow {
        width: 0;
        height: 0;
        border-top: 6px solid #fff;
        border-right: 5px solid transparent;
        border-left: 5px solid transparent;
        transition: transform 150ms ease;
    }

    .header-user-menu.is-open .header-user-arrow {
        transform: rotate(180deg);
    }

    .header-user-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 1100;
        display: none;
        overflow: hidden;
        border: 1px solid #d1d5db;
        border-radius: 0 0 6px 6px;
        background: #fff;
        box-shadow: 0 10px 20px rgba(0, 0, 0, .2);
    }

    .header-user-menu.is-open .header-user-dropdown {
        display: block;
    }

    .header-user-dropdown a {
        display: block;
        padding: 10px 14px;
        color: var(--text);
        text-decoration: none;
        white-space: nowrap;
    }

    .header-user-dropdown a:hover,
    .header-user-dropdown a:focus {
        background: #e5e7eb;
        color: var(--header);
        outline: none;
    }
}

@media only screen and (max-width: 600px) {
    .header-left-panel {
        display: contents;
    }

    .header-right-panel {
        display: none;
    }
}
