/* Home-page reminder bar: collapsed it is a single strip, expanded it lists
   overdue entries and the next seven days. */
.mh-bar-mount:empty { display: none; }

.mh-bar {
    /* Gorny odstep jest konieczny: nad paskiem stoi pasek promocyjny sklepu
       i bez tego oba zlewaly sie w jeden blok. */
    margin: 14px auto 16px;
    max-width: 1200px;
    border: 1px solid #e3ddd3;
    border-radius: 10px;
    background: #fbf8f4;
    overflow: hidden;
}
.mh-bar--late { border-color: #d9b38c; background: #fdf4ea; }

/* Selektory sa zagniezdzone i wypisuja komplet wlasciwosci, bo Porto nadaje
   kazdemu <button> wlasne tlo, kolor, obramowanie, cien i hover. Bez tego pasek
   dostawal firmowy fiolet zamiast wlasnego tla, a napis robil sie nieczytelny. */
.mh-bar .mh-bar__head {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    /* Porto gives every button a fixed 40px height; on narrow phones the title
       wraps to two lines and the first one was cut off. */
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 10px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #2f2a22;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    line-height: 1.3;
    cursor: pointer;
    transition: background .15s ease;
}
.mh-bar .mh-bar__head:hover,
.mh-bar .mh-bar__head:focus,
.mh-bar .mh-bar__head:active {
    background: rgba(75, 46, 131, .06);
    border: 0;
    box-shadow: none;
    color: #2f2a22;
}
.mh-bar--late .mh-bar__head:hover,
.mh-bar--late .mh-bar__head:focus,
.mh-bar--late .mh-bar__head:active {
    background: rgba(181, 84, 31, .08);
}
/* The home page does not load myhorse-health.css, so the outline icons need
   their stroke here - without it every SVG path rendered as a black blob. */
.mh-bar .mh-health-ico,
.mh-bar-toast .mh-health-ico {
    display: inline-block;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.mh-bar-toast .mh-health-ico { width: 16px; height: 16px; }
.mh-bar__ico { flex: 0 0 auto; width: 22px; height: 22px; color: #6b5b45; }
.mh-bar__ico svg, .mh-bar__rico svg { width: 100%; height: 100%; }

.mh-bar__sum { flex: 1 1 auto; line-height: 1.3; }
.mh-bar__sum b { display: block; font-size: 14px; color: #2f2a22; }
.mh-bar__sum span { font-size: 12px; color: #7b7063; }

.mh-bar .mh-bar__count {
    flex: 0 0 auto;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border: 0;
    border-radius: 12px;
    background: #4b2e83;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}
.mh-bar--late .mh-bar__count { background: #b5541f; }

.mh-bar__chev {
    flex: 0 0 auto;
    width: 10px; height: 10px;
    border-right: 2px solid #7b7063;
    border-bottom: 2px solid #7b7063;
    transform: rotate(45deg);
    transition: transform .18s ease;
}
.mh-bar.is-open .mh-bar__chev { transform: rotate(-135deg); }

.mh-bar__body { padding: 0 16px 12px; }
.mh-bar__glabel {
    margin: 10px 0 6px;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7b7063;
}
.mh-bar__group.is-late .mh-bar__glabel { color: #b5541f; }

.mh-bar__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid #ece5da;
}
.mh-bar__rico { flex: 0 0 auto; width: 20px; height: 20px; color: #6b5b45; }
.mh-bar__rtxt { flex: 1 1 auto; min-width: 0; text-decoration: none; }
.mh-bar__rtxt b { display: block; font-size: 13px; color: #2f2a22; }
.mh-bar__rtxt span { font-size: 12px; color: #7b7063; }
/* Termin obok tytulu - ta sama tresc co w panelu konta ("dziś", "zaległe od 5 dni"),
   bo obie listy czytaja to samo pole reminder.due. */
.mh-bar__rdue {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 108px;
    margin-right: 4px;
    line-height: 1.25;
    text-align: right;
}
.mh-bar__rdue b { font-size: 12px; font-weight: 700; color: #5c5346; white-space: nowrap; }
.mh-bar__rdue small { font-size: 11px; color: #8d8375; white-space: nowrap; }
.mh-bar__rdue--late b { color: #b5541f; }
.mh-bar__rdue--soon b { color: #2f5d3a; }

.mh-bar__ract { flex: 0 0 auto; display: flex; gap: 6px; }

.mh-bar .mh-bar__btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    min-height: 0;
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    box-shadow: none;
    padding: 5px 12px;
    border: 1px solid #cfc6b8;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    color: #2f2a22;
}
.mh-bar .mh-bar__btn:hover { background: #f3ede4; box-shadow: none; }
.mh-bar .mh-bar__btn--buy { background: #2f5d3a; border-color: #2f5d3a; color: #fff; }
.mh-bar .mh-bar__btn--buy:hover { background: #274d30; color: #fff; }
.mh-bar__btn[disabled] { opacity: .55; cursor: default; }

.mh-bar__foot { padding-top: 10px; font-size: 12px; }
.mh-bar__foot a { color: #4b2e83; }

@media (max-width: 640px) {
    .mh-bar__row { flex-wrap: wrap; }
    /* zero basis keeps a long product name next to its icon instead of wrapping below it */
    .mh-bar__rtxt { flex: 1 1 0; }
    .mh-bar__rdue {
        flex-direction: row;
        gap: 6px;
        align-items: baseline;
        min-width: 0;
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }
    .mh-bar__ract { width: 100%; justify-content: flex-end; }
}

/* Wariant zachety: kon juz jest, ale ksiazeczka pusta. Jeden wiersz, bez
   rozwijania - stad naglowek nieklikalny i przycisk zamiast licznika. */
.mh-bar--intro { border-color: #d9d2e8; background: #f7f4fc; }
.mh-bar .mh-bar__head--static { cursor: default; }
.mh-bar .mh-bar__head--static:hover,
.mh-bar .mh-bar__head--static:focus { background: transparent; }
.mh-bar--intro .mh-bar__ico { color: #4b2e83; }
.mh-bar--intro .mh-bar__btn--buy { background: #4b2e83; border-color: #4b2e83; }
.mh-bar--intro .mh-bar__btn--buy:hover { background: #3d2569; }

@media (max-width: 640px) {
    .mh-bar .mh-bar__head--static { flex-wrap: wrap; }
    .mh-bar--intro .mh-bar__btn--buy { width: 100%; justify-content: center; margin-top: 8px; }
}

/* Toasts after "Zamów" and "Zrobione" - same look as in the account panel. */
.mh-bar-toasts {
    position: fixed;
    left: 16px;
    bottom: 16px;
    /* above the fixed "Aplikacja GNL" banner (z-index 10000) on mobile */
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: calc(100% - 32px);
}
.mh-bar-toast {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #23281f;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.mh-bar-toast .mh-health-ico { color: #8fd4a9; }
.mh-bar-toast a { color: #f0d5a8; font-weight: 700; margin-left: 6px; text-decoration: none; }
.mh-bar-toast a:hover { color: #fff; text-decoration: none; }
.mh-bar-toast--error { background: #b4432e; }
.mh-bar-toast--error .mh-health-ico { color: #fff; }

@media (max-width: 640px) {
    .mh-bar-toasts { left: 12px; right: 12px; bottom: 12px; }
    .mh-bar-toast { width: 100%; }
}

/* the toast sits above the "Aplikacja GNL" banner instead of covering it */
body.gnl-app-banner-active .mh-bar-toasts { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
