﻿/* ==========================================================
   BMW-KRAFT: mobile header / model button / burger styles
   Этап 1. Стили под текущую MasterPage.master.

   Важно:
   - меню моделей НЕ дублируется: используется существующий #menuMobile;
   - меню разделов НЕ дублируется: используется существующий #menuSections;
   - на ПК сохраняется старая логика: логотип слева, модели справа, разделы слева;
   - на мобильной появляется новая верхняя строка и строка выбора модели.
   ========================================================== */

/* ---------- Desktop/base state ---------- */

.kraft-header-title,
.kraft-header-contact,
.kraft-mobile-nav {
    display: none;
}

.kraft-header {
    display: block;
}

.kraft-header-logo {
    margin: 0;
    float: left;
    display: block;
}

    .kraft-header-logo a {
        display: block;
    }

    .kraft-header-logo img {
        display: block;
        margin: 0 auto;
        width: 142px;
        height: auto;
    }

#menuSections.menu-display-none {
    display: block;
}

/* ---------- Mobile state ---------- */

@media only screen and (max-width: 767px) {

    .kraft-header {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 68px;
        padding: 6px 8px;
        box-sizing: border-box;
        background: rgba(245, 245, 245, 0.96);
        border-bottom: 1px solid rgba(0, 0, 0, 0.10);
    }

    .kraft-header-logo {
        float: none !important;
        flex: 0 0 70px;
        width: 70px;
        margin: 0;
        display: block;
    }

        .kraft-header-logo a {
            display: block;
            width: auto !important;
            margin: 0;
        }

        .kraft-header-logo img {
            display: block;
            width: auto;
            max-width: 58px;
            max-height: 58px;
            height: auto;
            margin: 0 auto;
        }

    .kraft-header-title {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        padding: 0 8px;
        color: #111;
        font-family: Open Sans, Verdana, Arial, sans-serif;
        font-size: 13px;
        line-height: 1.22;
        font-weight: 700;
        text-align: left;
    }

    .kraft-header-contact {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        min-width: 48px;
    }

        /*
       Существующий GS:ContactAction может выводить разные теги.
       Поэтому задаём аккуратный внешний вид наиболее вероятным элементам.
    */
/*        .kraft-header-contact a,
        .kraft-header-contact button,
        .kraft-header-contact input[type="button"],
        .kraft-header-contact input[type="submit"] {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 44px;
            height: 38px;
            padding: 0 10px;
            box-sizing: border-box;
            border: 1px solid rgba(255, 153, 0, 0.75);
            background: #ffffff;
            color: #111111 !important;
            font-family: Open Sans, Verdana, Arial, sans-serif;
            font-size: 12px;
            line-height: 38px;
            font-weight: 700;
            text-align: center;
            text-decoration: none !important;
            white-space: nowrap;
        }

            .kraft-header-contact a:hover,
            .kraft-header-contact button:hover,
            .kraft-header-contact input[type="button"]:hover,
            .kraft-header-contact input[type="submit"]:hover {
                background: #ff7700;
                color: #111111 !important;
                text-decoration: none !important;
            }*/

    .kraft-mobile-nav {
        display: flex;
        width: 100%;
        height: 50px;
        box-sizing: border-box;
        background: #111111;
        border-bottom: 1px solid rgba(255, 153, 0, 0.35);
    }

    .kraft-mobile-model-button {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        height: 50px;
        padding: 0 15px;
        box-sizing: border-box;
        border: 0;
        background: #1b1b1b;
        color: #ffffff;
        font-family: Open Sans, Verdana, Arial, sans-serif;
        font-size: 15px;
        line-height: 50px;
        font-weight: 700;
        text-align: left;
        cursor: pointer;
    }

        .kraft-mobile-model-button span:first-child {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    .kraft-mobile-model-arrow {
        flex: 0 0 auto;
        margin-left: 8px;
        color: #ff7700;
        font-size: 12px;
        line-height: 1;
    }

    .kraft-mobile-sections-button {
        flex: 0 0 64px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 50px;
        padding: 0;
        box-sizing: border-box;
        border: 0;
        border-left: 1px solid rgba(255, 153, 0, 0.45);
        background: #0c0c0c;
        cursor: pointer;
    }

        .kraft-mobile-sections-button span {
            display: block;
            width: 27px;
            height: 3px;
            margin: 3px 0;
            background: #ffffff;
        }

        .kraft-mobile-model-button:hover,
        .kraft-mobile-sections-button:hover {
            background: #242424;
        }

    /* Существующая логика: на мобильной .menu-display-none реально скрывает блок. */
    #menuMobile.menu-display-none,
    #menuSections.menu-display-none {
        display: none;
    }

    #menuMobile {
        margin-left: 0;
    }

    #menuSections {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        z-index: 150;
        margin: 0;
    }

        #menuSections div {
            margin: 0;
        }

            #menuSections div a {
                display: block;
                width: 100%;
                height: auto;
                min-height: 42px;
                padding: 12px 16px;
                box-sizing: border-box;
                background: rgba(18, 18, 18, 0.97);
                border-bottom: 1px solid rgba(255, 255, 255, 0.12);
                color: #ffffff;
                font-family: Open Sans, Verdana, Arial, sans-serif;
                font-size: 15px;
                line-height: 1.25;
                font-weight: 600;
                text-decoration: none;
            }

                #menuSections div a:hover {
                    background: #222222;
                    color: #ff7700;
                    text-decoration: none;
                }

    /* Чуть аккуратнее раскрывающиеся подменю X/Z/M/i на мобильной */
    .submenuVertikal div a {
        font-size: 14px;
        font-weight: 600;
    }
}

/* ---------- Very narrow phones ---------- */

/*@media only screen and (max-width: 360px) {
    .kraft-header {
        min-height: 64px;
        padding: 6px;
    }

    .kraft-header-logo {
        flex-basis: 62px;
        width: 62px;
    }

        .kraft-header-logo img {
            max-width: 58px;
            max-height: 52px;
        }

    .kraft-header-title {
        padding: 0 6px;
        font-size: 12px;
    }

    .kraft-header-contact a,
    .kraft-header-contact button,
    .kraft-header-contact input[type="button"],
    .kraft-header-contact input[type="submit"] {
        min-width: 40px;
        height: 36px;
        padding: 0 8px;
        font-size: 12px;
        line-height: 36px;
    }

    .kraft-mobile-model-button {
        padding: 0 12px;
        font-size: 14px;
    }

    .kraft-mobile-sections-button {
        flex-basis: 58px;
    }
}*/


/* ==========================================================
   BMW-KRAFT: compact contact button in mobile header
   ========================================================== */

@media only screen and (max-width: 767px) {

    .kraft-header-contact {
        flex: 0 0 46px;
        min-width: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .kraft-header-contact .bk-contactaction,
        .kraft-header-contact .bk-modal__btn--cta,
        .kraft-header-contact .bk-ico--cta {
            background: transparent !important;
            background-color: transparent !important;
            box-shadow: none !important;
            font-size: 26px;
        }

        .kraft-header-contact .bk-modal__btn--cta {
            border: 0 !important;
            padding: 0 !important;
            margin: 0 !important;
        }
}

