/* =====================================================
   PAT SEARCH BOX - STYLES
   ===================================================== */
.pat-search-wrapper {
    position: relative;
    max-width: 375px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    z-index: 99999;
    flex-shrink: 1;
    align-self: center;
    margin-right: 20px;
}

/* Search Bar */
.pat-search-bar {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 5px;
    padding: 0 16px;
    height: 44px;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 290px;
    box-shadow: 0 0 4px #276f9f;
}

.pat-search-bar:focus-within {
    box-shadow: 0 0 4px rgb(20 68 102);
}

.pat-search-icon {
    width: 22px;
    height: 22px;
    color: #98a2b3;
    flex-shrink: 0;
    margin-right: 12px;
}

.pat-search-bar:focus-within .pat-search-icon {
    color: #3793D1;
}

.pat-search-bar .pat-search-input,
.pat-search-bar .pat-search-input[type="text"],
.pat-search-bar input[type="text"] {
    flex: 1;
    font-size: 17px;
    color: #344054;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: inherit;
    min-width: 0;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0 !important;
    height: auto !important;
    line-height: normal !important;
}

.pat-search-bar .pat-search-input:focus,
.pat-search-bar .pat-search-input[type="text"]:focus,
.pat-search-bar input[type="text"]:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.pat-search-input::placeholder {
    color: #98a2b3;
}

.pat-search-clear {
    font-size: 26px;
    color: #98a2b3;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    display: none;
    transition: color 0.15s;
}

.pat-search-clear:hover {
    color: #344054;
}

.pat-search-clear.visible {
    display: block;
}

/* Dropdown */
.pat-search-dropdown {
    position: absolute;
    top: calc(100% + 36px);
    right: 0;
    width: 580px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    display: none;
    max-height: 520px;
    overflow-y: auto;
}

.expanded .pat-search-dropdown {
    top: 60px;
}

body:has(.pat-search-dropdown.open) .menu-logged-out-menu-container {
  pointer-events: none;
  opacity: 0.5;
}

/* width */
.pat-search-dropdown::-webkit-scrollbar {
    width: 10px;
}

/* Track */
.pat-search-dropdown::-webkit-scrollbar-track {
    width: 10px;
    border-radius: 0 12px 12px 0
}

/* Handle */
.pat-search-dropdown::-webkit-scrollbar-thumb {
    background: #dfdfdf;
    border-radius: 15px;
    width: 10px;
}

/* Handle on hover */
.pat-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #aaa;
    cursor: pointer !important;
}




.pat-search-dropdown.open {
    display: block;
}

.pat-search-loading,
.pat-search-no-results {
    display: none;
    padding: 24px;
    text-align: center;
    color: #667085;
    font-size: 17px;
}

.pat-search-loading.visible,
.pat-search-no-results.visible {
    display: block;
}

/* Category Headers */
.pat-search-category {
    padding: 14px 18px 14px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #565656;
    border-top: 1px solid #f2f4f7;
    box-shadow: 0 0 4px #eee
}

.pat-search-category:first-child {
    border-top: none;
}

.pat-search-category span {
    display: none;
}

/* Result Items */
.pat-search-item {
    display: flex;
    padding: 21px 18px;
    cursor: pointer;
    transition: background-color 0.12s;
    text-decoration: none;
    color: inherit;
    background: #f5f8ff54;
    border-top: 1px solid #eee;
    align-items: center;
}

.pat-search-item:hover {
    background-color: #f5f8ff;
}

.pat-search-item-img {
    width: 70px !important;
    height: auto !important;
    border-radius: 8px;
    flex-shrink: 0;
    margin-right: 14px !important;
    background: #f9fafb;
    box-shadow: 0 0 2px #a6a6a657;
    /* border: 1px solid #e4e4e48f; */
}

.pat-search-item-img.pat-search-item-img-feature {
    background: #eef4ff;
    border: 1px solid #d1e3ff87;
}

.pat-search-item-img.pat-search-item-img-prep {
    border-radius: 8px;
    object-fit: contain;
    padding: 0;
    box-shadow: 0 0 5px #d8d8d8;
    background: none;
    border: none;
}

.pat-search-item-img.pat-search-item-img-product {
    background: transparent;
    border: none;
    padding: 0;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: none !important;
    height: auto !important;
    margin-top: 16px !important;
}

.pat-search-product-img-wrap {
    width: 70px;
    height: 67px;
    border-radius: 6px;
    flex-shrink: 0;
    margin-right: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f6f6f6;
    border: 1px solid #ebebeb;
    box-shadow: inset 0 0 4px #f1f1f1, 0 0 2px #a6a6a629;;
}

