/*
 * /account/help — TECH-5710
 *
 * Every colour here already exists in shop_1.2.css; nothing new is introduced.
 *   #000 #333 #5d5d5d #60605c  ink
 *   #cacaca #e5e5e5            rules
 *   #f6f6f6                    surface
 *   #ab0000                    accent, attention states only
 *
 * The shop serves three precompiled breakpoint bundles (TemplateBase.tml) with different px
 * values in each. That is a reason not to add px literals to THOSE files - it is not a reason
 * to avoid a media query HERE, because this is a separate stylesheet and a @media in it is
 * unaffected by them. Sizing is still flow, gap and relative units.
 *
 * DO NOT put class="help" on #content either. shop_1.2.css already owns a bare `.help` rule for a
 * small tooltip trigger:
 *     .help { background:url(//s.milleporte.com/webapp/images/help.png) no-repeat right 4px;
 *             padding:0 18px 0 0; display:inline-block; cursor:pointer }
 * On #content that paints a stray question-mark badge at the top right, puts cursor:pointer over the
 * whole page, and — worse — makes #content INLINE-BLOCK, i.e. shrink-to-fit. Every class in this file
 * is prefixed `help-` for that reason. A bare, generic class name in this codebase is already taken.
 *
 * DO NOT reintroduce `container-type` on #content. It was here, and it took the help page down
 * in production: .account-wrap is a Pure FLEX grid and .account-main is a flex item with no
 * explicit width in the loaded bundles, so it shrink-to-fits. `container-type: inline-size`
 * implies `contain: inline-size`, which makes this element contribute NOTHING to that
 * calculation - the column collapsed to about 40px and every line wrapped to one character.
 * A container query would need its own full-width wrapper inside the flex item; a media query
 * needs nothing.
 */

/* ---------- breadcrumb ---------- */
.help-crumb {
    margin: 0 0 18px;
    font-size: 12px;
    color: #5d5d5d;
}

.help-crumb a {
    color: #5d5d5d;
    text-decoration: none;
}

.help-crumb a:hover {
    color: #000;
    text-decoration: underline;
}

.help-crumb span[aria-hidden] {
    margin: 0 8px;
    color: #cacaca;
}

.help-lede {
    margin: 0 0 22px;
    color: #5d5d5d;
    font-size: 13px;
}

/* ---------- search ---------- */
.help-search {
    position: relative;
    margin: 0 0 8px;
}

.help-search--input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 15px 13px 42px;
    border: 1px solid #cacaca;
    border-radius: 2px;
    background: #fff;
    color: #333;
    font-family: inherit;
    font-size: 15px;
}

.help-search--input::placeholder {
    color: #9a9a94;
}

.help-search--input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.help-search--icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    fill: none;
    stroke: #5d5d5d;
    stroke-width: 1.6;
    pointer-events: none;
}

.help-count {
    margin: 0 0 24px;
    min-height: 1.6em;
    color: #5d5d5d;
    font-size: 12px;
}

.help-count b {
    color: #000;
    font-weight: bold;
}

/* ---------- keyword chips ---------- */
.help-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
}

.help-chips--label {
    align-self: center;
    margin-right: 2px;
    color: #5d5d5d;
    font-size: 11px;
    letter-spacing: 0.1em;
}

