/**
 * Law Central Alberta — Navigation styles
 * Overrides Max Mega Menu Pro (uploads/maxmegamenu/style.css).
 *
 * Selectors must match the plugin's generated CSS exactly.
 * The plugin places :hover on the <a>, not the <li>.
 */

/* ── Header bar ───────────────────────────────────────── */
header.wp-block-template-part {
    background-color: #ffffff !important;
}

/* ── Default top-level link ───────────────────────────── */
#mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item > a.mega-menu-link {
    color: #313538 !important;
    background: transparent !important;
}

/* ── Hover / focus (desktop) ──────────────────────────── */
@media only screen and (min-width: 769px) {
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item > a.mega-menu-link:hover,
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item > a.mega-menu-link:focus {
        background: transparent !important;
        color: #006483 !important;
    }
}

/* ── Open / active states ─────────────────────────────── */
#mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item.mega-toggle-on > a.mega-menu-link,
#mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item.mega-current-menu-item > a.mega-menu-link,
#mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item.mega-current-menu-ancestor > a.mega-menu-link {
    background: transparent !important;
    color: #006483 !important;
}

/* ── Site title ───────────────────────────────────────── */
header.wp-block-template-part .wp-block-site-title a {
    color: #006483 !important;
    text-decoration: none !important;
}

/* ── Relevanssi live search dropdown ─────────────────── */
.relevanssi-live-search-results {
    background-color: #ffffff !important;
    border: 1px solid #006483 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.relevanssi-live-search-result {
    border-bottom: 1px solid #e1e8f0 !important;
    color: #313538 !important;
}

.relevanssi-live-search-result a {
    color: #313538 !important;
}

.relevanssi-live-search-result:focus-within,
.wp-block-search .relevanssi-live-search-result:hover {
    background-color: #e1e8f0 !important;
}

.relevanssi-live-search-result .relevanssi-live-search-result-label span {
    background: #006483 !important;
    color: #ffffff !important;
}

/* ── Search block ─────────────────────────────────────── */
.wp-block-search__inside-wrapper {
    border: 2px solid #006483 !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    overflow: hidden !important;
}

.wp-block-search__input {
    background: #ffffff !important;
    color: #313538 !important;
    border: none !important;
}

.wp-block-search__input::placeholder {
    color: #6b7280 !important;
}

.wp-block-search__button {
    background: #ffffff !important;
    border: none !important;
    color: #006483 !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}

.wp-block-search__button svg,
.wp-block-search__button .search-icon {
    stroke: #006483 !important;
    fill: none !important;
}

.wp-block-search__button:hover,
.wp-block-search__button:focus {
    background: #006483 !important;
    color: #ffffff !important;
}

.wp-block-search__button:hover svg,
.wp-block-search__button:hover .search-icon,
.wp-block-search__button:focus svg,
.wp-block-search__button:focus .search-icon {
    stroke: #ffffff !important;
}

/* ── Jetpack sharing buttons ──────────────────────────── */
svg.social-logo.social-logo-facebook,
svg.social-logo.social-logo-x,
svg.social-logo.social-logo-print {
    fill: #313538 !important;
}

/* ── Safe Exit button ─────────────────────────────────── */
.wp-block-button.is-style-exit .wp-block-button__link {
    background: #006483 !important;
    color: #ffffff !important;
    border: 2px solid #006483 !important;
    text-decoration: none !important;
}

.wp-block-button.is-style-exit .wp-block-button__link:before {
    display: none !important;
}

.wp-block-button.is-style-exit .wp-block-button__link:after {
    background-color: #ffffff !important;
}

.wp-block-button.is-style-exit .wp-block-button__link:hover,
.wp-block-button.is-style-exit .wp-block-button__link:focus {
    background: #02779b !important;
    border-color: #02779b !important;
    color: #ffffff !important;
}

/* ── Footer ───────────────────────────────────────────── */
footer.wp-block-template-part,
footer.wp-block-template-part .wp-block-group,
footer.wp-block-template-part .wp-block-columns,
footer.wp-block-template-part .wp-block-column {
    background-color: #e1e8f0 !important;
    color: #313538 !important;
}

footer.wp-block-template-part p,
footer.wp-block-template-part li,
footer.wp-block-template-part span {
    color: #313538 !important;
}

footer.wp-block-template-part a {
    color: #006483 !important;
    text-decoration: none !important;
}

footer.wp-block-template-part a img {
    display: block !important;
    border: none !important;
    outline: none !important;
}

footer.wp-block-template-part .has-contrast-background-color {
    border-top-color: transparent !important;
}

footer.wp-block-template-part a:hover {
    color: #02779b !important;
    text-decoration: underline !important;
}

footer.wp-block-template-part .wp-block-navigation a,
footer.wp-block-template-part .wp-block-navigation .wp-block-navigation-item__content {
    color: #313538 !important;
}

footer.wp-block-template-part .wp-block-navigation a:hover {
    color: #006483 !important;
}
