/* Mobile account header for the home page only. Desktop header rules stay untouched. */
.dzmarket-home-page .dzm-mobile-inbox-link,
.dzmarket-home-page .dzm-mobile-menu-group {
    display: none;
}

@media (max-width: 700px) {
    .dzmarket-home-page .header > .header-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px 42px;
        align-items: center;
        column-gap: 7px;
        row-gap: 8px;
    }

    .dzmarket-home-page .header-container > .logo {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        min-width: 0;
        max-width: 100%;
    }

    .dzmarket-home-page .dzm-mobile-inbox-link {
        position: relative;
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        align-items: center;
        justify-content: center;
        justify-self: center;
        width: 40px;
        height: 40px;
        border: 1px solid #dce8e1;
        border-radius: 11px;
        background: #ffffff;
        color: #176b4b;
        text-decoration: none;
        box-shadow: 0 2px 8px rgba(20, 52, 37, 0.07);
    }

    .dzmarket-home-page .dzm-mobile-inbox-link:hover {
        background: #eef7f1;
    }

    .dzmarket-home-page .dzm-mobile-inbox-link:focus-visible,
    .dzmarket-home-page .theme-menu-button:focus-visible,
    .dzmarket-home-page .dzm-mobile-account-menu a:focus-visible {
        outline: 3px solid #2563eb;
        outline-offset: 2px;
    }

    .dzmarket-home-page .dzm-mobile-inbox-link .dzm-ui-icon {
        width: 21px;
        height: 21px;
        flex: 0 0 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .dzmarket-home-page .dzm-mobile-inbox-link .dzm-inbox-count {
        position: absolute;
        inset-block-start: -5px;
        inset-inline-end: -5px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        border: 2px solid #ffffff;
        border-radius: 999px;
        background: #dc3545;
        color: #ffffff;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        white-space: nowrap;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    }

    .dzmarket-home-page .header-container > .dzmarket-settings-anchor.dzmarket-in-header {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        width: 42px;
        min-width: 42px;
        justify-content: flex-end;
    }

    .dzmarket-home-page .header-container > .dzmarket-settings-anchor.dzmarket-in-header .theme-menu-button {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        border: 1px solid #dce8e1;
        border-radius: 11px;
        background: #ffffff;
        color: #176b4b;
        font-size: 23px;
        box-shadow: 0 2px 8px rgba(20, 52, 37, 0.07);
    }

    .dzmarket-home-page .header-container > .dzmarket-settings-anchor.dzmarket-in-header .theme-menu-button:hover {
        background: #eef7f1;
    }

    .dzmarket-home-page .header-container > .dzmarket-settings-anchor.dzmarket-in-header .theme-menu {
        max-width: calc(100vw - 24px);
    }

    .dzmarket-home-page .header-container > .dzm-header-actions {
        display: grid;
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        justify-content: stretch;
        width: 100%;
        min-width: 0;
        margin: 0;
        gap: 7px;
    }

    .dzmarket-home-page .dzm-header-actions .dzm-desktop-only-action {
        display: none !important;
    }

    .dzmarket-home-page .dzm-header-actions .dzm-user-greeting {
        grid-column: 1;
        grid-row: 1;
        justify-self: stretch;
        justify-content: flex-start;
        min-width: 0;
        min-height: 34px;
        padding-inline: 7px;
        gap: 4px;
        overflow: hidden;
        font-size: 11px;
    }

    .dzmarket-home-page .dzm-header-actions .dzm-user-greeting .dzm-ui-icon {
        width: 14px;
        height: 14px;
        flex: 0 0 14px;
    }

    .dzmarket-home-page .dzm-header-actions .dzm-user-name {
        min-width: 0;
        max-width: clamp(44px, 18vw, 78px);
    }

    .dzmarket-home-page .dzm-header-actions .dzm-post-action {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        min-width: 0;
        max-width: 150px;
        min-height: 34px;
        padding-inline: 8px;
        gap: 5px;
        font-size: 11px;
        line-height: 1.1;
    }

    .dzmarket-home-page .dzm-header-actions .dzm-post-action .dzm-ui-icon {
        width: 15px;
        height: 15px;
        flex: 0 0 15px;
    }

    .dzmarket-home-page .dzm-header-actions .dzm-post-action span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dzmarket-home-page .dzm-mobile-menu-group {
        display: block;
        margin: 0 0 12px;
        padding: 0 0 12px;
        border-bottom: 1px solid #e6ece8;
    }

    .dzmarket-home-page .dzm-mobile-menu-group h3 {
        margin: 0 0 7px;
        color: #334155;
        font-size: 14px;
        font-weight: 700;
    }

    .dzmarket-home-page .dzm-mobile-account-menu {
        display: grid;
        gap: 4px;
    }

    .dzmarket-home-page .dzm-mobile-account-menu a {
        display: flex;
        align-items: center;
        min-height: 38px;
        padding: 7px 9px;
        border-radius: 8px;
        color: #145c42;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.25;
        text-decoration: none;
    }

    .dzmarket-home-page .dzm-mobile-account-menu a:hover {
        background: #edf6f0;
    }

    html[dir="rtl"] .dzmarket-home-page .dzm-mobile-menu-group h3,
    html[dir="rtl"] .dzmarket-home-page .dzm-mobile-account-menu a {
        text-align: right;
    }

    body.dzmarket-home-page.dark-theme .dzm-mobile-inbox-link,
    body.dzmarket-home-page.dark-theme .header-container > .dzmarket-settings-anchor.dzmarket-in-header .theme-menu-button {
        border-color: #3d5145;
        background: #1d2b23;
        color: #d7f1df;
        box-shadow: none;
    }

    body.dzmarket-home-page.dark-theme .dzm-mobile-inbox-link:hover,
    body.dzmarket-home-page.dark-theme .header-container > .dzmarket-settings-anchor.dzmarket-in-header .theme-menu-button:hover,
    body.dzmarket-home-page.dark-theme .dzm-mobile-account-menu a:hover {
        background: #2a3d32;
    }

    body.dzmarket-home-page.dark-theme .dzm-mobile-menu-group {
        border-bottom-color: #3a4b40;
    }

    body.dzmarket-home-page.dark-theme .dzm-mobile-menu-group h3,
    body.dzmarket-home-page.dark-theme .dzm-mobile-account-menu a {
        color: #e5efe8;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dzmarket-home-page .dzm-mobile-inbox-link,
    .dzmarket-home-page .dzm-mobile-account-menu a {
        transition: none;
    }
}

/* MarketDG lockup for the mobile and desktop home header. */
.dzmarket-home-page .header-container > .dzmarket-home-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    direction: ltr;
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 25px;
    font-weight: 850;
    letter-spacing: -0.45px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}
.dzmarket-home-page .dzmarket-home-brand img {
    display: block;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
}
.dzmarket-home-page .dzmarket-home-brand span { color: inherit; }
body.dark-theme.dzmarket-home-page .header-container > .dzmarket-home-brand { color: #93c5fd; }
@media (max-width: 600px) {
    .dzmarket-home-page .header-container > .dzmarket-home-brand { gap: 8px; font-size: 21px; }
    .dzmarket-home-page .dzmarket-home-brand img { width: 36px; height: 36px; flex-basis: 36px; }
}