/* =============================================================================
   help-panel.css — in-page Help / Tutorials launcher for prototype pages.
   Linked directly by _LayoutOverlayMenu.cshtml (NOT bundled into site.min.css —
   it lives under the gulp-excluded prototype/ tree), so every rule here is scoped
   to pages using that layout.

   The "?" FAB replaces the old scroll-to-bottom control in the lower-right; the
   slide-in panel mirrors the resources overlay menu's motion but is far narrower.
   ============================================================================= */

/* ---- Floating Help (?) button — lower-right ---- */
.ovm-help-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1050;
    /* 38px box, right edge 18px from the viewport — the scroll-to-top control
       below is sized + right-aligned to match exactly (same size, same margin).
       Icon kept at 18px so it fills more of the smaller circle (tighter padding). */
    width: 38px;
    height: 38px;
    box-sizing: border-box;
    padding: 0;
    /* Illinois ilw-back-to-top styling: Illini Blue fill, 2px white border, white
       icon; inverts on hover (white fill, blue border, blue icon). */
    border: 2px solid #fff;
    border-radius: 50%;
    background: #13294b;
    color: #fff;
    font-size: 18px;
    /* flex centering so the glyph stays centered regardless of box/font size */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.ovm-help-fab:hover,
.ovm-help-fab:focus {
    background: #fff;
    border-color: #13294b;
    color: #13294b;
    outline: none;
}
.ovm-help-fab .fas { color: inherit; }
/* Hidden until the page is known to have at least one Help Tutorial (help-panel.js
   toggles the [hidden] attribute via setTutorials). */
.ovm-help-fab[hidden] { display: none !important; }

/* Stack the existing scroll-to-top control directly above the Help FAB and give it
   the same Illinois back-to-top styling. The wrapper is position-only (shrink-to-fit
   at right:18px so its right edge lines up with the FAB); the circle styling lives on
   the inner icon — NOT the anchor — because theme.js toggles the anchor's display
   (inline/none) for its scroll-driven show/hide, and a styled inline-flex icon child
   survives that untouched. */
.scrollToTopSection {
    bottom: 64px;
    right: 18px;
    /* override main.css's shared width:60px so the 38px circle's right edge lands
       on the same 18px margin as the FAB */
    width: 38px;
}
.scrollToTopSection .ovm-totop-icon {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #13294b;
    border: 2px solid #fff;
    color: #fff;
    font-size: 18px;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
/* Hover inverts (matches the FAB + the illinois.edu Back-to-Top button). Set on the
   icon directly so the theme.less `#to-top:hover { color: orange }` rule, which
   targets the anchor, can't bleed in. */
.scrollToTopSection #to-top:hover .ovm-totop-icon,
.scrollToTopSection #to-top:focus .ovm-totop-icon {
    background: #fff;
    border-color: #13294b;
    color: #13294b;
}

/* ---- Backdrop ---- */
.ovm-help-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(19, 41, 75, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1075;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.ovm-help-backdrop[hidden] { display: none !important; }
body.ovm-help-open .ovm-help-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* ---- Sliding panel (narrow) ---- */
.ovm-help-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 22vw;
    min-width: 300px;
    max-width: 380px;
    /* The panel is an <aside>; theme.css has a global `aside { padding:50px 0;
       color:#fff; background:#48484a }`. Reset all three: padding caused a 50px
       white gap above the header; color:#fff would make any unstyled body text
       invisible on the white panel. */
    padding: 0;
    color: #1f2937;
    background: #fff;
    z-index: 1080;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
body.ovm-help-open .ovm-help-panel {
    transform: translateX(0);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.18);
}
@media (max-width: 600px) {
    .ovm-help-panel { width: 100vw; min-width: 0; max-width: none; }
}

/* ---- Header (navy bar + orange top line, matching the resources panel) ---- */
.ovm-help-header {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    min-height: 56px;
    padding: 0 16px;
    background: #13294b;
    color: #fff;
    border-top: 8px solid var(--il-orange, #FF5F05);
    flex: 0 0 auto;
}
.ovm-help-title {
    flex: 1 1 auto;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.ovm-help-title .fas { margin-right: 6px; color: var(--il-orange, #FF5F05); }
.ovm-help-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
}
.ovm-help-close:hover,
.ovm-help-close:focus { background: rgba(255, 255, 255, 0.12); outline: none; }

/* ---- Body + tutorial list ---- */
.ovm-help-body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 16px; }
.ovm-help-intro { font-size: 13px; line-height: 1.45; color: #6b7280; margin: 0 0 14px; }
.ovm-help-list { list-style: none; margin: 0; padding: 0; }
/* Flex row so a staff-only edit shortcut can sit beside the launch button. With no edit
   button (the common case) the single child still fills the row exactly as before. */
.ovm-help-item { display: flex; align-items: stretch; gap: 6px; margin-bottom: 8px; }
.ovm-help-item-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    /* border-box so width:100% includes the 12px padding + 1/3px borders and the
       row doesn't overflow the panel (the cause of the horizontal scrollbar). */
    box-sizing: border-box;
    text-align: left;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #13294b;
    border-radius: 6px;
    padding: 11px 12px;
    cursor: pointer;
    color: #1f2937;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.ovm-help-item-btn:hover,
.ovm-help-item-btn:focus {
    background: #f5f8ff;
    border-left-color: var(--il-orange, #FF5F05);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    outline: none;
}
.ovm-help-item-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eef3fb;
    color: #13294b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: background 0.15s ease, color 0.15s ease;
}
.ovm-help-item-btn:hover .ovm-help-item-icon,
.ovm-help-item-btn:focus .ovm-help-item-icon {
    background: var(--il-orange, #FF5F05);
    color: #fff;
}
.ovm-help-item-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }
.ovm-help-item-go { flex: 0 0 auto; color: #9ca3af; font-size: 12px; }
/* Staff-only edit shortcut — square button matching the row height; opens the tour's
   admin Save page in a new tab. Hidden entirely for non-staff (never rendered by the JS). */
.ovm-help-item-edit {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ovm-help-item-edit:hover,
.ovm-help-item-edit:focus {
    background: #f5f8ff;
    border-color: var(--il-orange, #FF5F05);
    color: #13294b;
    outline: none;
    text-decoration: none;
}
.ovm-help-empty {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 24px 8px;
}

/* Never print the floating help affordance or its overlay (matches main.css's
   print-hide of the scroll controls). */
@media print {
    .ovm-help-fab,
    .ovm-help-backdrop,
    .ovm-help-panel { display: none !important; }
}
