/*
    Android app-install banner (_AppInstallBanner.cshtml).

    Lives in its own stylesheet rather than in the partial, per the house rule
    that CSS belongs in a view-specific file and not in markup. Referenced with
    asp-append-version so a change busts the Cloudflare cache - an unversioned
    link keeps the same URL and stays stuck behind a 30 day max-age.

    Sized for 320px upward: it is only ever served to Android phones, so the
    narrow case IS the case, not an afterthought.
*/

.dz-appbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #0c0c0e;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* hidden must win over the flex display above, or the banner shows for a
   moment before the script hides it again. */
.dz-appbar[hidden] {
    display: none;
}

.dz-appbar-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    flex: 0 0 auto;
}

/* min-width:0 is what lets the text actually ellipsize - without it a flex
   child refuses to shrink below its content and pushes the CTA off screen. */
.dz-appbar-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.25;
}

.dz-appbar-title {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dz-appbar-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The green of the in-app shell, so the destination is recognisable before
   the manager gets there. */
.dz-appbar-cta {
    flex: 0 0 auto;
    background: #0cae13;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 7px;
}

.dz-appbar-cta:hover,
.dz-appbar-cta:focus {
    background: #007105;
    color: #fff;
    text-decoration: none;
}

/* 44px of touch target on a control that is only 20px of glyph - a dismiss
   people cannot hit is worse than no dismiss at all. */
.dz-appbar-close {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    line-height: 1;
    font-size: 20px;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.6);
    padding: 0;
    cursor: pointer;
}

.dz-appbar-close:hover,
.dz-appbar-close:focus {
    color: #fff;
}

@media (max-width: 359px) {
    /* At the very narrowest the subtitle is the first thing to go - the title
       and the button are what the bar is for. */
    .dz-appbar-sub {
        display: none;
    }

    .dz-appbar-cta {
        padding: 8px 11px;
    }
}