.pat-search-product-img-wrap img {
    width: 70px;
    height: auto;
    object-fit: contain;
}

.pat-search-product-img-unlisted {
    background: url(/parts/bottom-left-logo.svg);
    background-position: 0px bottom;
    background-repeat: no-repeat;
    background-size: 82.5%;
    background-color: #f6f6f6;
}

.pat-search-item-icon {
    width: 70px;
    height: 59px;
    border-radius: 8px;
    flex-shrink: 0;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: inset 0 0 4px #e3e3e3ba;
}

.pat-search-item-icon.kb-aptitude-tests {
    background: #eef4ff;
}

.pat-search-item-icon.kb-airlines {
    background: #eef8ff;
}

.pat-search-item-icon.kb-flying-schools {
    background: #f0fdf4;
}

.pat-search-item-icon.kb-cadet-schemes {
    background: #f5f3ff;
}

.pat-search-item-icon.kb-skills {
    background: #fefce8;
}

.pat-search-item-text {
    flex: 1;
    min-width: 0;
    padding-left: 5px;
}

.pat-search-item-title {
    font-size: 19px;
    font-weight: 600;
    color: #1d2939;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pat-search-item-sub {
    font-size: 14px;
    color: #667085;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
    font-weight: 400;
}

.pat-search-item-badge {
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 30px;
    flex-shrink: 0;
    margin-left: 12px;
    white-space: nowrap;
}

.pat-badge-all {
    background: #eef4ff;
    color: #3793D1;
    border: 1px solid #3793d13d;
}

.pat-badge-aspiring {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #16a34a3d;
}

.pat-badge-experienced {
    background: #fefce8;
    color: #ca8a04;
}

.pat-badge-military {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #ff000047;
}

.pat-badge-newly {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #7c3aed3d;
}

/* Activity Info Pills */
.pat-search-item-info {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.pat-search-item-info span {
    font-size: 11px;
    color: #485166;
    background: #eaf3ff;
    padding: 2px 9px;
    border-radius: 4px;
    font-family: 'Inter';
    font-weight: 600;
    border: 1px solid #bfcde0;
}

/* Footer count */
.pat-search-footer {
    padding: 12px 18px;
    text-align: center;
    border-top: 1px solid #f2f4f7;
    font-size: 15px;
    color: #667085;
}

.pat-search-footer b {
    color: #3793D1;
}

/* =====================================================
   ACTIVITY SIDEBAR (public-sidebar, for non-product pages)
   On product pages the original CSS is already loaded;
   duplicated rules here are identical so no conflict.
   ===================================================== */
.public-sidebar {
    position: fixed;
    top: 89.95px;
    right: -740px;
    width: 740px;
    height: calc(100% - 89.95px) !important;
    background-color: #fff;
    box-sizing: border-box;
    transition: right 0.5s ease;
    z-index: 99999;
}

.public-sidebar.slide-in {
    right: 0;
}

.public-sidebar .close-btn {
    height: 23px !important;
    width: 23px;
    position: absolute;
    left: 10px;
    top: 9px;
    background: none !important;
    opacity: 0.5;
    z-index: 1 !important;
    transition: 0.3s;
}

.public-sidebar .close-btn:hover {
    opacity: 0.8;
}

.public-sidebar-title {
    font-size: 19px;
    color: #646464 !important;
    font-family: system-ui;
    position: relative;
    font-weight: 600;
    border-bottom: 1px solid #dfdfdf;
    padding: 7px 14px;
    text-align: right;
}

.public-sidebar-imgs {
    padding: 35px 35px;
    background: linear-gradient(180deg, #99c5fbc7 0%, #cfe1f5ab 45%, #ffffff 100%);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    overflow: visible;
    height: 420px;
}

.public-sidebar-imgs img.img1 {
    width: 82.5%;
    box-shadow: 0 2px 10px #93939361;
    border: 1px solid #8383833d;
}

.public-sidebar-imgs img.img2 {
    width: 50%;
    box-shadow: 0 2px 10px #93939361;
    top: -100px;
    left: 50%;
    position: relative;
    border: 1px solid #8383833d;
}

.public-sidebar-imgs img.img3 {
    width: 90%;
    margin-left: 5%;
    box-shadow: 0 2px 10px #93939361;
    border: 1px solid #8383833d;
}

.imgs-description {
    color: #888;
    font-weight: 400;
    font-size: 0.95em;
    text-align: center;
}

.imgs-description b { font-weight: 500; }

p#sidebar-content {
    margin: 10px;
    padding: 15px 24px 35px 20px !important;
    overflow-y: scroll;
    height: calc(100vh - 158px);
}

#sidebar-content::-webkit-scrollbar {
    width: 9px !important;
    border-radius: 6px !important;
}

