/**
 * com_jargonguide — replaces the .mls-* and .fbContent_* rules that lived in
 * templates/helpfinder inline <style> plus media/com_miniteklivesearch CSS.
 * Values copied from the live styling so the guide looks identical.
 * .topicbox, .last-modified and [class^=icon-] remain styled by the template
 * and site-wide css/style.css — markup reuses those classes deliberately.
 */

/* ------------------------------------------------------------ search bar */
.jg-search {
    position: relative;
    max-width: 750px;
    margin: 0 auto;
    text-align: left;
}

.jg-search-form {
    padding-top: 0;
}

.jg-search-bar {
    max-width: 700px;
    margin: auto;
    border: 4px solid transparent;
    border-radius: 999px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(0.25turn, rgba(103, 0, 255), rgba(183, 0, 255), rgba(245, 0, 255)) border-box;
    overflow: hidden;
}

/* The pill above owns the gradient. v2.0.0 left the original square
   border-image here as well, so two 4px borders were stacked: the inner one
   was shaved by overflow:hidden and pushed the icon off the curve. */
.jg-search-bar .input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.jg-search-icon {
    width: 45px;
    flex: 0 0 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    background: #f7f7f7;
    border-right: 1px solid #e5e5e5;
    border-radius: 999px 0 0 999px;
    color: #777;
    font-size: 14px;
    text-shadow: 1px 1px 0 #fff;
}

.jg-search-bar input.jg-input[type="search"] {
    flex: 1 0 0%;
    width: 100%;
    height: 42px;
    padding: 6px 24px 6px 15px;
    margin: 0;
    font-size: 1.1em;
    box-sizing: border-box;
    background: none;
    border: 0;
    border-radius: 0;
    outline: none;
    box-shadow: none;
}

/* WCAG 2.4.7: the input sets outline:none, so the pill shows focus instead. */
.jg-search-bar:focus-within {
    box-shadow: 0 0 0 3px rgba(103, 0, 255, 0.35);
}

.jg-search-bar input.jg-input::placeholder {
    color: #565656;
    font-size: 1.1em;
}

.jg-search-bar input.jg-input::-webkit-search-cancel-button {
    transform: scale(1.5);
    transform-origin: center;
    margin-left: 8px;
    cursor: pointer;
}

/* ------------------------------------------------------------- dropdown */
.jg-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    text-align: left;
}

.jg-panel {
    max-width: 750px;
    margin: auto;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    padding: 0 0 10px;
}

.jg-results-count {
    text-align: center;
    font-size: 20px;
    color: #0979ca;
    font-weight: 600;
    padding: 10px 0;
}

/* ------------------------------------------------- spelling suggestion */
.jg-suggest {
    margin: 0 15px 10px;
    padding: 14px 15px;
    background: #f5f6f7;
    border-radius: 6px;
    font-size: 17px;
    color: #333;
}

.jg-suggest-btn {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #e60676;
    font-weight: 600;
    cursor: pointer;
}

.jg-suggest-btn:hover {
    text-decoration: underline;
}

.jg-suggest-btn:focus-visible {
    outline: 2px solid #6700ff;
    outline-offset: 2px;
    border-radius: 3px;
}

.jg-count-small {
    display: block;
    font-size: 14px;
    color: #656565;
    font-weight: 400;
    margin: 5px 0 0;
}

/* The dropdown used to grow past the footer once a long answer was expanded.
   The list scrolls inside itself; the count above and the paging below stay
   put. overscroll-behavior stops the page scrolling once the list bottoms out. */
