.futuready-header-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0 !important;
    border: 1px solid var(--futuready-purple, #2a0550) !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: var(--futuready-purple, #2a0550) !important;
    line-height: 0 !important;
    cursor: pointer;
}

.futuready-header-menu-toggle span {
    display: block;
    color: inherit;
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}

.futuready-header-menu-toggle span::before {
    content: "\2630";
}

.futuready-header-search {
    position: relative;
    width: 48px;
    height: 48px;
    z-index: 2147482001;
}

body.futuready-header-search-open header[data-elementor-type="header"],
body.futuready-header-search-open .elementor-location-header {
    position: relative;
    z-index: 2147482000 !important;
}

.futuready-header-search__panel {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 24px;
    background: transparent;
    transition: width 220ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.futuready-header-search.is-open .futuready-header-search__panel {
    width: min(250px, 72vw);
    background: #fff;
    box-shadow: 0 10px 30px rgba(42, 5, 80, 0.18);
}

.futuready-header-search__toggle {
    position: relative;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #fff !important;
    cursor: pointer;
}

/* LearnPress lesson and quiz headers are white rather than brand purple. */
body.course-item-popup .futuready-header-search__toggle,
#popup-header .futuready-header-search__toggle {
    color: var(--futuready-purple, #2a0550) !important;
}

.futuready-header-search__toggle span::before,
.futuready-header-search__toggle span::after {
    content: "";
    position: absolute;
    display: block;
    box-sizing: border-box;
    transition: transform 180ms ease, width 180ms ease, height 180ms ease, border 180ms ease;
}

.futuready-header-search__toggle span::before {
    top: 13px;
    left: 13px;
    width: 17px;
    height: 17px;
    border: 3px solid currentColor;
    border-radius: 50%;
}

.futuready-header-search__toggle span::after {
    top: 29px;
    left: 29px;
    width: 12px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: left center;
}

.futuready-header-search.is-open .futuready-header-search__toggle {
    color: var(--futuready-purple, #2a0550) !important;
}

.futuready-header-search.is-open .futuready-header-search__toggle span::before,
.futuready-header-search.is-open .futuready-header-search__toggle span::after {
    top: 22px;
    left: 13px;
    width: 22px;
    height: 3px;
    border: 0;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
}

.futuready-header-search.is-open .futuready-header-search__toggle span::before {
    transform: rotate(45deg);
}

.futuready-header-search.is-open .futuready-header-search__toggle span::after {
    transform: rotate(-45deg);
}

.futuready-header-search__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    padding: 0 22px 0 4px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--futuready-purple, #2a0550) !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.futuready-header-search.is-open .futuready-header-search__input {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 100ms;
}

.futuready-header-search__input::placeholder {
    color: rgba(42, 5, 80, 0.65);
}

/* Use the component's close control rather than the browser's second ×. */
.futuready-header-search__input::-webkit-search-cancel-button,
.futuready-header-search__input::-webkit-search-decoration {
    display: none;
    -webkit-appearance: none;
    appearance: none;
}

.futuready-header-search__results {
    position: absolute;
    top: 58px;
    left: 0;
    width: min(420px, calc(100vw - 32px));
    overflow: hidden;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid rgba(42, 5, 80, 0.12);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(42, 5, 80, 0.22);
    color: var(--futuready-purple, #2a0550);
}

.futuready-header-search__results-list {
    max-height: min(504px, calc(65vh - 16px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.futuready-header-search__results[hidden] {
    display: none !important;
}

.futuready-header-search__result {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--futuready-purple, #2a0550) !important;
    line-height: 1.25;
    text-align: left;
    text-decoration: none !important;
}

.futuready-header-search__result:hover,
.futuready-header-search__result:focus,
.futuready-header-search__result[aria-selected="true"] {
    outline: 0;
    background: rgba(42, 5, 80, 0.08);
}

.futuready-header-search__result-title {
    font-size: 1rem;
    font-weight: 700;
}

.futuready-header-search__result-meta {
    color: rgba(42, 5, 80, 0.7);
    font-size: 0.82rem;
}

.futuready-header-search__status {
    padding: 14px;
    color: rgba(42, 5, 80, 0.75);
    font-size: 0.92rem;
    line-height: 1.35;
}

.futuready-header-search__status.is-error {
    color: #9d1c1c;
}

@media (max-width: 600px) {
    .futuready-header-search.is-open .futuready-header-search__panel {
        width: min(250px, 72vw);
    }

    .futuready-header-search__results {
        width: min(340px, calc(100vw - 24px));
    }
}

.futuready-header-menu-toggle:hover,
.futuready-header-menu-toggle:focus,
.futuready-header-menu-toggle:focus-visible {
    background: var(--futuready-purple, #2a0550) !important;
    color: #fff !important;
}

.futuready-header-menu-toggle:hover span,
.futuready-header-menu-toggle:focus span,
.futuready-header-menu-toggle:focus-visible span,
#popup-header .back-course.futuready-header-menu-toggle:hover span,
#popup-header .back-course.futuready-header-menu-toggle:focus span {
    color: #fff !important;
}

#popup-header .back-course.futuready-learnpress-menu-toggle {
    position: absolute;
    top: 50%;
    right: clamp(18px, 3vw, 48px);
    left: auto;
    z-index: 2147483000;
    transform: translateY(-50%);
    pointer-events: auto;
    text-decoration: none !important;
}

#popup-header .futuready-learning-home {
    position: absolute;
    top: 50%;
    left: clamp(18px, 3vw, 48px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    line-height: 0;
    text-decoration: none;
    z-index: 2;
}

#popup-header .futuready-learning-home img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

#popup-header .futuready-learning-home:focus-visible {
    outline: 2px solid var(--futuready-purple, #2a0550);
    outline-offset: 3px;
}

.futuready-header-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483001;
    width: min(360px, 86vw);
    padding: clamp(28px, 4vw, 52px);
    box-sizing: border-box;
    background: #fff;
    box-shadow: -18px 0 45px rgba(42, 5, 80, 0.18);
    color: var(--futuready-purple, #2a0550);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 180ms ease, visibility 0s linear 180ms;
}

body.admin-bar .futuready-header-menu-drawer {
    top: 32px;
}

.futuready-header-menu-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 180ms ease;
}

.futuready-header-menu-drawer__close {
    display: block;
    margin: 0 0 42px auto;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--futuready-purple, #2a0550) !important;
    font: inherit;
    line-height: 1.2;
    cursor: pointer;
}

.futuready-header-menu-drawer__close:hover,
.futuready-header-menu-drawer__close:focus,
.futuready-header-menu-drawer__close:focus-visible {
    border: 0 !important;
    background: transparent !important;
    color: var(--futuready-purple, #2a0550) !important;
    text-decoration: underline;
}

.futuready-header-menu-drawer__logo {
    display: block;
    width: min(240px, 75%);
    height: auto;
    margin-bottom: 34px;
}

.futuready-header-menu-drawer__module {
    margin-bottom: 30px;
    color: var(--futuready-purple, #2a0550);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
}

.futuready-header-menu-drawer__links {
    display: grid;
    gap: 24px;
}

.futuready-header-menu-drawer__links a {
    color: var(--futuready-purple, #2a0550) !important;
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    line-height: 1.2;
    text-decoration: none;
}

.futuready-header-menu-drawer__links a:hover,
.futuready-header-menu-drawer__links a:focus {
    text-decoration: underline;
}

@media (max-width: 782px) {
    body.admin-bar .futuready-header-menu-drawer {
        top: 46px;
    }
}

