/**
 * HelpDrawer.css — in-context slide-in help drawer + floating "?" button.
 * Brand accent is the students green; used site-wide on the students domain.
 */

:root { --hd-accent: #18823e; --hd-accent-dark: #12692f; }

/* Floating help button */
.help-fab {
    position: fixed;
    right: 20px; bottom: 20px;
    width: 54px; height: 54px;
    border-radius: 50%; border: none;
    background: var(--hd-accent); color: #fff;
    font-size: 1.35rem; cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    z-index: 1200;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, transform .15s;
}
.help-fab:hover { background: var(--hd-accent-dark); transform: translateY(-2px); }
.help-fab:focus-visible { outline: 3px solid rgba(24, 130, 62, 0.4); outline-offset: 2px; }

/* Google's reCAPTCHA badge defaults to the same bottom-right corner as the help
   FAB and was sitting under it. Lift it above the FAB so both are visible.
   (Must stay visible per Google's terms — reposition, never hide.) */
.grecaptcha-badge { bottom: 88px !important; }

/* Root + overlay */
.help-drawer-root { position: fixed; inset: 0; z-index: 1300; pointer-events: none; }
.help-drawer__overlay {
    position: absolute; inset: 0;
    background: rgba(17, 24, 20, 0.45);
    opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.help-drawer-root.is-open .help-drawer__overlay { opacity: 1; pointer-events: auto; }
body.help-drawer-lock { overflow: hidden; }

/* Panel */
.help-drawer {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 420px; max-width: 92vw;
    background: #fff;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.22);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.22,.61,.36,1);
    display: flex; flex-direction: column;
    pointer-events: auto;
    font-family: Arial, Helvetica, sans-serif;
}
.help-drawer-root.is-open .help-drawer { transform: translateX(0); }

/* Header */
.help-drawer__head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    background: var(--hd-accent); color: #fff;
    flex-shrink: 0;
}
.help-drawer__ico {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .9rem; flex-shrink: 0;
}
.help-drawer__title {
    margin: 0; font-size: 1.05rem; font-weight: 700;
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.help-drawer__close {
    border: none; background: rgba(255, 255, 255, 0.16); color: #fff;
    width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 1rem;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.help-drawer__close:hover { background: rgba(255, 255, 255, 0.3); }

/* Body (scrolls) */
.help-drawer__body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
.help-drawer__loading { color: #6b7b72; text-align: center; padding: 30px 0; }

/* No-help state */
.help-drawer__none { text-align: center; color: #6b7b72; padding: 40px 12px; }
.help-drawer__none i { font-size: 2rem; color: #cfe6d8; display: block; margin-bottom: 12px; }
.help-drawer__none p { margin: 0; }

/* The article (this page's help) */
.help-drawer__article { color: #24302a; font-size: .97rem; line-height: 1.65; }
.help-drawer__article h1, .help-drawer__article h2 { font-size: 1.15rem; color: var(--hd-accent); margin: 0 0 10px; }
.help-drawer__article h3 { font-size: 1rem; color: var(--hd-accent-dark); margin: 16px 0 6px; }
.help-drawer__article p  { margin: 0 0 12px; }
.help-drawer__article ul, .help-drawer__article ol { margin: 0 0 12px; padding-left: 20px; }
.help-drawer__article li { margin: 4px 0; }
.help-drawer__article img { max-width: 100%; height: auto; }
.help-drawer__article table { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.help-drawer__article th, .help-drawer__article td { border: 1px solid #d9e2dc; padding: 6px 8px; text-align: left; }

/* Footer — browse-all link out to the Help Center page */
.help-drawer__foot {
    flex-shrink: 0;
    border-top: 1px solid #e6eae7;
    padding: 12px 16px;
    background: #f5f8f6;
}
.help-drawer__browse {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--hd-accent); font-weight: 700; text-decoration: none; font-size: .92rem;
}
.help-drawer__browse:hover { color: var(--hd-accent-dark); text-decoration: underline; }

@media (max-width: 520px) {
    .help-drawer { width: 100vw; max-width: 100vw; }
    .help-fab { right: 14px; bottom: 14px; width: 50px; height: 50px; }
}
