/* Keep this file small: global layout and utilities only */

:root,
:host {
    /* Minimal theming hooks mapped to Pico so dark/light toggles work */
    --brand-color: var(--pico-primary);
    --text-default: var(--pico-color, #1f2937);
    --bg-header: var(--pico-background-color, #ffffff);
    --bg-panel: var(--pico-background-color, #ffffff);
    --border-soft: var(--pico-muted-border-color, #e5e7eb);
    --list-style: disc;

    --pico-color: #1f2937;
    --pico-primary: var(--pico-color);
    --pico-font-size: 16px;
    --pico-typography-spacing-vertical: 1.5rem;
    --pico-border-radius: 0;
    --pico-box-shadow: rgba(0, 65, 117, 0.12) 0px 32px 64px -24px;
    --pico-warning-color: coral;
    --pico-error-color: #f44336;
}

:host(:not([data-theme=dark])),
:root:not([data-theme=dark]),
[data-theme=light] {
    --pico-box-shadow: rgba(89, 89, 89, 0.12) 0px 32px 64px -24px;
    --box-shadow-hover: rgba(7, 7, 7, 0.12) 0.0140368px 31.9691px 63.9312px -23.9663px;
    --pico-primary: var(--pico-color);
}

@media (prefers-color-scheme: dark) {

    :host(:not([data-theme=dark])),
    :root:not([data-theme=dark]),
    [data-theme=light] {
        --pico-primary: #c2c7d0;
        --pico-box-shadow: rgba(252, 252, 252, 0.12) 0px 32px 64px -24px;
        --box-shadow-hover: rgba(255, 255, 255, 0.12) 0.0140368px 31.9691px 63.9312px -23.9663px;
    }
}



/* App frame */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

abbr[title] {
    border: none;
    cursor: initial;
}

dl dt {
    border-left: 3px solid var(--pico-muted-border-color);
    padding-left: 17px;
    margin-left: 0;
    font-weight: 600;
    margin-top: 1rem;
}

dl dd {
    margin: 0 0 1rem 0;
    border-left: 3px solid var(--pico-muted-border-color);
    padding-left: 1rem;
}

.hidden {
    display: none !important;
}

/* Containers (Pico already provides .container) */
.container {
    max-width: 1200px;
}

/* Main layout: left nav + content */
.main-container {
    display: grid;
    /* default: left nav + content */
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
}


/* Content body */
.content-body {
    background: transparent;
}

.content-body .container {
    max-width: 100%;
}

.content-body article article {
    padding-left: 0;
    padding-right: 0;
}

.content-body article li {
    list-style-type: disc;
}

/* Content area */
.content-area {
    padding: 1rem 1rem 1rem 0;
}

.content-area .sectiontitle {
    margin-top: 3rem;
}

.content-area p {
    margin-top: 1rem;
}

article {
    background: var(--bg-panel);
    transition: box-shadow 0.5s ease;
    box-shadow: none;
}

.content-area article {
    --pico-card-box-shadow: none;
}

section {
    margin-bottom: 4rem;
}

.homepage-content nav {
    margin-left: 1rem;
}

.section-header {
    margin: 0 1rem 3rem 1rem;
}

.section-card {
    text-decoration: none;
    color: #1f2937;
    transition: color 0.5s ease;
}

.section-card h3 {
    color: var(--pico-h1-color);
}

.section-card p,
.section-card h3 {
    transition: color 0.5s ease;
}

.section-card:hover p,
.section-card:hover h3 {
    color: initial;
}

.section-header-special {
    margin-top: 3rem;
    margin-left: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 260px 1fr;
    }
}

@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
    }
}


/* Breadcrumbs */
.breadcrumbs,
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .5rem;
    align-items: center;
    list-style: none;
    padding: 0 var(--pico-spacing-horizontal, 1rem);
    margin: 0 0 1rem 0;
}

.breadcrumbs a {
    text-decoration: none;
    color: #777;
}

@media (prefers-color-scheme: dark) {
    .breadcrumbs a {
        color: #ccc;
    }
}

.breadcrumbs a:hover {
    color: var(--brand-color);
}

.breadcrumbs .arrow {
    opacity: .6;
}

/* Footer */

.footer-container {
    /* Sticky footer: push footer to bottom when content is short */
    margin-top: auto;
    display: flex;
    justify-content: center;
}


.footer {
    margin-top: 3rem;
    padding: 2rem;
    border-top: 1px solid var(--border-soft);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .footer {
        flex-direction: column-reverse;
        gap: 1.5rem;
    }
}

.footer p {
    margin: 0;
}

.footer .footer-lang-select {
    min-width: 160px;
    max-width: 280px;

}

ul li,
ol li {
    list-style: var(--list-style);
    margin-top: 0.5rem;
}

/* Inline notes */
.note {
    position: relative;
    padding: 1.4rem 1rem 1.4rem 5rem;
    border: 1px solid var(--border-soft);
    margin: 1rem 0;
}

.note p {
    margin-top: 0;
}

/* Left accent rendered with ::after */
.note::after {
    content: "";
    position: absolute;
    left: -1px;
    /* extend over the left border */
    top: -1px;
    /* extend over the top border */
    bottom: -1px;
    /* extend over the bottom border */
    width: 4px;
    background: var(--brand-color);
    pointer-events: none;
}

/* Icon */
.note::before {
    content: "";
    position: absolute;
    left: 2rem;
    top: 1.3rem;
    width: 26px;
    height: 26px;
    background-color: var(--pico-color);
    -webkit-mask: url("../images/note-icon.svg") no-repeat center / contain;
    mask: url("../images/note-icon.svg") no-repeat center / contain;
}

.note .note__title {
    font-weight: 600;
    color: var(--pico-color);
    display: inline;
}