ul.jg-results {
    border-top: 1px solid #e5e5e5;
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: min(60vh, 620px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.jg-result {
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 15px;
}

.jg-result-toggle {
    display: flex;
    align-items: baseline;
    gap: 10px;
    width: 100%;
    background: none;
    border: 0;
    padding: 0;
    margin: 0 0 5px;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
    color: #e60676;
}

.jg-result-toggle:hover .jg-result-title {
    text-decoration: underline;
}

.jg-result-snippet {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    color: #333;
}

/* The search now sits outside the hero's .text-center wrapper, so result text
   reads left-aligned on its own — the site's global `.text-center p` rule no
   longer reaches it and needs no override. */
.jg-panel {
    text-align: left;
}

.jg-result-panel {
    margin-top: 8px;
}

.jg-result-content {
    font-size: 16px;
}

.jg-result-content h3 {
    font-size: 1.1em;
    margin: 0 0 8px;
}

mark.jg-mark {
    background-color: #ffffcc;
    padding: 1px 2px;
    font-weight: inherit;
    color: inherit;
}

.jg-paging {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px 5px;
}

.jg-paging button {
    font-size: 15px;
    padding: 5px 12px;
    border-radius: 3px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #555;
    font-weight: 600;
    cursor: pointer;
}

.jg-paging button:disabled {
    opacity: 0.45;
    cursor: default;
}

/* ---------------------------------------------------------- topics grid
 * (replaces the removed .fbContent_topics / .fbContent_title rules;
 * .topicbox itself is still styled by the template) */
.jg-topics-box {
    display: block;
}

h2.jg-topics-title {
    margin: 15px 0 10px 20px;
    font-size: 1.5em;
    line-height: 1.5em;
}

/* Promoted from h3 to h2 so the page has a correct heading tree. It is a
   sibling section of the topics box, not a child of it. Size unchanged: these
   are the site's own h3 values from css/style.css. */
h2.jg-list-heading {
    margin: 0 0 7px;
    font-size: 1.3em;
    line-height: 1.2em;
}

ul.jg-topics {
    margin: 0;
    padding: 17px 0 10px 10px;
}

.jg-topics > li > a {
    font-weight: 400;
    border-bottom: none;
    display: inline-block;
    padding: 4px 0;
}

.jg-topics li.active a {
    color: #000;
    font-weight: 600;
}

/* -------------------------------------------------------------- accordion
 * Native <details>/<summary>: keyboard operable, expanded state exposed to
 * assistive tech, content in the DOM for SEO — zero JS needed. */
.jg-terms {
    margin: 0 0 30px;
}

details.jg-term {
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
}

details.jg-term:first-of-type {
    border-top: 1px solid #e5e5e5;
}

.jg-term-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    cursor: pointer;
    list-style: none;
    font-size: 17px;
    font-weight: 600;
    color: #e60676;
}

.jg-term-summary::-webkit-details-marker {
    display: none;
}

.jg-term-summary:hover .jg-term-title {
    text-decoration: underline;
}

.jg-caret {
    margin-left: auto;
    transition: transform 0.2s ease;
    color: #555;
}

details[open] > .jg-term-summary .jg-caret {
    transform: rotate(180deg);
}

.jg-term-content {
    padding: 0 15px 15px;
}

.jg-term-content h3 {
    font-size: 1.15em;
    margin: 0 0 10px;
}

.jg-term-edit {
    margin: 10px 0 0;
    font-size: 13px;
}

/* Anchor landing: ~2 s background fade so the eye lands on the opened term */
@keyframes jg-flash {
    0% { background-color: #ffffcc; }
    100% { background-color: #fff; }
}

details.jg-term.jg-anchor-flash {
    animation: jg-flash 2s ease-out 1;
    scroll-margin-top: 20px;
}

/* ----------------------------------------------------- content area
 * (replaces removed .fbContent_core padding and .fbContent_root bare-link
 * underline from the template) */
.jg-guide,
.jg-category {
    padding: 20px;
}

.jg-guide a:not([class]),
.jg-category a:not([class]),
.jg-result-content a:not([class]) {
    text-decoration: underline;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 575px) {
    .jg-results-count {
        font-size: 17px;
    }

    /* The template sets `::placeholder { font-size: 1.1em !important }` for the
       whole site, so this needs the same weight to win. Kept at 1em, not below:
       iOS zooms the viewport when a focused input is under 16px. */
    .jg-search-bar input.jg-input::placeholder {
        font-size: 1em !important;
    }
}
