/* =========================================================
   Pixell.bg — Header dropdown final V4
   Финална визуална корекция на „Поводи“
   Зарежда се след header-dropdown-v3.css.
========================================================= */

@media (min-width: 1041px) {
    body.pixell-site .menu-item-has-children {
        position: relative;
    }

    /*
     * „Поводи“ и стрелката са един общ визуален елемент.
     * Няма отделно жълто квадратче само зад стрелката.
     */
    body.pixell-site .menu-parent-row {
        position: relative;
        display: inline-flex;
        min-height: 42px;
        padding: 0 7px;
        align-items: center;
        gap: 2px;
        border-radius: 12px;
        transition:
            background-color 170ms ease,
            box-shadow 170ms ease;
    }

    body.pixell-site .menu-parent-link {
        display: inline-flex !important;
        min-height: 42px !important;
        padding: 0 !important;
        align-items: center !important;
        color: #42546c;
        background: transparent !important;
        border-radius: 0 !important;
        white-space: nowrap;
        transition: color 170ms ease !important;
    }

    body.pixell-site .submenu-toggle {
        appearance: none;
        display: inline-grid;
        width: 21px !important;
        min-width: 21px !important;
        height: 30px !important;
        min-height: 30px !important;
        margin: 0 !important;
        padding: 0 !important;
        place-items: center;
        color: #42546c !important;
        cursor: pointer;
        background: transparent !important;
        border: 0 !important;
        border-radius: 7px !important;
        box-shadow: none !important;
        transform: none !important;
    }

    body.pixell-site .submenu-toggle svg {
        width: 14px !important;
        height: 14px !important;
        transition: transform 180ms ease;
    }

body.pixell-site
.menu-item-has-children:hover
.menu-parent-row,
body.pixell-site
.menu-item-has-children:focus-within
.menu-parent-row,
body.pixell-site
.menu-item-has-children.is-submenu-open
.menu-parent-row {
    background: transparent !important;
    box-shadow: none !important;
}

    body.pixell-site
    .menu-item-has-children:hover
    .menu-parent-link,
    body.pixell-site
    .menu-item-has-children:focus-within
    .menu-parent-link,
    body.pixell-site
    .menu-item-has-children.is-submenu-open
    .menu-parent-link,
    body.pixell-site
    .menu-item-has-children:hover
    .submenu-toggle,
    body.pixell-site
    .menu-item-has-children:focus-within
    .submenu-toggle,
    body.pixell-site
    .menu-item-has-children.is-submenu-open
    .submenu-toggle {
        color: #24344d !important;
        background: transparent !important;
    }

    /*
     * Невидимият hover bridge остава, но е по-компактен.
     */
    body.pixell-site
    .menu-item-has-children::after {
        position: absolute;
        top: 100%;
        right: -16px;
        left: -16px;
        z-index: 10060;
        height: 16px;
        content: "";
        background: transparent;
    }

    /*
     * Панелът е малко по-компактен и започва по-близо
     * до навигацията.
     */
    body.pixell-site .sub-menu {
        top: calc(100% + 7px) !important;
        width: 258px !important;
        padding: 9px !important;
        gap: 2px !important;
        border-radius: 17px !important;
        box-shadow:
            0 24px 56px rgba(36, 52, 77, 0.17),
            inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
    }

    body.pixell-site .sub-menu::before {
        top: -6px !important;
        width: 12px !important;
        height: 12px !important;
    }

    body.pixell-site .sub-menu a {
        min-height: 39px !important;
        padding: 9px 12px !important;
        border-radius: 10px !important;
        font-size: 13px !important;
        line-height: 1.25 !important;
    }

    body.pixell-site .sub-menu a::before {
        left: 9px !important;
        width: 5px !important;
        height: 5px !important;
    }

    body.pixell-site .sub-menu a:hover,
    body.pixell-site .sub-menu a:focus-visible {
        padding-left: 23px !important;
        transform: translateX(2px) !important;
    }
}

/*
 * Mobile остава акордеон. Само премахваме отделното
 * жълто петно зад стрелката, когато е отворен.
 */
@media (max-width: 1040px) {
    body.pixell-site .menu-parent-row {
        gap: 8px;
    }

    body.pixell-site .submenu-toggle {
        color: #354761 !important;
        background: #f6f8fb !important;
    }

    body.pixell-site
    .menu-item-has-children.is-submenu-open
    .submenu-toggle {
        color: #24344d !important;
        background: #fff8dd !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.pixell-site .menu-parent-row,
    body.pixell-site .menu-parent-link,
    body.pixell-site .submenu-toggle,
    body.pixell-site .submenu-toggle svg {
        transition: none !important;
    }
}

/* „Поводи“ остава като нормален навигационен линк */
@media (min-width: 1041px) {
    body.pixell-site .menu-parent-row {
        padding-right: 0 !important;
        padding-left: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.pixell-site .submenu-toggle {
        background: transparent !important;
        box-shadow: none !important;
    }

    body.pixell-site
    .menu-item-has-children:hover
    .submenu-toggle,
    body.pixell-site
    .menu-item-has-children:focus-within
    .submenu-toggle,
    body.pixell-site
    .menu-item-has-children.is-submenu-open
    .submenu-toggle {
        background: transparent !important;
        box-shadow: none !important;
    }
}

/* Премахва оранжевата подчертавка от „Поводи“
   и от всички линкове в dropdown менюто */
@media (min-width: 1041px) {
    body.pixell-site .menu-parent-link::after,
    body.pixell-site .menu-item-has-children > .menu-parent-row::after,
    body.pixell-site .sub-menu a::after {
        display: none !important;
        content: none !important;
        transform: none !important;
    }

    body.pixell-site .menu-parent-link,
    body.pixell-site .sub-menu a {
        border-bottom: 0 !important;
        text-decoration: none !important;
    }

    body.pixell-site
    .menu-item-has-children:hover
    .menu-parent-link,
    body.pixell-site
    .menu-item-has-children:focus-within
    .menu-parent-link,
    body.pixell-site
    .menu-item-has-children.is-submenu-open
    .menu-parent-link {
        border-bottom: 0 !important;
        box-shadow: none !important;
    }

    body.pixell-site .sub-menu a:hover,
    body.pixell-site .sub-menu a:focus-visible {
        border-bottom: 0 !important;
        box-shadow: none !important;
    }
}
