/*
 * Horní lišta (Kontakty, Black Friday, telefon, e-mail) viditelná i na mobilu a tabletu (< 992 px).
 * Šablona Promotronu ji pod 992 px skrývá: `.header .header__top { display:none }`.
 * Načítat AŽ PO style.css (jinak by původní pravidla měla přednost).
 *
 * Mobil (< 576 px):   [ ☎ +421 948 023 544 ]          [ Kontakty ] [ Black Friday ]
 *                      (e-mail se skryje, pod 400 px se skryje i "Kontakty" - je v menu)
 * Tablet (576-991 px): [ ☎ telefon, e-mail ]           [ Kontakty ] [ Black Friday ]
 * Při posunu stránky (hlavička dostane třídu .fixed) se lišta schová, ať nezabírá místo.
 */
@media (max-width: 991.98px) {

    /* 1) lišta se zobrazí a je jednořádková */
    body .header .header__top {
        display: block;
        position: relative;
        z-index: 20;
    }
    body .header .header-top {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        min-height: 4rem;
        max-height: none;
        padding: 0;
    }
    body .header .header-top__settings { display: none; }   /* jazyk/měna je i v menu */

    /* 2) telefon (a e-mail) vlevo, odkazy vpravo */
    body .header .header-top__contact {
        order: 1;
        position: static;
        transform: none;
        display: flex;
        align-items: center;
        font-size: 0;                 /* schová čárku mezi telefonem a e-mailem */
        padding: 0 0 0 1.5rem;
        white-space: nowrap;
    }
    body .header .header-top__links { order: 2; padding-right: .5rem; }

    body .header .header-top__contact img {
        width: 1.6rem;
        height: 1.6rem;
        margin: 0 .8rem 0 0;
        filter: brightness(0) invert(1);   /* ikonka je šedá, na červené bude bílá */
    }
    body .header .header-top__contact span { font-size: 1.4rem; }
    body .header .header-top__contact a {
        display: inline-flex;
        align-items: center;
        min-height: 4rem;             /* dostatečně velká plocha pro prst */
        font-size: 1.4rem;
        font-weight: 600;
        text-decoration: none;
    }
    /* na reda.cz je e-mail skrytý před roboty (Cloudflare): odkaz je napřed /cdn-cgi/l/email-protection, až po načtení mailto: */
    body .header .header-top__contact a[href^="mailto"],
    body .header .header-top__contact a[href*="email-protection"] { display: none; }

    /* 3) odkazy vedle sebe (původně pod sebou), banner Black Friday nesmí roztáhnout na 100 % */
    body .header .header-top__links ul {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: .2rem;
    }
    body .header .header-top__links ul li { display: block; }
    body .header .header-top__links ul li a {
        display: flex;
        align-items: center;
        min-height: 4rem;
        padding: 0 1rem;
        line-height: 1.2;
    }
    body .header .header-top__links ul li:first-child a { padding-left: 1rem; }
    body .header .header-top__links ul li a img {
        width: auto;
        max-width: none;
        height: 2.2rem;
        max-height: none;
    }

    /* 4) hlavička je teď o výšku lišty vyšší -> odsadit obsah (původně 8rem / 10rem) */
    body.header-classic1 .content { padding-top: 12rem; }

    /* 5) při posunu stránky lištu schovat (hlavička je pak fixní a má být nízká) */
    body .header.fixed .header__top,
    body .header.smaller .header__top { display: none; }
}

/* tablet: vejde se i e-mail */
@media (min-width: 576px) and (max-width: 991.98px) {
    body .header .header-top__contact { font-size: 1.4rem; }
    body .header .header-top__contact a[href^="mailto"],
    body .header .header-top__contact a[href*="email-protection"] { display: inline-flex; margin-left: .5rem; }
}

/* odsazení obsahu: původně 8rem (< 768 px) a 10rem (768-991 px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    body.header-classic1 .content { padding-top: 14rem; }
}

/* úzké telefony: "Kontakty" je i v menu, místo zůstane telefonu a bannerům */
@media (max-width: 399.98px) {
    body .header .header-top__links ul li:first-child { display: none; }
}

/* velmi úzké telefony (320-359 px): menší banner a mezery, ať se vše vejde */
@media (max-width: 359.98px) {
    body .header .header-top__contact { padding-left: 1rem; }
    body .header .header-top__contact img { margin-right: .5rem; }
    body .header .header-top__contact a { font-size: 1.3rem; }
    body .header .header-top__links ul li a { padding: 0 .6rem; }
    body .header .header-top__links ul li a img { height: 1.7rem; }
}
