/* Site menu drawer (replaces #mySidenav). Opens from the right, over a dimmed backdrop. */
:root {
    --rsd-purple: #603f97;
    --rsd-purple-soft: #f3effa;
    --rsd-teal: #3fbeb6;
    --rsd-teal-dark: #2fa59d;
    --rsd-ink: #15112e;
    --rsd-muted: #6b6880;
    --rsd-line: #ece9f3;
    --rsd-w: 380px;
}

/* Trigger: the old .sidenavmenu span becomes a real button. No display/padding here: style.css sizes it
   (60x60, padding 18px) and checkout / LearnDash CSS hide or show .sidenavmenu with plain class rules. */
button.sidenavmenu {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 8px;
    margin: 0;
    box-sizing: border-box;
    line-height: 0;
    color: inherit;
    transition: background-color .15s ease;
}
button.sidenavmenu svg { display: block; }
.site-header button.sidenavmenu:focus { background: transparent; }
.site-header button.sidenavmenu:hover { background: rgba(255, 255, 255, .12); }
.single-post .site-header button.sidenavmenu:hover { background: rgba(21, 17, 46, .06); }
button.sidenavmenu:focus-visible { outline: 2px solid var(--rsd-teal); outline-offset: -6px; }

/* Wrapper */
.rsd {
    position: fixed;
    inset: 0;
    z-index: 999999999;
    visibility: hidden;
    pointer-events: none;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.rsd.is-open { visibility: visible; pointer-events: auto; }
.rsd.is-closing { visibility: visible; }

.rsd-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(21, 17, 46, .45);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .25s ease;
}
.rsd.is-open .rsd-backdrop { opacity: 1; }

.rsd-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--rsd-w);
    max-width: 100%;
    background: #fff;
    box-shadow: -24px 0 48px -12px rgba(21, 17, 46, .25);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.22, .8, .24, 1);
    outline: none;
}
.rsd.is-open .rsd-panel { transform: none; }

@media (prefers-reduced-motion: reduce) {
    .rsd-backdrop, .rsd-panel { transition: none; }
}

/* Head */
.rsd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 8px 0 24px;
    border-bottom: 1px solid var(--rsd-line);
    flex: none;
}
.rsd-head a { display: flex; line-height: 0; }
.rsd-head img { width: 150px; height: auto; }
.rsd-close {
    appearance: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--rsd-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color .15s ease;
}
/* the theme gives every button:focus/:hover a purple fill; undo it here */
.rsd .rsd-close:focus { background: transparent; color: var(--rsd-ink); }
.rsd .rsd-close:hover { background: var(--rsd-purple-soft); color: var(--rsd-purple); }
.rsd .rsd-close:focus-visible { outline: 2px solid var(--rsd-purple); outline-offset: -2px; }
.rsd-close svg { width: 22px; height: 22px; }

/* Body */
.rsd-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 12px 16px;
}
/* Academy login: first thing in the drawer */
.rsd-login {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--rsd-purple-soft);
    border: 1px solid #e2daf1;
    color: var(--rsd-ink);
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.rsd-login:hover { background: #ebe4f7; border-color: #cfc2e8; color: var(--rsd-ink); }
.rsd-login:focus-visible { outline: 2px solid var(--rsd-purple); outline-offset: 2px; }
.rsd-login-i {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--rsd-purple);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rsd-login-i svg { width: 20px; height: 20px; }
.rsd-login > span:nth-child(2) { flex: 1; min-width: 0; }
.rsd-login-t { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--rsd-purple); }
.rsd-login-d { display: block; font-size: 13.5px; line-height: 1.4; color: var(--rsd-muted); }
.rsd-login > svg { flex: none; width: 18px; height: 18px; color: var(--rsd-purple); transition: transform .15s ease; }
.rsd-login:hover > svg { transform: translateX(2px); }

.rsd-group { padding: 16px 0 4px; }
.rsd-group + .rsd-group { border-top: 1px solid var(--rsd-line); margin-top: 8px; }
.rsd-label {
    margin: 0 12px 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rsd-muted);
}
.rsd ul { list-style: none; margin: 0; padding: 0; }
.rsd li { margin: 0; padding: 0; background: none; }
.rsd li:hover { background: none; }

.rsd-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--rsd-ink);
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.rsd-link:hover, .rsd-link:focus-visible { background: var(--rsd-purple-soft); color: var(--rsd-purple); }
.rsd-link:focus-visible { outline: 2px solid var(--rsd-purple); outline-offset: -2px; }
.rsd-link[aria-current="page"] { color: var(--rsd-purple); }
.rsd-t {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}
.rsd-d {
    display: block;
    margin-top: 2px;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--rsd-muted);
}
.rsd-link:hover .rsd-d { color: #5b5476; }
.rsd-badge {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    color: #fff;
    background: #e5322d;
    padding: 3px 6px;
    border-radius: 999px;
}
.rsd-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 12px 0;
    padding: 6px 0;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--rsd-purple);
    text-decoration: none;
}
.rsd-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.rsd-more svg { width: 16px; height: 16px; transition: transform .15s ease; }
.rsd-more:hover svg { transform: translateX(2px); }

/* Plain links (Company) sit tighter */
.rsd-group--plain .rsd-link { padding: 8px 12px; }
.rsd-group--plain .rsd-t { font-weight: 500; }

/* Foot */
.rsd-foot {
    flex: none;
    display: grid;
    grid-template-columns: 1fr;
    padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--rsd-line);
    background: #fff;
}
.rsd-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 10px;
    border-radius: 10px;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.rsd-btn svg { width: 18px; height: 18px; flex: none; }
.rsd-btn--ghost { color: var(--rsd-ink); border: 1.5px solid #d9d5e4; background: #fff; }
.rsd-btn--ghost:hover { border-color: var(--rsd-purple); color: var(--rsd-purple); }
.rsd-btn--primary { color: #fff; background: var(--rsd-teal); border: 1.5px solid var(--rsd-teal); }
.rsd-btn--primary:hover { background: var(--rsd-teal-dark); border-color: var(--rsd-teal-dark); color: #fff; }
.rsd-btn:focus-visible { outline: 2px solid var(--rsd-purple); outline-offset: 2px; }

/* Phones: full width */
@media (max-width: 480px) {
    .rsd-panel { width: 100%; box-shadow: none; }
    .rsd-head { padding-left: 16px; }
    .rsd-body { padding: 4px 8px 12px; }
    .rsd-foot { padding-left: 16px; padding-right: 16px; }
}

/* Lock page scroll while open */
html.rsd-lock, html.rsd-lock body { overflow: hidden; }
