:root {
    --playbook-teal: #45A59D;
}

.playbook-main-nav-wrapper {
    display: flex;
    justify-content: center !important;
    gap: 8px;
    /* flex-wrap: wrap; */
}


.acf-filter-wrapper {
    position: relative;
    width: 100%;
}

.acf-filter-wrapper form {
    margin: 0 !important;
    height: 100%;
    display: flex;
    gap: 6px;
    align-items: center;
}

.sub-category-filter #unique_sub_category {
    text-align: center;
    /* centers selected text */
}

.sub-category-filter #unique_sub_category option {
    text-align: left;
}

.acf-filter-wrapper #select-acf-filter::after {
    content: "";
    position: absolute;
    right: 22px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}


/*** Tooltips */
/* Tooltip wrapper */
.info-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 18px;
}

/* Icon default state (grayscale) */
.info-tooltip img {
    width: 18px;
    height: 18px;
    /* filter: grayscale(100%) opacity(0.7); */
    transition: all 0.3s ease;
}

/* Icon hover – full color */
.info-tooltip:hover img {
    filter: grayscale(0%) opacity(1);
}

/* Tooltip text */
.tooltip-text {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #45A59D;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 999;
}

/* Tooltip arrow */
.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #45A59D transparent transparent transparent;
}

/* Show tooltip on hover */
.info-tooltip:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
}



/* Wrapper for positioning the arrow */
.sub-category-filter {
    /* width:100%; */
    display: inline-flex;
    position: relative;
}

.sub-category-filter form {
    position: relative;
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 0px;
}

/* Style the select */
#unique_sub_category {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;


}


/* Navigation Tabs */
.playbook-main-nav-wrapper.playbook-nav-tabs {
    /* display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: space-between; */
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.playbook-main-nav-wrapper.playbook-nav-tabs .playbook-nav-tab {
    padding: 20px 26px;
    border: 0px solid var(--playbook-teal);
    border-radius: 8px;
    color: var(--playbook-teal) !important;
    background: white !important;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    text-transform: uppercase;
    /* width:100%; */
    line-height: 1.2;
    white-space: nowrap;
    padding: 20px 26px;
}
.playbook-main-nav-wrapper.playbook-nav-tabs .playbook-nav-tab.trl-cri-filter{
    text-align:left;

}
.playbook-main-nav-wrapper.playbook-nav-tabs #unique_sub_category .playbook-nav-tab{
    text-align:left;
}


.playbook-main-nav-wrapper.playbook-nav-tabs select.playbook-nav-tab {
    height: 100%;
    margin-bottom: 0px;
    /* Add custom SVG dropdown arrow (new icon, color via var) */
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="%2312A085" d="M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 18px 18px !important;
    /* Remove default arrow for cross-browser */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 35px !important;
    outline: 0;
    min-width: 180px;
}

 .mobile-nav-container .mobile-header-dropdown.active{
    border: 0px solid var(--playbook-teal);
    border-radius: 8px;
    height: 100%;
    margin-bottom: 0px;
    background-repeat: no-repeat !important;
    background-size: 18px 18px !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 60px;
    outline: 0;
    min-width: 180px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    text-transform: uppercase;
    /* width:100%; */
    line-height: 1.2;
    white-space: nowrap;
    text-align:center;
    background-position: right 30px center !important;
    padding: 20px 26px;
    max-width: 220px;
 }

  .mobile-nav-container .mobile-header-dropdown{
    padding-right:60px  !important;
  }

.playbook-main-nav-wrapper button.custom-static-btn.playbook-nav-tab {
    width: 100%;
}

.playbook-main-nav-wrapper.playbook-nav-tabs select.playbook-nav-tab:hover,
.mobile-nav-container .mobile-nav-header .mobile-header-dropdown.active,
.playbook-main-nav-wrapper.playbook-nav-tabs .playbook-nav-tab.active,
.playbook-main-nav-wrapper.playbook-nav-tabs .playbook-nav-tab:hover,
.mobile-nav-container .mobile-dropdown-wrapper:hover .mobile-dropdown-select ,
.mobile-nav-container .mobile-dropdown-select:hover, 
.mobile-nav-container .mobile-dropdown-select.active,
.mobile-nav-container .mobile-header-dropdown.active{
    background: var(--playbook-teal) !important;
    color: #fff !important;
    background-repeat: no-repeat !important;
    background-size: 18px 18px !important;
    /* Swap SVG arrow to white on hover */
    background-image: url('data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="white" d="M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"/></svg>') !important;
    background-position: right 16px center !important;
}
.mobile-dropdown-wrapper.active {
    background: var(--playbook-teal);
    color: #fff !important;
    border-radius: 3px;
}

.playbook-main-nav-wrapper.playbook-nav-tabs button.playbook-nav-tab:hover,
.playbook-main-nav-wrapper.playbook-nav-tabs button.playbook-nav-tab.active{
    background-image: none !important;

}

.playbook-main-nav-wrapper.playbook-nav-tabs .playbook-nav-tab:hover {
    background: var(--playbook-teal);
    /* color: var(--playbook-teal) !important; */
    color: #fff !important;
}


.playbook-main-nav-wrapper.playbook-nav-tabs .playbook-nav-tab .dropdown-arrow {
    font-size: 10px;
}

@media(max-width:1390px) {
    .playbook-main-nav-wrapper.playbook-nav-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }

    .playbook-main-nav-wrapper.playbook-nav-tabs .playbook-nav-tab {
        width: fit-content !important;
    }

    .acf-filter-wrapper {
        width: fit-content;
    }
}