.note .note__title+p {
    display: inline-block;
    margin-left: 0.1rem;
    vertical-align: baseline;
}

.note p:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
}


.note.important::before {
    -webkit-mask: url("../images/important-icon.svg") no-repeat center / contain;
    mask: url("../images/important-icon.svg") no-repeat center / contain;
}

.note.important::after {
    background: var(--pico-warning-color);
}


@media (prefers-color-scheme: dark) {
    .note {
        border-color: var(--border-soft);
        background: var(--pico-background-color);
    }

    .note::before {
        background-color: var(--pico-primary);
        -webkit-mask: url("../images/note-icon-light.svg") no-repeat center / contain;
        mask: url("../images/note-icon-light.svg") no-repeat center / contain;
    }
}

/* Styled ordered lists with round numbers and connecting dots */
.content-area .steps {
    counter-reset: item;
    list-style-type: none;
    padding-left: 0;
    margin-top: 1rem;
    position: relative;
}

.content-area .steps::before {
    content: "Procedure";
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--pico-color);
    margin-left: 1rem;
}

.content-area .steps>li {
    position: relative;
    padding: 0.5rem 0 1rem 2.8rem;
    margin-bottom: 0.5rem;
    list-style-type: none;
}

.content-area .steps>li .stepresult::before {
    content: "Step result: ";
    font-weight: 600;
    color: var(--pico-color);
}

.content-area .steps>li::before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 0.25rem;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: 2px solid var(--pico-muted-border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--pico-color);
    z-index: 2;
}

.content-area .steps>li::after {
    content: "";
    position: absolute;
    left: 0.95rem;
    top: 2.9rem;
    width: 2px;
    height: calc(100% - 2.5rem);
    background: repeating-linear-gradient(to bottom,
            var(--pico-muted-border-color) 0,
            var(--pico-muted-border-color) 4px,
            transparent 4px,
            transparent 8px);
    z-index: 1;
}

.content-area .steps>li:last-child::after {
    display: none;
}

/* Code blocks */
.content-area .code-block-wrapper {
    margin-bottom: 1rem;
    border: 1px solid var(--pico-muted-border-color);
    position: relative;
}

.content-area .code-block-header .code-language-label {
    display: none;
}

.content-area .code-copy-btn {
    position: absolute;
    top: .5rem;
    right: .5rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    width: 28px;
    height: 28px;
    line-height: 0;
    cursor: pointer;
    color: transparent;
    /* hide text; icon shown via ::before */
    overflow: hidden;
}

.content-area .code-copy-btn::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: var(--pico-code-color);
    /* icon color follows text color */
    -webkit-mask: url("../images/copy.svg") no-repeat center / contain;
    mask: url("../images/copy.svg") no-repeat center / contain;
}

.content-area .code-copy-btn:hover {
    opacity: .8;
}

.content-area figure {
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.content-area .ph img {
    margin-bottom: 0.3rem;
}

.ph.uicontrol {
    background: var(--pico-muted-border-color);
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
    color: var(--pico-code-color);
}

code {
    background: var(--pico-muted-border-color);
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
    .content-area .steps::before {
        color: var(--pico-color);
    }

    .content-area .steps>li::before {
        border-color: var(--pico-muted-color);
        color: var(--pico-color);
    }

    .content-area .steps>li::after {
        background: repeating-linear-gradient(to bottom,
                var(--pico-muted-color) 0,
                var(--pico-muted-color) 3px,
                transparent 4px,
                transparent 8px);
    }
}

[data-theme=dark] ol::before,
[data-theme=dark] ol>li::before {
    color: var(--pico-color);
    border-color: var(--pico-color);
}

[data-theme=dark] ol>li::after {
    background: repeating-linear-gradient(to bottom,
            var(--pico-color) 0,
            var(--pico-color) 4px,
            transparent 4px,
            transparent 4px);
}

button[type="submit"] {
    width: auto;
}

/* Mobile table styling - Automatic responsive tables */
@media (max-width: 768px) {

    /* Make all tables horizontally scrollable on mobile */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        border-collapse: separate;
        border-spacing: 0;
    }

    /* Ensure table cells don't break and maintain proper spacing */
    table td,
    table th {
        white-space: nowrap;
        padding: 0.5rem;
        border-right: 1px solid var(--border-soft);
    }

    /* Remove right border from last cell in each row */
    table td:last-child,
    table th:last-child {
        border-right: none;
    }

    /* Ensure table maintains minimum width for content */
    table tbody,
    table thead {
        display: table;
        width: 100%;
        table-layout: auto;
    }

    /* Optional: Add subtle shadow to indicate scrollability */
    table {
        box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.1);
    }
}

/* Utility classes and helpers */
.navigation-update {
    display: none;
}

.no-bottom-margin {
    margin-bottom: 0;
}

/* Related links block (DITA reltable) */
.related-links {
    margin-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

.related-links br {
    display: none;
}

.related-links .hd-label {
    display: block;
}

.related-links ul.linklist {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.related-links li.linklist {
    list-style: disc;
    margin-bottom: 0.75rem;
}

.related-links a.link {
    color: var(--pico-primary);
    text-decoration: underline;
}

.related-links a.link:hover,
.related-links a.link:focus {
    color: var(--pico-primary-hover);
}

/* External link indicator */
.j-external-link {
    position: relative;
    padding-right: 1.5rem;
}

.j-external-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0rem;
    width: 1.3rem;
    height: 1.3rem;
    background-color: currentColor;
    -webkit-mask: url("../images/external-link.svg") no-repeat center / contain;
    mask: url("../images/external-link.svg") no-repeat center / contain;
}

.related-links .j-external-link::after {
    top: 0.55rem;
}