.help-chip {
    padding: 5px 14px;
    border: 1px solid #cacaca;
    border-radius: 999px;
    background: #fff;
    color: #333;
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

.help-chip:hover {
    border-color: #000;
}

.help-chip[aria-pressed="true"] {
    border-color: #000;
    background: #000;
    color: #fff;
}

/* ---------- groups ---------- */
.help-group--title {
    margin: 22px 0 10px;
    padding: 0;
    color: #60605c;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.12em;
}

.help-group--count {
    margin-left: 8px;
    color: #cacaca;
    font-weight: normal;
    letter-spacing: 0;
}

.help-group[hidden] {
    display: none;
}

/* ---------- question / answer ---------- */
.help-qa {
    border-top: 1px solid #e5e5e5;
}

.help-qa:last-child {
    border-bottom: 1px solid #e5e5e5;
}

.help-qa[hidden] {
    display: none;
}

.help-qa--q {
    display: flex;
    list-style: none;
    align-items: baseline;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 15px 2px;
    border: 0;
    background: none;
    color: #333;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.65;
    text-align: left;
    cursor: pointer;
}

/* Both are needed to drop the native disclosure triangle; we draw our own caret. */
.help-qa--q::-webkit-details-marker {
    display: none;
}

.help-qa--q::marker {
    content: "";
}

.help-qa--q:hover {
    color: #000;
}

.help-qa--q:focus-visible {
    outline: 2px solid #000;
    outline-offset: -2px;
}

.help-qa--mark {
    flex: none;
    width: 1em;
    color: #cacaca;
    font-size: 12px;
}

.help-qa[open] .help-qa--mark {
    color: #ab0000;
}

.help-qa--text {
    flex: 1;
}

.help-qa--caret {
    flex: none;
    align-self: center;
    width: 9px;
    height: 9px;
    border-right: 1.4px solid #5d5d5d;
    border-bottom: 1.4px solid #5d5d5d;
    transform: rotate(45deg) translate(-2px, -2px);
}

.help-qa[open] .help-qa--caret {
    transform: rotate(-135deg) translate(-2px, -2px);
}

/* No display rule here on purpose: showing and hiding the answer is <details>' job. The previous
   version used a class the JS toggled, so with JavaScript off the page showed 83 questions and not
   one answer — and the per-question pages were the only way to read anything (TECH-5720). */
.help-qa--a {
    padding: 0 2px 20px 27px;
    color: #5d5d5d;
    font-size: 13.5px;
    line-height: 1.9;
}

.help-qa--a p {
    margin: 0 0 0.9em;
}

.help-qa--a a {
    color: #000;
}

.help-qa--a ul {
    list-style: disc;
}

.help-qa--a ol {
    list-style: decimal;
}

.help-qa--a li {
    margin: 0 0 0.5em 1em;
    padding-left: 1em;
}

/* Answers carry authored tables; they must scroll inside the answer, never widen the page. */
.help-qa--a table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}



.help-empty {
    padding: 30px 2px;
    color: #5d5d5d;
    font-size: 13.5px;
}

.help-empty[hidden] {
    display: none;
}

/* ---------- contact card ---------- */
.help-desk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 34px 0 0;
    padding: 20px 22px;
    border: 1px solid #cacaca;
}

.help-desk--text {
    margin: 0;
    color: #333;
    font-size: 13.5px;
}

.help-desk--text b {
    display: block;
    margin-bottom: 2px;
    color: #000;
}

.help-desk--btn {
    margin-left: auto;
    padding: 10px 22px;
    border-radius: 2px;
    background: #000;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.help-desk--btn:hover {
    background: #2a2a2a;
}

/* ---------- deep-link topic list, unchanged in substance ---------- */
.help-topic ul {
    list-style: disc;
}

.help-topic li {
    margin: 0 0 0.5em 1em;
    padding-left: 1em;
}

.help-topic a.active {
    color: #000;
}

/* ---------- narrow column ---------- */
@media (max-width: 520px) {
    /* 16px exactly: iOS Safari zooms the page when a focused input is below 16px. */
    .help-search--input {
        padding: 12px 14px 12px 40px;
        font-size: 16px;
    }

    .help-chips--label {
        width: 100%;
        margin-bottom: 2px;
    }

    .help-chip {
        padding: 7px 14px;
    }

    .help-qa--q {
        gap: 10px;
        min-height: 44px;
        padding: 14px 2px;
    }

    .help-qa--a {
        padding-left: 22px;
        font-size: 14px;
    }

    .help-desk {
        flex-direction: column;
        align-items: stretch;
    }

    .help-desk--btn {
        margin-left: 0;
        padding: 13px 22px;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .help-qa--caret {
        transition: none;
    }
}
