/*
 * KD Category Navigation
 * Version 0.1.0
 */

.kdcn-wrap {
    width: 100%;
}

.kdcn-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid #d9d9d9;
}

.kdcn-top-link {
    display: inline-block;
    padding: 0.7rem 1rem;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    line-height: 1.2;
}

.kdcn-top-link:hover,
.kdcn-top-link:focus,
.kdcn-top-link.is-active {
    border-color: currentColor;
}

.kdcn-top-link.is-active {
    font-weight: 700;
}

.kdcn-body {
    display: grid;
    grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.kdcn-sidebar {
    min-width: 0;
}

.kdcn-sidebar-title {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.kdcn-tree {
    margin: 0;
    padding: 0 0 0 1rem;
    list-style: none;
}

.kdcn-tree-root {
    padding-left: 0;
}

.kdcn-tree-item {
    margin: 0;
    padding: 0;
}

.kdcn-tree-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.42rem 0.5rem;
    border-radius: 3px;
    color: inherit;
    text-decoration: none;
}

.kdcn-tree-link:hover,
.kdcn-tree-link:focus {
    background: rgba(0, 0, 0, 0.05);
}

.kdcn-tree-item.is-active > .kdcn-tree-link {
    font-weight: 700;
    background: rgba(0, 0, 0, 0.07);
}

.kdcn-tree-item.is-root > .kdcn-tree-link {
    font-weight: 600;
}

.kdcn-chevron {
    flex: 0 0 auto;
    opacity: 0.65;
}

.kdcn-content {
    min-width: 0;
}

.kdcn-content-header {
    margin-bottom: 1rem;
}

.kdcn-title {
    margin-top: 0;
}

.kdcn-description > :last-child {
    margin-bottom: 0;
}

.kdcn-notice {
    padding: 1rem;
    border: 1px solid #d9d9d9;
}

@media (max-width: 768px) {
    .kdcn-body {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .kdcn-sidebar {
        border-bottom: 1px solid #d9d9d9;
        padding-bottom: 1rem;
    }

    .kdcn-top {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .kdcn-top-link {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}
