/* The platform's own rules over the idp-theme webjar (Bootstrap's classes in the Sovrain style), kept to
   what only these pages need. */

/* An audit entry's details sit on their own row beneath it, read as one entry: no rule between them,
   and the details row tucked up under the cells above. */
.table tr.has-details > td {
    border-bottom: 0;
}
.table tr.audit-details > td {
    height: auto;
    padding-top: 0;
}

/* Every page is as wide as Wikipedia's: the page grows with the window up to 100rem (1600px), so long
   tables get room, with Bootstrap's own gutters on small screens. */
.keel-page { max-width: 100rem; }

/* The manual (/help): the contents as cards of clickable rows; a page as a readable column between the
   manual's contents and the page's own sections, its notes as the theme's alerts, its screenshots framed, its
   tables like the app's, the names of on-screen controls as small chips, and the part's neighbours under it. */
.manual-entries { list-style: none; margin: 0; padding: 0; }
.manual-entries > li + li { border-top: 1px solid var(--color-divider); }
.manual-entries a {
    display: block;
    position: relative;
    padding: .75rem 2.5rem .75rem 1.25rem;
    color: inherit;
    text-decoration: none;
}
.manual-entries a::after {
    content: "\203A";
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-accent);
    font-size: 1.25rem;
    font-weight: 600;
}
.manual-entries a:hover { background: var(--bs-tertiary-bg); }
.manual-entries a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.manual-entries > li:last-child a { border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.manual-entries__title { display: block; font-weight: 600; }
.manual-entries__summary { display: block; margin-top: .125rem; font-size: .8125rem; color: var(--bs-secondary-color); }

/* A page: the manual's contents, the text and the page's sections side by side across the whole width, their
   tops on one line; both menus stay in view while the text scrolls. */
.manual-layout {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr) 15rem;
    gap: 3rem;
    align-items: start;
}
.manual-nav, .manual-sections {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    font-size: .875rem;
}
.manual-nav > :first-child, .manual-sections > div > :first-child { margin-top: 0; }
@media (max-width: 1399.98px) {
    .manual-layout { grid-template-columns: 15rem minmax(0, 1fr); }
    .manual-sections { display: none; }
}
@media (max-width: 991.98px) {
    .manual-layout { grid-template-columns: minmax(0, 1fr); }
    .manual-nav { position: static; max-height: none; }
}
.manual-nav__part {
    margin: 1.25rem 0 .375rem;
    padding: 0 .625rem;
    font-family: var(--font-mono, var(--bs-font-monospace));
    font-size: .6875rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}
.manual-nav__pages { list-style: none; margin: 0; padding: 0; }
.manual-nav__pages a {
    display: block;
    padding: .3125rem .625rem;
    border-radius: var(--radius-sm);
    color: var(--bs-body-color);
    text-decoration: none;
    line-height: 1.35;
}
.manual-nav__pages a:hover { background: var(--bs-tertiary-bg); }
.manual-nav__pages a[aria-current="page"],
.manual-nav__pages a.is-current {
    color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 12%, transparent);
    font-weight: 600;
}
.manual-sections .manual-nav__pages a { font-size: .8125rem; }