#sidebar-content::-webkit-scrollbar-thumb {
    background: #eee;
    border-radius: 6px;
    width: 10px;
}

#sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #ccc;
    cursor: pointer;
}

#sidebar-content h2 {
    color: #3e505d;
    font-family: 'Open Sans', sans-serif;
    font-size: 35px;
    font-weight: 600;
    margin-bottom: 40px;
}

#sidebar-content h2 span {
    font-size: 0.5em;
    color: #888;
}

#sidebar-content h2 span.light-blue {
    color: #9dcced !important;
    font-size: 0.8em !important;
}

#sidebar-content h2 span.e-learning-blue {
    color: #2a4f6b85 !important;
    font-size: 1em !important;
    font-weight: 500;
}

.public-sidebar h3 {
    color: #525252;
    font-family: 'Inter', sans-serif;
    font-size: 22px !important;
    font-weight: 500;
    padding-bottom: 7.5px;
    border-bottom: 1px solid #EEE;
    margin-top: 55px;
}

.public-sidebar p {
    font-size: 14px !important;
    color: #666 !important;
    font-family: 'Inter', sans-serif;
    line-height: 1.95 !important;
    margin-top: 1em !important;
}

.public-sidebar p.cta {
    color: #48606D !important;
    font-weight: 500;
    margin-top: 30px;
}

.public-sidebar p b { color: #48606D; }

.int_link {
    display: inline-flex;
    color: #646464 !important;
    background-color: #fff;
    border: 1px solid #dfdfdf99 !important;
    padding: 5px 18px !important;
    margin-top: 10px;
    border-radius: 30px;
    box-shadow: rgb(50 50 50 / 9%) 0px 0px 5px 1px;
    transition: 0.2s !important;
    align-items: center;
}

.int_link b {
    font-size: 15px !important;
    color: #646464 !important;
    margin: 0 !important;
    top: 0 !important;
    position: relative;
}

.public-sidebar ul.main-sidebar li { margin: 60px 0px 0px 0px; }

.public-sidebar ul.green li {
    margin: 0 0 10px 0 !important;
    background-image: url(/parts/bulletpoint_green.svg);
    background-repeat: no-repeat;
    background-size: 10px;
    padding-left: 25px;
    background-position: 0px 7px;
    font-size: 0.95em;
    font-weight: 500;
    color: #757575;
}

.public-sidebar ul.dark-blue li {
    margin: 0 0 10px 0 !important;
    background-image: url(/parts/bulletpoint_blue.svg);
    background-repeat: no-repeat;
    background-size: 7px;
    padding-left: 25px;
    background-position: 0px 9px;
    font-size: 0.95em;
    font-weight: 500;
    color: #757575;
}

.public-sidebar ul.blue li {
    margin: 0 0 10px 0 !important;
    width: 290px;
    vertical-align: text-top;
    display: inline-block;
    background-image: url(/parts/point_blue.svg);
    background-repeat: no-repeat;
    background-size: 6px;
    padding-left: 25px;
    background-position: 1px 7px;
    font-size: 0.95em;
    font-weight: 500;
    color: #757575;
}

.public-sidebar ul li p {
    color: #696868 !important;
    font-weight: 400;
    margin-bottom: 15px;
}

.public-sidebar ul li b {
    font-weight: 600;
    opacity: 0.95;
    font-size: 1.15em;
    margin-bottom: 14px;
    display: block;
}

.public-sidebar ul li a {
    color: #3592d1;
    font-weight: 400;
    border-bottom: 1px dashed #ccc;
}

/* Feature icons (class names from data.json) */
.public-sidebar .compatibility { background-image: url(/parts/public-activity-information/compatibility.svg); background-repeat: no-repeat; background-size: 85px; padding-left: 100px; }
.public-sidebar .training-mode { background-image: url(/parts/public-activity-information/training-mode.svg); background-repeat: no-repeat; background-size: 70px; background-position-x: 6px; padding-left: 100px; }
.public-sidebar .performance { background-image: url(/parts/public-activity-information/performance.svg); background-repeat: no-repeat; background-size: 60px; background-position-x: 11px; padding-left: 100px; }
.public-sidebar .explainer-video { background-image: url(/parts/public-activity-information/explainer-video.svg); background-repeat: no-repeat; background-size: 70px; background-position-x: 5px; padding-left: 100px; }
.public-sidebar .instruction { background-image: url(/parts/public-activity-information/instruction.svg); background-repeat: no-repeat; background-size: 75px; background-position-x: 4px; padding-left: 100px; }
.public-sidebar .visual-walkthrough { background-image: url(/parts/public-activity-information/visual-walkthrough-2.svg); background-repeat: no-repeat; background-size: 65px; background-position-x: 7px; padding-left: 100px; }
.public-sidebar .joystick { background-image: url(/parts/public-activity-information/joystick.svg); background-repeat: no-repeat; background-size: 75px; background-position-x: 3px; padding-left: 100px; }
.public-sidebar .customisation-mode { background-image: url(/parts/public-activity-information/customisation-mode.svg); background-repeat: no-repeat; background-size: 65px; background-position-x: 10px; padding-left: 100px; }
.public-sidebar .flagged-ques { background-image: url(/parts/public-activity-information/flagged-questions.svg); background-repeat: no-repeat; background-size: 75px; background-position-x: 2px; padding-left: 100px; }
.public-sidebar .adaptive-exams { background-image: url(/parts/public-activity-information/adaptive-examinations.svg); background-repeat: no-repeat; background-size: 75px; background-position-x: 2px; padding-left: 100px; }
.public-sidebar .scenarios { background-image: url(/parts/public-activity-information/realistic-scenarios.svg); background-repeat: no-repeat; background-size: 85px; padding-left: 100px; }
.public-sidebar .virtual-candidates { background-image: url(/parts/public-activity-information/virtual-candidates.svg); background-repeat: no-repeat; background-size: 75px; background-position: 5px 0px; padding-left: 100px; }
.public-sidebar .branching { background-image: url(/parts/public-activity-information/branching-dialogue.svg); background-repeat: no-repeat; background-size: 65px; background-position: 10px 0px; padding-left: 100px; }
.public-sidebar .competency-feedback { background-image: url(/parts/public-activity-information/competency-feedback.svg); background-repeat: no-repeat; background-size: 70px; background-position: 7.5px 0px; padding-left: 100px; }
.public-sidebar .structured-learning { background-image: url(/parts/public-activity-information/structured-learning.svg); background-repeat: no-repeat; background-size: 85px; padding-left: 100px; }
.public-sidebar .knowledge-checks { background-image: url(/parts/public-activity-information/knowledge-checks.svg); background-repeat: no-repeat; background-size: 85px; padding-left: 100px; }
.public-sidebar .evidence-based { background-image: url(/parts/public-activity-information/evidence-based-content.svg); background-repeat: no-repeat; background-size: 70px; background-position: 7.5px 0px; padding-left: 100px; }

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: none;
}