/* Mobile nav styles of navigation */

body.resource-nav-menu-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
    top: 0;
}

body.resource-nav-menu-active header {
    display: none;
}

/* Allow scrolling only in the mobile nav sidebar */
.resource-nav-menu-active .mobile-nav-sidebar {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    max-height: 100vh;
}

/* Mobile Navigation Container - PARENT WRAPPER */
.mobile-nav-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

/* All mobile styles scoped under .mobile-nav-container */
.mobile-nav-container .mobile-nav-header {
    display: none;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    /* background: white; */
    /* border: 2px solid var(--playbook-teal); */
    border-radius: 8px;
    padding: 10px 0px;
    margin-bottom: 0;
    padding-top:0px;
}

.mobile-nav-container .mobile-nav-selected {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background-color: var(--playbook-teal);
    flex: 1;
    text-align: left;
    padding:20px 26px;
    border-radius: 10px;
    display: block;
    width: fit-content;
    max-width: 220px;
    text-align: center;
    line-height: 1.2;
}

.mobile-nav-container .mobile-hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 38px;
    height: 100%;
    justify-content: center;
    align-items: center;
    padding:0px;
}

.mobile-nav-container .mobile-hamburger-btn span {
    height: 6px;
    background-color: var(--playbook-teal);
    transition: all 0.3s ease;
    width: 100%;
    border-radius: 7px;
}

.mobile-nav-container .mobile-hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-container .mobile-hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-container .mobile-hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Sidebar Navigation */
.mobile-nav-container .mobile-nav-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100vw;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px;
    padding-top: 50px;
}

.mobile-nav-container .mobile-nav-sidebar.active {
    left: 0;
}

.mobile-nav-container .mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.mobile-nav-container .mobile-nav-overlay.active {
    display: block;
}

.mobile-nav-container .mobile-nav-sidebar-header {
    display: flex;
    justify-content: end;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.mobile-nav-container .mobile-nav-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #3C3C3C;
    cursor: pointer;
    line-height: 1;
}

.mobile-nav-container .mobile-nav-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width:80%;
    margin: 0px auto;
}

.mobile-nav-container .mobile-nav-item {
    padding: 20px 0px;
    background: white !important;
    border: 0px solid var(--playbook-teal);
    border-radius: 8px;
    color: var(--playbook-teal) !important;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    line-height: 1;
}

.mobile-nav-container .mobile-nav-item:hover,
.mobile-nav-container .mobile-nav-item.active {
    background: var(--playbook-teal) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(18, 160, 133, 0.2);
}

/* Mobile dropdowns in sidebar */
.mobile-nav-container .mobile-dropdown-wrapper {
    width: 100%;
    height: 100%;
}

.mobile-nav-container .mobile-dropdown-select {
    width: 100%;
    padding: 15px 20px;
    background: white !important;
    border: 0px solid var(--playbook-teal);
    border-radius: 8px;
    color: var(--playbook-teal)  !important;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    appearance: none;
    height: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="%2312A085" d="M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"/></svg>') !important;
    background-repeat: no-repeat  !important;
    background-position: right 16px center !important;
    background-size: 18px 18px !important;
    margin-bottom: 5px;
    text-align: center;
    box-shadow: none;
}

.mobile-nav-container .mobile-tooltip-wrapper {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 5px;
}

/* Mobile-specific styles */
@media screen and (max-width: 1024px) {
   

    /* Hide desktop navigation on mobile */
    .playbook-main-nav-wrapper.playbook-nav-tabs {
        display: none !important;
    }
    .mobile-nav-container .mobile-dropdown-wrapper:hover {
        background: var(--playbook-teal);
        border-radius: 8px;
    }

    .mobile-nav-container .mobile-dropdown-select {
        /* width: fit-content !important; */
        min-width: 220px;
        margin: 0 auto 0px auto;
        display: block;
        padding: 20px 0px;
        font-size: 14px;
        background-position: right 10px center !important ;
        outline: 0;
    }
}


@media(max-width:1396px){
     .mobile-nav-container .mobile-nav-header {
        display: flex;
    }
}

/* Desktop styles */
@media screen and (min-width: 1396px) {
    .mobile-nav-container {
        display: none !important;
    }

    
}

@media(min-width:1397px){
.playbook-main-nav-wrapper.playbook-nav-tabs {
        display: flex !important;
    }
}

@media screen and (max-width: 1396px) {
    .playbook-main-nav-wrapper.playbook-nav-tabs{
        display:none !important;
    }
    }

/* For very small screens */
@media screen and (max-width: 480px) {
    .mobile-nav-container .mobile-nav-sidebar {
        width: 100%;
    }

    .mobile-nav-container .mobile-nav-selected,
    .mobile-nav-container .mobile-nav-item {
        font-size: 14px;
    }

    .mobile-nav-container .mobile-nav-sidebar {
        padding: 15px;
        padding-top:50px;
    }
    .mobile-nav-container .mobile-nav-items{
        max-width: 100%;
    }
}

/* Loading Overlay */
.playbook-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: rgba(255, 255, 255, 0.75); */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

.playbook-loading-overlay.active {
    display: flex;
}

.playbook-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(18, 160, 133, 0.1);
    border-top: 5px solid var(--playbook-teal);
    border-radius: 50%;
    animation: playbook-spin 1s linear infinite;
}

@keyframes playbook-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