.manual-body { line-height: 1.65; }
.manual-body .manual-page > .summary { font-size: 1.125rem; line-height: 1.55; }
.manual-body .manual-page > .audience { color: var(--bs-secondary-color); font-size: .875rem; }
.manual-body h2 {
    font-size: 1.3rem;
    margin: 2.5rem 0 .75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-divider);
    scroll-margin-top: 1rem;
}
.manual-body h3 { font-size: 1.05rem; margin: 1.75rem 0 .5rem; scroll-margin-top: 1rem; }
.manual-body :is(ol, ul) { padding-left: 1.4rem; }
.manual-body li + li { margin-top: .375rem; }
.manual-body :is(p, li) > strong {
    padding: .05em .4em;
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-sm);
    background: var(--bs-tertiary-bg);
    font-weight: 600;
    font-size: .9em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.manual-body table {
    width: 100%;
    margin: 1rem 0 1.5rem;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-xl);
    overflow: hidden;
    font-size: .875rem;
    line-height: 1.5;
}
.manual-body :is(th, td) { padding: .625rem .875rem; vertical-align: top; text-align: left; }
.manual-body tr + tr > :is(th, td), .manual-body thead + tbody > tr > :is(th, td) { border-top: 1px solid var(--color-divider); }
.manual-body thead th {
    background: var(--bs-tertiary-bg);
    font-family: var(--font-mono, var(--bs-font-monospace));
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}
.manual-body tbody td:first-child { font-weight: 600; }
.manual-body aside {
    display: flex;
    gap: .75rem;
    margin: 1.25rem 0;
    padding: .875rem 1rem;
    border: 1px solid var(--bs-info-border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bs-info-bg-subtle);
    font-size: .9375rem;
    line-height: 1.55;
}
.manual-body aside::before {
    content: "i";
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: .1rem;
    border-radius: 50%;
    background: var(--bs-info-text-emphasis);
    color: var(--bs-body-bg);
    font-size: .75rem;
    font-weight: 700;
    font-style: normal;
}
.manual-body aside > :last-child { margin-bottom: 0; }
.manual-body aside.warning { border-color: var(--bs-warning-border-subtle); background: var(--bs-warning-bg-subtle); }
.manual-body aside.warning::before { content: "!"; background: var(--bs-warning-text-emphasis); }
.manual-body aside.tip { border-color: var(--bs-success-border-subtle); background: var(--bs-success-bg-subtle); }
.manual-body aside.tip::before { content: "\2713"; background: var(--bs-success-text-emphasis); }
.manual-body figure.screenshot { margin: 1.75rem 0; }
.manual-body figure.screenshot img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-lg);
    margin: 0 auto;
    box-shadow: 0 6px 24px rgb(0 0 0 / .18);
}
.manual-body figcaption { font-size: .8125rem; color: var(--bs-secondary-color); margin-top: .625rem; text-align: center; }
.manual-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-divider);
}
.manual-pager__link {
    color: var(--bs-body-color);
    font-weight: 600;
    text-decoration: none;
}
.manual-pager__link:hover { color: var(--color-accent); }
.manual-pager__link--next { grid-column: 2; justify-self: end; text-align: right; }
.manual-pager__label { font-weight: 500; color: var(--color-accent); }

/* The platform keeps Bootstrap's type where the theme follows the apps' older look: code a size smaller
   than the text around it, and the manual's bare headings on the theme's .h1-.h6 type scale. */
code, pre { font-size: 0.875em; }
code, kbd, pre, samp { font-family: var(--bs-font-monospace); }
.manual-body :is(h1, h2, h3, h4, h5, h6) { font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
/* Paragraphs as Bootstrap sets them: no top margin, 1rem below. */
p { margin-top: 0; margin-bottom: 1rem; }
/* Alerts and tables keep Bootstrap's 1rem below them... */
.alert { margin-bottom: 1rem; }
.table { margin-bottom: 1rem; }
/* ...except in a parent that spaces its children with a gap: there no child adds a bottom margin (the
   label margin below still applies). */
:is(.vstack, .hstack, .card-body, .form, .field, .cluster, .grid-2, .grid-3, .actions) > * { margin-bottom: 0; }
/* Labels, hints and errors spaced as Bootstrap spaces them around a control, except in a .field, which
   spaces them itself. */
.form-label, .col-form-label { margin-bottom: var(--space-2); }
.form-text, .invalid-feedback { margin-top: var(--space-1); }
.field > :is(.form-label, .form-text, .invalid-feedback) { margin: 0; }
/* Badges centred on the line, as Bootstrap's icons and buttons are. */
.badge { vertical-align: middle; }
/* Long words break anywhere inside cards and code, as Bootstrap sets it. */
.card, code { overflow-wrap: break-word; }
/* Table headings stay on one line. */
.table > thead > * > *, .table > * > * > th[scope="col"] { white-space: nowrap; }
/* A row's heading in a table body reads as a body cell. */
.table > tbody > * > th {
    height: 3.5rem;
    padding-block: var(--space-3);
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-transform: none;
    letter-spacing: normal;
    color: var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));
    border-top: 0;
    border-bottom-color: var(--bs-table-border-color);
}
.table-sm > tbody > * > th { height: 2.5rem; padding-block: var(--space-2); }
/* A lone button in a card body keeps its own width. */
.card-body > :is(.btn, a.btn) { align-self: flex-start; }
/* Dialog titles a little tighter than the text. */
.modal { --bs-modal-title-line-height: 1.4; }
/* Legends as Bootstrap sets them: full width, at heading size. */
legend { float: left; width: 100%; padding: 0; margin-bottom: 0.5rem; font-size: calc(1.275rem + 0.3vw); }
@media (min-width: 1200px) { legend { font-size: 1.5rem; } }
/* Code in Bootstrap's code colour. */
code { color: var(--bs-code-color); }
/* Buttons, images and icons centred on the line, as Bootstrap sets them. */
.btn, img, svg { vertical-align: middle; }
/* Labels as inline blocks, so a label's bottom margin spaces it from its control. */
label { display: inline-block; }
/* A file picker as tall as the other fields. */
.form-control[type="file"] { min-height: 2.75rem; }
