/* The help panel: an aside fixed to the right edge, over the page, so the page and whatever
   the user has typed stay as they are. Scoped under .help-panel so nothing here reaches the
   rest of SiteInfo, the way service-portal.css is scoped under .sp.

   Above the popdialog (1930 in Site.css) on purpose: the article is wanted while the dialog
   it describes is open. Colours are white and neutral greys, and the accent comes from the
   per-company CSS variable, so a customer with its own palette keeps it. */

.help-panel {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100%;
    z-index: 1940;
    flex-direction: column;
    background-color: #FFFFFF;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
    color: #2F2F33;
}

.help-panel.is-open {
    display: flex;
}

.help-panel * {
    box-sizing: border-box;
}

.help-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #E4E4E7;
}

.help-panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.help-panel-close {
    border: none;
    background-color: transparent;
    padding: 0 4px;
    font-size: 24px;
    line-height: 1;
    color: #777777;
    cursor: pointer;
}

.help-panel-close:hover,
.help-panel-close:focus {
    color: #2F2F33;
}

.help-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.help-panel-body h2 {
    margin: 0 0 12px 0;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
}

.help-panel-body h3 {
    margin: 18px 0 6px 0;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    border-left: 4px solid var(--si-accent, #E4E4E7);
    padding-left: 8px;
}

.help-panel-body p {
    margin: 0 0 10px 0;
}

.help-panel-body ol,
.help-panel-body ul {
    margin: 0 0 10px 0;
    padding-left: 22px;
}

.help-panel-body li {
    margin-bottom: 6px;
}

/* The links on the pages that open the panel. Sized and weighted like the labels they sit
   next to, underlined so they read as links and not as more label. */
.help-link {
    display: inline-block;
    vertical-align: bottom;
    margin-left: 8px;
    padding-bottom: 3px;
    font-weight: 400;
    color: #333333;
    text-decoration: underline;
    white-space: nowrap;
    cursor: pointer;
}

.help-link:hover {
    color: #777777;
}

/* A help row in a dialog: the symbol and the question on one line above the buttons. */
.help-row {
    display: flex;
    align-items: center;
    margin: 12px 0 2px 0;
}

.help-row .help-link {
    margin-left: 6px;
    padding-bottom: 0;
}

/* #region Help page */
/* The Help page: white surfaces on the grey page, as the service portal's panels and cards,
   with the company's accent on the edges. Dark text, not the light grey the site's
   paragraphs default to, so the page reads. */
.help-page {
    font-size: 14px;
    line-height: 1.5;
    color: #2F2F33;
}

.help-page * {
    box-sizing: border-box;
}

.help-page p,
.help-page ul,
.help-page li,
.help-page td {
    color: #2F2F33;
}

.help-section {
    margin-bottom: 24px;
}

.help-lead {
    margin: 4px 0 12px 0;
    max-width: 900px;
}

.help-box {
    margin-top: 12px;
    padding: 16px 20px;
    border: 1px solid #E4E4E7;
    border-radius: 10px;
    background-color: #FFFFFF;
}

/* The guides: a grid of cards, each opening its article in the help panel. Every row gets
   the same number of columns and every card the height of the tallest, as in the portal. */
.help-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px 16px;
    border: 1px solid #E4E4E7;
    border-left: 4px solid var(--si-accent, #E4E4E7);
    border-radius: 10px;
    background-color: #FFFFFF;
    color: #2F2F33;
    text-decoration: none;
    transition: box-shadow 120ms ease, transform 120ms ease;
}

.help-card:hover,
.help-card:focus {
    color: #2F2F33;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    transform: translateY(-1px);
}

.help-card-title {
    font-size: 15px;
    font-weight: 600;
    padding-bottom: 4px;
}

.help-card-question {
    font-size: 13px;
    color: #55555C;
}

/* The frequently asked questions, written in language admin with each question as an h3 and
   the answer under it. The page's script folds each answer under its question; the h3 rules
   are for when it has not. */
.help-faq h3 {
    margin: 14px 0 4px 0;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
}

.help-faq p {
    margin: 0 0 8px 0;
}

.help-faq-item {
    border-bottom: 1px solid #E4E4E7;
}

.help-faq-item:last-child {
    border-bottom: none;
}

.help-faq-item summary {
    padding: 10px 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.help-faq-item summary:hover {
    color: #000000;
}

.help-faq-item[open] summary {
    padding-bottom: 4px;
}

.help-faq-item > :not(summary) {
    max-width: 900px;
    margin: 0 0 10px 0;
}

/* The help texts MCD writes in Info Text. Their editor centres and underlines the headings
   with inline styles and colours words by hand; in a card the headings sit at the left like
   the rest of the page, without the underline, and the text is dark. */
.help-text {
    overflow-x: auto;
}

.help-text h1,
.help-text h2,
.help-text h3,
.help-text h4 {
    margin: 0 0 8px 0;
    padding: 0;
    text-align: left !important;
    color: #2F2F33;
    font-weight: 500;
}

.help-text h1,
.help-text h2 {
    font-size: 20px;
}

.help-text h1,
.help-text h2,
.help-text h3,
.help-text h4,
.help-text h1 *,
.help-text h2 *,
.help-text h3 *,
.help-text h4 * {
    text-decoration: none !important;
}

.help-text p {
    max-width: 900px;
}

.help-text hr {
    display: none;
}
/* #endregion Help page */

/* A help row under a page heading. The markup centres it inside a 1200px band the way the
   stroke headings are centred, so the symbol lines up with the title; only the spacing is
   here. */
.help-row-page {
    margin: 4px 0 10px 0;
}

@media print {
    .help-panel {
        display: none !important;
    }
}
