/* The help center (Figma 13519-2): the topics beside, the search over the questions, every topic's
   questions as an accordion, and the way to the team. The page's header is the catalogue's
   (catalogue-pages/assets/page.css). Brand tokens only. */

.cil-help *, .cil-help *::before, .cil-help *::after { box-sizing: border-box; }
.cil-help__body {
    display: grid; grid-template-columns: 340px minmax(0, 1fr); grid-template-areas: "nav find" "nav main";
    column-gap: 64px; row-gap: 56px; align-items: start; padding-block: 16px 96px;
}
.cil-help__nav { grid-area: nav; position: sticky; top: 100px; }
.cil-help__find { grid-area: find; }
.cil-help__main { grid-area: main; display: flex; flex-direction: column; gap: 56px; min-width: 0; }

/* ---- The topics ---- */
.cil-help__navTitle { margin: 0 0 12px; color: var(--cil-black-regular-7); font-size: 14px; font-weight: 600; }
.cil-help__topics { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.cil-help .cil-help__topic {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px;
    color: var(--cil-black); text-decoration: none; transition: background-color .25s ease, opacity .25s ease;
}
.cil-help .cil-help__topic:is(:hover, :focus-visible) { color: var(--cil-black); text-decoration: none; }
.cil-help .cil-help__topic:focus-visible { outline: 2px solid var(--cil-blue-dark-1); outline-offset: 2px; }
.cil-help__topicIcon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--cil-blue-light-1); transition: background-color .25s ease; }
/* A mark from the whole library (contact-page/topics.php cil_contact_topic_mark) is inline, in the files' ink. */
.cil-help__topicIcon, .cil-help__sectionIcon { color: var(--cil-blue-dark-1); }
.cil-help__topicName { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.2; transition: transform .25s cubic-bezier(.4, 0, .2, 1); }
.cil-help__topicCount { flex: none; color: var(--cil-black-regular-7); font-size: 14px; font-variant-numeric: tabular-nums; direction: ltr; }
/* Pointed at, the name steps toward its section; the one in view is the brand's teal on its tint. */
.cil-help .cil-help__topic:hover .cil-help__topicName { transform: translateX(-3px); }
.lang-to-css-ltr .cil-help .cil-help__topic:hover .cil-help__topicName { transform: translateX(3px); }
.cil-help .cil-help__topic.is-current { background: var(--cil-blue-light-1); }
.cil-help .cil-help__topic.is-current .cil-help__topicName { color: var(--cil-blue-dark-1); font-weight: 700; }
.cil-help .cil-help__topic.is-current .cil-help__topicIcon { background: var(--cil-white); }
/* While a search leaves a topic with nothing, it fades. */
.cil-help .cil-help__topic.is-empty { opacity: .45; }

/* ---- The search ---- */
.cil-help__search {
    position: relative; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px;
    border: 1px solid var(--cil-black-light-6); border-radius: 10px; background: var(--cil-white);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.cil-help__search:focus-within { border-color: var(--cil-blue-dark-1); box-shadow: inset 0 0 0 1px var(--cil-blue-dark-1); }
.cil-help__searchIcon { flex: none; display: grid; color: var(--cil-black); }
.cil-help .cil-help__search input {
    flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; background: none; box-shadow: none;
    color: var(--cil-black); font: inherit; font-size: 16px; outline: none;
}
.cil-help .cil-help__search input::placeholder { color: var(--cil-black-regular-3); opacity: 1; }
.cil-help .cil-help__search input::-webkit-search-cancel-button { display: none; }
.cil-help .cil-help__clear {
    flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
    background: var(--cil-black-light-3); color: var(--cil-black); cursor: pointer; transition: background-color .2s ease, color .2s ease;
}
.cil-help .cil-help__clear:is(:hover, :focus-visible) { background: var(--cil-red-light-1); color: var(--cil-red-regular-5); }
.cil-help .cil-help__clear[hidden] { display: none; }
.cil-help__found { margin: 8px 0 0; color: var(--cil-black-regular-7); font-size: 14px; }
.cil-help__found:empty { display: none; }

/* ---- A topic's questions ---- */
.cil-help__section { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 100px; }
.cil-help__section[hidden] { display: none; }
.cil-help__sectionTitle { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--cil-black); font-size: 24px; font-weight: 700; line-height: 1.2; }
.cil-help__sectionIcon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--cil-blue-light-1); }
/* The questions: the site's FAQ in its teal look (cilFaq--teal, css/faq-accordion.css), as on the
   course and contact pages; here it sits right under its title, the section's gap apart. */