/* Icon-only toggle (hidden on desktop) */
.pat-search-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    border-radius: 8px;
    transition: background 0.15s;
    align-self: center;
}

/* Responsive: below 1120px */
@media screen and (max-width: 1120px) {

    .pat-search-bar {
        display: none !important;
    }

    .pat-search-toggle {
        display: block;
    }

    .pat-search-wrapper.expanded .pat-search-toggle {
        display: none;
    }

    /* When search bar is inside the dropdown, show it */
    .pat-search-dropdown .pat-search-bar {
        display: flex !important;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid #e4e7ec;
        width: 100%;
    }
}

@media screen and (max-width: 1280px) {
    .pat-search-bar {
        width: 235px;
    }

    .pat-search-bar .pat-search-input,
    .pat-search-bar .pat-search-input[type="text"],
    .pat-search-bar input[type="text"] {
        font-size: 15px
    }
}

@media screen and (max-width: 1120px) {

    .pat-search-bar {
        display: none !important;
    }

    .pat-search-toggle {
        display: block;
    }

    .pat-search-wrapper.expanded .pat-search-toggle {
        display: none;
    }

    /* When search bar is inside the dropdown, show it */
    .pat-search-dropdown .pat-search-bar {
        display: flex !important;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid #e4e7ec;
        width: 100%;
    }
}

@media screen and (max-width: 1000px) {
    .public-sidebar {
        top: 50px !important;
        height: calc(100% - 50px) !important;
    }    
}    

@media screen and (max-width: 780px) {
    .expanded .pat-search-dropdown {
        top: 60px;
        position: fixed;
        left: 2%;
        width: 96%;
        border-bottom: 1px solid #aaa;


}

@media screen and (max-width: 600px) {
    .pat-search-wrapper {
        max-width: 100%;
    }
}
