/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0
 */

:root {
    --color-background-nav: #232f3e;
    --dokka-logo-height: 60px;
    --dokka-logo-width: 90px;
}

.skip-to-content {
    position: absolute; /* Remove from normal flow */
    top: 0; /* Position off-screen */
    left: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    z-index: -1; /* Ensure it's not visible */
}

.skip-to-content:focus,
.skip-to-content:active {
    position: static; /* Restore to normal flow when focused */
    width: auto;
    height: auto;
    opacity: 1;
    z-index: 999; /* Ensure it's on top */
}

/*
    Dokka does not break links or code blocks properly by default. Add word-wrap to prevent left/right scrollbar from
    appearing on small screens.
*/
.main-content a:not([data-name]) {
    word-wrap: break-word;
}
.symbol {
    overflow-wrap: break-word;
}
.keyValue {
    display: block;
}

/* FIXME Taken from Dokka mainline. Remove these styles once Dokka 2.1.0 is released. */
.toc--skip-link {
    background-color: #458cff;
    color: #fff;
    font: 400 13px/24px Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, Oxygen, Droid Sans, Helvetica Neue, Arial;
    margin-top: 36px;
    padding: 1px;
    position: absolute;
    z-index: 100;
}

.toc--skip-link:not(:focus) {
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    border: 0 !important;
    height: 1px !important;
    padding: 0 !important;
    width: 1px !important;
}

.toc--skip-link:focus {
    outline: 4px solid rgb(48, 127, 255, 0.5);
    outline-offset: 0;
}

.sidebar > .toc--skip-link {
    margin-top: 0;
}

.toc--part_hidden > .toc--row > .toc--button ~ .toc--skip-link {
    display: none;
}

@media (max-width: 899px) {
    .toc--skip-link {
        display: none;
    }
}
