/*
   WebConsole — in-product help (Components/Help).

   Help renders in its own browser tab under its own root layout, so .help-root owns the
   whole viewport: it is a direct flex child of the body (which is a full-height flex
   column) and lays out as header / nav + content, each scrolling independently.

   Everything is scoped under .help-root so the help pages cannot leak styling into the
   rest of the console. Colours are derived from the Kendo theme variables the app already
   uses, so help follows the console's light/dark theme rather than the operating system's.
*/

.help-root {
   --help-bg: var(--kendo-color-app-surface, #ffffff);
   --help-surface: var(--kendo-color-surface, #f6f8fa);
   --help-surface-alt: var(--kendo-color-surface-alt, #eef2f6);
   --help-border: var(--kendo-color-border, #d7dee6);
   --help-text: var(--kendo-color-on-app-surface, #1f2933);
   --help-text-muted: var(--kendo-color-subtle, #5b6b7c);
   --help-accent: var(--company-light-blue, #0d75a3);
   --help-accent-strong: var(--kendo-color-primary-hover, #095b80);
   --help-code-bg: var(--kendo-color-surface-alt, #eef2f6);
   --help-note-bg: var(--kendo-color-info-subtle, #e8f4fa);
   --help-note-border: var(--kendo-color-info, #0d75a3);
   --help-warn-bg: var(--kendo-color-warning-subtle, #fdf3e2);
   --help-warn-border: var(--kendo-color-warning, #d38b08);
   --help-tip-bg: var(--kendo-color-success-subtle, #e6f4ea);
   --help-tip-border: var(--kendo-color-success, #2e8b57);
   --help-max-width: 62rem;

   color: var(--help-text);
   background: var(--help-bg);
   font-size: 0.95rem;
   line-height: 1.6;

   /* fill the body's flex column; min-height:0 lets the inner panes own the scrolling
      instead of the whole page growing past the viewport. */
   flex: 1 1 auto;
   min-height: 0;
   display: flex;
   flex-direction: column;
}

.help-root * {
   box-sizing: border-box;
}

/* ---------- Layout ---------- */

.help-root .help-header {
   flex: 0 0 auto;
   border-bottom: 1px solid var(--help-border);
   background: var(--help-surface);
   padding: 0.75rem 1.25rem;
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 0.75rem;
}

.help-root .help-header .help-brand {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   color: var(--help-text);
   text-decoration: none;
}

.help-root .help-header .help-brand img {
   height: 1.8rem;
}

.help-root .help-header .product {
   font-size: 1.05rem;
   font-weight: 600;
   letter-spacing: 0.01em;
}

.help-root .help-header .company,
.help-root .help-header .version {
   color: var(--help-text-muted);
   font-size: 0.85rem;
}

.help-root .help-header .console-link {
   margin-left: auto;
   font-size: 0.85rem;
   color: var(--help-accent);
   text-decoration: none;
}

.help-root .help-header .console-link:hover {
   text-decoration: underline;
}

.help-root .help-header .section {
   color: var(--help-text-muted);
   font-size: 0.85rem;
   text-transform: uppercase;
   letter-spacing: 0.06em;
}

.help-root .help-layout {
   flex: 1 1 auto;
   min-height: 0;
   display: flex;
   align-items: stretch;
   gap: 0;
}

.help-root .help-nav {
   flex: 0 0 18rem;
   border-right: 1px solid var(--help-border);
   background: var(--help-surface);
   padding: 1rem 0.9rem 3rem 1rem;
   overflow-y: auto;
}

.help-root .help-filter input {
   width: 100%;
   padding: 0.4rem 0.6rem;
   border: 1px solid var(--help-border);
   border-radius: 4px;
   background: var(--help-bg);
   color: var(--help-text);
   font: inherit;
   font-size: 0.88rem;
}

.help-root .help-filter input:focus {
   outline: 2px solid var(--help-accent);
   outline-offset: 1px;
}

.help-root .help-filter-empty {
   margin: 1rem 0.5rem;
   color: var(--help-text-muted);
   font-size: 0.88rem;
}

.help-root .help-nav h2 {
   font-size: 0.72rem;
   text-transform: uppercase;
   letter-spacing: 0.09em;
   color: var(--help-text-muted);
   margin: 1.25rem 0 0.4rem 0;
   font-weight: 700;
   border: none;
   padding: 0;
}

.help-root .help-nav ul {
   list-style: none;
   margin: 0 0 0.5rem 0;
   padding: 0;
}

.help-root .help-nav li {
   margin: 0;
}

.help-root .help-nav a {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   padding: 0.3rem 0.5rem;
   border-radius: 4px;
   color: var(--help-text);
   text-decoration: none;
   font-size: 0.9rem;
   line-height: 1.3;
}

.help-root .help-nav a:hover {
   background: var(--help-surface-alt);
   color: var(--help-accent-strong);
}

/* NavLink stamps "active" on the matching route. */
.help-root .help-nav a.active {
   background: var(--help-accent);
   color: #ffffff;
   font-weight: 600;
}

/* The highlighted entry sits on the accent colour, so its gradient icon goes solid white. */
.help-root .help-nav a.active .help-icon {
   filter: brightness(0) invert(1);
}

/* Child entries, mirroring the console's own nested navigation. */
.help-root .help-nav a.sub {
   padding-left: 1.6rem;
   font-size: 0.86rem;
}

/* ---------- Console icons ---------- */

/* The console's own navigation artwork (images/navitems), sized like the nav pane's. */
.help-root .help-icon {
   width: 1.25rem;
   height: 1.25rem;
   flex: 0 0 auto;
}

.help-root .help-icon.spacer {
   display: inline-block;
}

.help-root .help-icon.lg {
   width: 2.2rem;
   height: 2.2rem;
}

.help-root .help-icon.inline {
   width: 1.1rem;
   height: 1.1rem;
   vertical-align: -0.2em;
   margin-right: 0.2rem;
}

/* The scroll lives on .help-content so it spans the full pane width, while .help-article
   keeps the prose itself to a readable measure. */
.help-root .help-content {
   flex: 1 1 auto;
   min-width: 0;
   overflow-y: auto;
   padding: 1.25rem 2rem 4rem 2rem;
}

.help-root .help-article {
   max-width: var(--help-max-width);
}

/* ---------- Typography ---------- */

.help-root h1 {
   font-size: 1.6rem;
   margin: 0 0 0.35rem 0;
   font-weight: 650;
}

.help-root h1.topic {
   display: flex;
   align-items: center;
   gap: 0.7rem;
}

.help-root .subtitle {
   color: var(--help-text-muted);
   margin: 0 0 1.2rem 0;
   font-size: 1rem;
}

.help-root h2 {
   font-size: 1.2rem;
   margin: 2rem 0 0.5rem 0;
   padding-bottom: 0.25rem;
   border-bottom: 1px solid var(--help-border);
   font-weight: 620;
}

.help-root h3 {
   font-size: 1.02rem;
   margin: 1.4rem 0 0.4rem 0;
   font-weight: 620;
}

.help-root h4 {
   font-size: 0.95rem;
   margin: 1.1rem 0 0.3rem 0;
   font-weight: 620;
}

.help-root p {
   margin: 0.5rem 0;
}

.help-root ul,
.help-root ol {
   margin: 0.5rem 0;
   padding-left: 1.4rem;
}

.help-root li {
   margin: 0.25rem 0;
}

.help-root a {
   color: var(--help-accent);
}

.help-root code,
.help-root .path {
   font-family: Consolas, "Cascadia Mono", Menlo, monospace;
   font-size: 0.87em;
   background: var(--help-code-bg);
   border-radius: 3px;
   padding: 0.1em 0.35em;
}

.help-root pre {
   font-family: Consolas, "Cascadia Mono", Menlo, monospace;
   font-size: 0.85em;
   background: var(--help-code-bg);
   border-radius: 4px;
   padding: 0.6rem 0.8rem;
   overflow-x: auto;
}

.help-root pre code {
   background: none;
   padding: 0;
}

/* A control of the console: a button, a field label, a menu entry. */
.help-root .ui {
   font-weight: 600;
}

.help-root kbd {
   font-family: inherit;
   font-size: 0.82em;
   border: 1px solid var(--help-border);
   border-bottom-width: 2px;
   border-radius: 3px;
   padding: 0 0.35em;
   background: var(--help-surface);
}

.help-root blockquote {
   margin: 0.75rem 0 0.75rem 1rem;
   padding-left: 0.9rem;
   border-left: 3px solid var(--help-border);
   color: var(--help-text-muted);
}

/* ---------- "Where to find it" ---------- */

.help-root .location {
   display: flex;
   flex-wrap: wrap;
   align-items: baseline;
   gap: 0.4rem;
   margin: 0 0 1.4rem 0;
   padding: 0.5rem 0.8rem;
   background: var(--help-surface);
   border: 1px solid var(--help-border);
   border-radius: 4px;
   font-size: 0.88rem;
}

.help-root .location .label {
   text-transform: uppercase;
   letter-spacing: 0.06em;
   font-size: 0.7rem;
   font-weight: 700;
   color: var(--help-text-muted);
   margin-right: 0.3rem;
}

.help-root .location .sep {
   color: var(--help-text-muted);
}

/* ---------- "What you can do here" ---------- */

.help-root ul.tasks {
   list-style: none;
   padding-left: 0;
   margin: 0.6rem 0 0 0;
}

.help-root ul.tasks > li {
   position: relative;
   padding-left: 1.4rem;
   margin: 0.35rem 0;
}

.help-root ul.tasks > li::before {
   content: "\2192";
   position: absolute;
   left: 0;
   color: var(--help-accent);
   font-weight: 700;
}

/* ---------- Glossary ---------- */

.help-root dl.glossary {
   margin: 1rem 0;
}

.help-root dl.glossary dt {
   font-weight: 650;
   margin-top: 1.1rem;
}

.help-root dl.glossary dd {
   margin: 0.15rem 0 0 0;
   color: var(--help-text-muted);
}

/* ---------- Tables ---------- */

.help-root .table-wrap {
   overflow-x: auto;
   margin: 0.75rem 0;
}

.help-root table {
   border-collapse: collapse;
   width: 100%;
   font-size: 0.9rem;
}

.help-root th,
.help-root td {
   border: 1px solid var(--help-border);
   padding: 0.45rem 0.6rem;
   text-align: left;
   vertical-align: top;
}

.help-root th {
   background: var(--help-surface-alt);
   font-weight: 620;
}

.help-root tbody tr:nth-child(even) td {
   background: var(--help-surface);
}

.help-root td.nowrap,
.help-root th.nowrap {
   white-space: nowrap;
}

/* ---------- Callouts ---------- */

.help-root .note,
.help-root .warning,
.help-root .tip {
   border-left: 4px solid var(--help-note-border);
   background: var(--help-note-bg);
   padding: 0.6rem 0.9rem;
   margin: 1rem 0;
   border-radius: 0 4px 4px 0;
}

.help-root .warning {
   border-left-color: var(--help-warn-border);
   background: var(--help-warn-bg);
}

.help-root .tip {
   border-left-color: var(--help-tip-border);
   background: var(--help-tip-bg);
}

.help-root .note p:first-child,
.help-root .warning p:first-child,
.help-root .tip p:first-child {
   margin-top: 0;
}

.help-root .note p:last-child,
.help-root .warning p:last-child,
.help-root .tip p:last-child {
   margin-bottom: 0;
}

.help-root .note .label,
.help-root .warning .label,
.help-root .tip .label {
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.06em;
   font-size: 0.72rem;
   display: block;
   margin-bottom: 0.2rem;
}

/* ---------- Card grid (help home and overview pages) ---------- */

.help-root .card-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
   gap: 0.9rem;
   margin: 1rem 0;
}

.help-root .card {
   border: 1px solid var(--help-border);
   border-radius: 6px;
   background: var(--help-surface);
   padding: 0.85rem 1rem;
   display: flex;
   gap: 0.7rem;
   align-items: flex-start;
}

.help-root .card .help-icon {
   width: 1.8rem;
   height: 1.8rem;
   margin-top: 0.1rem;
}

.help-root .card .card-body {
   min-width: 0;
}

.help-root .card h3 {
   margin: 0 0 0.3rem 0;
   font-size: 0.98rem;
}

.help-root .card h3 a {
   text-decoration: none;
}

.help-root .card p {
   margin: 0;
   font-size: 0.87rem;
   color: var(--help-text-muted);
}

/* ---------- Step list ---------- */

.help-root ol.steps {
   counter-reset: step;
   list-style: none;
   padding-left: 0;
}

.help-root ol.steps > li {
   counter-increment: step;
   position: relative;
   padding-left: 2.1rem;
   margin: 0.55rem 0;
}

.help-root ol.steps > li::before {
   content: counter(step);
   position: absolute;
   left: 0;
   top: 0.15rem;
   width: 1.5rem;
   height: 1.5rem;
   border-radius: 50%;
   background: var(--help-accent);
   color: #ffffff;
   font-size: 0.78rem;
   font-weight: 700;
   display: flex;
   align-items: center;
   justify-content: center;
}

/* ---------- Status samples ---------- */

/* A status word as the console shows it in a pill. */
.help-root .pill {
   display: inline-block;
   padding: 0 0.55em;
   border-radius: 1em;
   font-size: 0.8em;
   font-weight: 600;
   line-height: 1.6;
   border: 1px solid var(--help-border);
   background: var(--help-surface-alt);
   white-space: nowrap;
}

.help-root .pill.ok {
   border-color: var(--help-tip-border);
   color: var(--help-tip-border);
}

.help-root .pill.warn {
   border-color: var(--help-warn-border);
   color: var(--help-warn-border);
}

.help-root .pill.bad {
   border-color: var(--kendo-color-error, #c0392b);
   color: var(--kendo-color-error, #c0392b);
}

/* ---------- Footer ---------- */

.help-root .help-footer {
   margin-top: 3rem;
   padding-top: 1rem;
   border-top: 1px solid var(--help-border);
   color: var(--help-text-muted);
   font-size: 0.8rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 55rem) {
   /* Stacked: the table of contents sits above the topic and the whole column scrolls
      as one, rather than each pane scrolling on its own. */
   .help-root .help-layout {
      flex-direction: column;
      overflow-y: auto;
   }

   .help-root .help-nav {
      flex: 0 0 auto;
      width: 100%;
      overflow-y: visible;
      border-right: none;
      border-bottom: 1px solid var(--help-border);
   }

   .help-root .help-content {
      overflow-y: visible;
      padding: 1.25rem 1.1rem 3rem 1.1rem;
   }

   .help-root .help-article {
      max-width: none;
   }
}