.cil-help .cilFaq { --faq-offset: 0px; }
.cil-help .cilFaq__item[hidden] { display: none; }
/* A search's words in a question: the brand's teal, underlined. */
.cil-help mark.cil-help__hit { background: none; color: var(--cil-blue-dark-1); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Nothing found ---- */
.cil-help__none { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-block: 24px; text-align: center; }
.cil-help__none[hidden] { display: none; }
/* Where a contact page link to a topic not shown here lands (help-center.js): clear of the sticky header,
   and without a ring -- it is a place the keyboard starts from, not a control. */
.cil-help__none, .cil-help .cil-guides-found { scroll-margin-top: 100px; }
.cil-help :is(.cil-help__none, .cil-help__section, .cil-guides-found)[tabindex="-1"]:focus { outline: none; }
.cil-help__noneArt { width: 160px; height: auto; margin-bottom: 8px; }
.cil-help__noneTitle { margin: 0; color: var(--cil-black); font-size: 22px; font-weight: 700; }
.cil-help__noneText { margin: 0; color: var(--cil-black-regular-7); font-size: 16px; }
.cil-help__empty { margin: 0; padding: 18px 24px; border: 1px dashed var(--cil-black-light-6); border-radius: 16px; color: var(--cil-black-regular-7); }

/* ---- Still need help ---- */
.cil-help__still {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px; border-radius: 16px;
    /* Figma's #F6F6F6, which the palette has no token for: half light-2, half white. */
    background: color-mix(in srgb, var(--cil-black-light-2) 50%, var(--cil-white));
}
.cil-help__stillWords { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cil-help__stillTitle { margin: 0; color: var(--cil-black); font-size: 24px; font-weight: 700; line-height: 1.2; }
.cil-help__stillText { margin: 0; color: var(--cil-black-regular-7); font-size: 16px; }
.cil-help .cil-help__stillText a { color: var(--cil-black-regular-7); text-decoration: none; }
.cil-help .cil-help__stillButton {
    flex: none; display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 32px;
    border: 1px solid var(--cil-blue-dark-1); border-radius: 24px; background: var(--cil-blue);
    color: var(--cil-black); font-size: 16px; font-weight: 700; text-decoration: none; transition: box-shadow .2s ease;
}
.cil-help .cil-help__stillButton:is(:hover, :focus-visible) { color: var(--cil-black); text-decoration: none; box-shadow: 0 0 0 3px var(--cil-blue-light-5); outline: none; }

/* ---- Narrower: the search first, the topics a row of chips, the questions under them ---- */
@media (max-width: 1079px) {
    .cil-help__body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "find" "nav" "main"; row-gap: 24px; padding-bottom: 48px; }
    .cil-help__nav { position: static; margin-inline: -16px; }
    .cil-help__navTitle, .cil-help__topicIcon, .cil-help__topicCount { display: none; }
    .cil-help__topics { flex-direction: row; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; scrollbar-width: none; }
    .cil-help__topics::-webkit-scrollbar { display: none; }
    .cil-help__topics li { flex: none; }
    .cil-help .cil-help__topic { padding: 8px 16px; border: 1px solid var(--cil-black-light-6); border-radius: 999px; }
    .cil-help .cil-help__topic.is-current { border-color: var(--cil-blue-dark-1); }
    .cil-help__topicName { font-size: 14px; white-space: nowrap; }
    .cil-help .cil-help__topic:hover .cil-help__topicName { transform: none; }
    .cil-help__main { gap: 40px; }
    .cil-help__sectionTitle { font-size: 20px; }
    .cil-help__still { flex-direction: column; align-items: stretch; padding: 24px 20px; }
    .cil-help__stillTitle { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .cil-help .cil-help__topic, .cil-help__topicIcon, .cil-help__topicName, .cil-help__search, .cil-help .cil-help__stillButton { transition: none; }
}
