/**
 * Stocks header – desktop layout + mobile toolbar.
 */

/* ---- Desktop main header row ---- */
@media (min-width: 1024px) {
    .stocks-header {
        border-bottom: 0;
        box-shadow: none;
    }

    .stocks-header .header-main-row {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        max-width: 100%;
        padding-left: 100px;
        padding-right: 100px;
    }

    .stocks-header .header-logo-row {
        flex-shrink: 0;
        width: auto;
        order: 1;
    }

    .stocks-header .header-logo-row img,
    .stocks-header .header-logo-row svg {
        max-width: 217px;
        height: auto;
    }

    .stocks-header .header-search-desktop {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        justify-content: center;
        order: 2;
    }

    .stocks-header .header-search-desktop .header-inline-search {
        width: 100%;
        max-width: 560px;
    }

    .stocks-header .header-toolbar {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.75rem;
        flex-shrink: 0;
        margin-left: auto;
        width: auto;
        position: static;
        padding-left: 0;
        order: 3;
    }

    .stocks-header .header-contact-info {
        margin-left: 1.5rem;
        margin-right: 0.25rem;
    }

    .stocks-header .header-contact-info .contact-info {
        font-size: 16px;
        color: #444;
        line-height: 1.2;
        white-space: nowrap;
    }

    .stocks-header .header-contact-info .contact-info a {
        display: block;
        font-size: 16px;
        font-weight: 600;
        color: #1e2a4f;
        text-decoration: none;
    }

    .stocks-header .header-contact-info .contact-info a:hover {
        color: #000;
    }

    .header-inline-search__form {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .header-inline-search__input {
        width: 100%;
        height: 44px;
        padding: 0 3rem 0 1rem;
        border: 0;
        border-radius: 9999px;
        background-color: #e7e7e7;
        color: #444;
        font-size: 16px;
        font-family: "Roboto Condensed", sans-serif;
    }

    .header-inline-search__input:focus {
        outline: 2px solid #1e2a4f;
        outline-offset: 0;
    }

    .header-inline-search__submit {
        position: absolute;
        right: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        background: transparent;
        color: #444;
        cursor: pointer;
    }

    /* Megamenu bar below header */
    .rw-menu-wrapper {
        background: #e7e9e8;
        border-top: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        height: auto;
        overflow: visible;
    }

    .rw-menu-wrapper .navigation {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 100px;
    }

    .rw-menu-wrapper .rootmenu.rootmenu-slide {
        padding-top: 0;
    }

    .rw-menu-wrapper .rootmenu-list {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .rw-menu-wrapper .rootmenu-list > li > a {
        font-size: 16px;
        font-weight: normal;
        color: #000;
        border-bottom: 3px solid transparent;
        padding: 3px 12px 0;
        line-height: 41px;
        text-decoration: none;
    }

    .rw-menu-wrapper .rootmenu-list > li.hover > a,
    .rw-menu-wrapper .rootmenu-list > li > a:hover,
    .rw-menu-wrapper .rootmenu-list > li > a.active {
        border-bottom-color: #1e2a4f;
        color: #1e2a4f;
    }

    .rw_menu_icon {
        display: none !important;
    }
}

/* ---- Mobile ---- */
@media (max-width: 1023px) {
    .stocks-header .header-main-row {
        position: relative;
    }

    .stocks-header .header-toolbar {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: flex-end;
        gap: 0.25rem;
        padding-left: 3.5rem;
        order: 2;
    }

    .stocks-header .header-logo-row {
        width: 100%;
        order: 1;
        padding-bottom: 0.5rem;
    }

    .stocks-header .header-search-desktop {
        display: none !important;
    }
}
