/* ==========================================================================
   DAK Package Download
   ========================================================================== */

.dak-package-download {
    --dak-pkg-accent: var(--primary-color, #087cff);
    --dak-pkg-text: #191919;
    --dak-pkg-muted: #747474;
    --dak-pkg-border: #e9e9e9;
    --dak-pkg-active: #efefef;

    width: 100%;
    color: var(--dak-pkg-text);
}

.dak-package-download,
.dak-package-download * {
    box-sizing: border-box;
}

.dak-package-download button {
    font: inherit;
}

.dak-package-download {
    transition: opacity .18s ease;
}

.dak-package-download.is-loading {
    opacity: .38;
    pointer-events: none;
}

.dak-pkg-mobile {
    display: none;
}

.dak-pkg-empty {
    padding: 18px;
    border: 1px dashed #ddd;
    color: #777;
}


/* ==========================================================================
   Archive
   ========================================================================== */

.dak-pkg-group + .dak-pkg-group {
    margin-top: 46px;
}

.dak-pkg-group__title {
    margin: 0 0 18px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
}

.dak-pkg-series-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dak-pkg-series-card {
    min-height: 112px;
    padding: 22px 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    align-items: center;
    border: 1px solid #ededed;
    background: #fff;
}

.dak-pkg-series-card__content {
    min-width: 0;
}

.dak-pkg-series-card__header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px 18px;
}

.dak-pkg-series-card__title {
    margin: 0;
    flex: 0 0 auto;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 700;
}

.dak-pkg-series-card__description {
    min-width: 0;
    color: var(--dak-pkg-muted);
    font-size: 14px;
    line-height: 1.5;
}

.dak-pkg-series-card__materials {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    color: #333;
    font-size: 14px;
    line-height: 1.45;
}

.dak-pkg-series-card__dot {
    color: #aaa;
}

.dak-pkg-series-card__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    color: var(--dak-pkg-accent);
    text-decoration: none !important;
    font-size: 15px;
}

.dak-pkg-series-card__link i {
    font-size: 20px;
}


/* ==========================================================================
   Single
   ========================================================================== */

.dak-pkg-detail__head {
    margin-bottom: 30px;
}

.dak-pkg-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    color: var(--dak-pkg-muted);
    text-decoration: none !important;
    font-size: 14px;
}

.dak-pkg-detail__back:hover {
    color: var(--dak-pkg-accent);
}

.dak-pkg-detail__title {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
}

.dak-pkg-detail__description {
    margin-top: 9px;
    max-width: 880px;
    color: var(--dak-pkg-muted);
    font-size: 14px;
    line-height: 1.6;
}

.dak-pkg-detail__description p {
    margin: 0;
}

.dak-pkg-detail__grid {
    display: grid;
    grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
    gap: 52px;
    align-items: start;
}

.dak-pkg-material-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dak-pkg-material-button {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 44px;
    padding: 0 14px 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--dak-pkg-text);
    text-align: left;
    cursor: pointer;
}

.dak-pkg-material-button:hover {
    background: #f6f6f6;
}

.dak-pkg-material-button.is-active {
    color: var(--dak-pkg-accent);
    background: var(--dak-pkg-active);
}

.dak-pkg-material-button i {
    flex: 0 0 auto;
    font-size: 18px;
}

.dak-pkg-file-panel[hidden] {
    display: none !important;
}

.dak-pkg-file-panel__title {
    margin-bottom: 10px;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
}

.dak-pkg-file-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border-bottom: 1px solid #ededed;
}

.dak-pkg-file-row:first-of-type {
    border-top: 1px solid #ededed;
}

.dak-pkg-file-row__name {
    min-width: 0;
    font-size: 15px;
    line-height: 1.42;
}

.dak-pkg-file-row__meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dak-pkg-file-row__size {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
}

.dak-pkg-file-row__download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--dak-pkg-text);
    text-decoration: none !important;
}

.dak-pkg-file-row__download:hover {
    color: var(--dak-pkg-accent);
}

.dak-pkg-file-row__download i:first-child {
    font-size: 21px;
}

.dak-pkg-file-row__download i:last-child {
    font-size: 18px;
}

.dak-pkg-subgroup-layout {
    display: grid;
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
    gap: 44px;
    align-items: start;
}

.dak-pkg-subgroup-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dak-pkg-subgroup-button {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 44px;
    padding: 0 14px 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--dak-pkg-text);
    text-align: left;
    cursor: pointer;
}

.dak-pkg-subgroup-button:hover {
    background: #f6f6f6;
}

.dak-pkg-subgroup-button.is-active {
    color: var(--dak-pkg-accent);
    background: var(--dak-pkg-active);
}

.dak-pkg-subgroup-button i {
    flex: 0 0 auto;
    font-size: 18px;
}

.dak-pkg-subgroup-file-panel[hidden] {
    display: none !important;
}

.dak-pkg-no-files {
    padding: 18px 0;
    color: #888;
    font-size: 14px;
}


/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 849px) and (min-width: 650px) {

    .dak-pkg-series-card {
        padding: 20px 22px;
    }

    .dak-pkg-detail__grid {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 28px;
    }

    .dak-pkg-subgroup-layout {
        grid-template-columns: 170px minmax(0, 1fr);
        gap: 24px;
    }
}


/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 649px) {

    .dak-pkg-desktop {
        display: none !important;
    }

    .dak-pkg-mobile {
        display: block;
        width: 100%;
        overflow: hidden;
    }

    .dak-pkg-mobile-nav {
        display: grid;
        grid-template-columns: 84px minmax(0, 1fr) 68px;
        align-items: center;
        min-height: 46px;
        margin-bottom: 12px;
        border-bottom: 1px solid #e9e9e9;
    }

    .dak-pkg-mobile-nav__side {
        display: block;
    }

    .dak-pkg-mobile-back,
    .dak-pkg-mobile-all {
        appearance: none;
        -webkit-appearance: none;
        min-height: 46px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: #191919;
        text-decoration: none !important;
        font-size: 13px;
        cursor: pointer;
    }

    .dak-pkg-mobile-back {
        justify-content: flex-start;
    }

    .dak-pkg-mobile-all {
        justify-content: flex-end;
        color: var(--dak-pkg-accent);
    }

    .dak-pkg-mobile-back i,
    .dak-pkg-mobile-all i {
        font-size: 18px;
    }

    .dak-pkg-mobile-title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
        font-size: 14px;
        font-weight: 600;
    }



    .dak-pkg-series-card__header {
        display: block;
    }

    .dak-pkg-series-card__description {
        margin-top: 4px;
    }

    /* Archive level */
    .dak-pkg-mobile-group-title {
        margin: 19px 0 8px;
        color: #777;
        font-size: 12px;
        line-height: 1.2;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .dak-pkg-mobile-group-title:first-child {
        margin-top: 0;
    }

    .dak-pkg-mobile-series-item {
        min-height: 60px;
        padding: 11px 2px;
        border-bottom: 1px solid #ededed;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        color: var(--dak-pkg-text);
        text-decoration: none !important;
    }

    .dak-pkg-mobile-series-item__body {
        min-width: 0;
    }

    .dak-pkg-mobile-series-item strong {
        display: block;
        font-size: 15px;
        line-height: 1.35;
    }

    .dak-pkg-mobile-series-item p {
        margin: 4px 0 0;
        color: #777;
        font-size: 12px;
        line-height: 1.45;

        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .dak-pkg-mobile-series-item > i {
        flex: 0 0 auto;
        font-size: 19px;
        color: #666;
    }


    /* Single drill-down */
    .dak-pkg-mobile-viewport {
        width: 100%;
        overflow: hidden;
    }

    .dak-pkg-mobile-track {
        display: flex;
        width: 300%;
        transform: translate3d(0, 0, 0);
        transition: transform .32s cubic-bezier(.22, .61, .36, 1);
        will-change: transform;
    }

    .dak-pkg-mobile-panel {
        flex: 0 0 33.333333%;
        width: 33.333333%;
        min-width: 0;
    }

    .dak-package-download[data-mobile-level="materials"] .dak-pkg-mobile-track {
        transform: translate3d(0, 0, 0);
    }

    .dak-package-download[data-mobile-level="subgroups"] .dak-pkg-mobile-track {
        transform: translate3d(-33.333333%, 0, 0);
    }

    .dak-package-download[data-mobile-level="files"] .dak-pkg-mobile-track {
        transform: translate3d(-66.666666%, 0, 0);
    }

    .dak-pkg-mobile-description {
        margin-bottom: 14px;
        padding-bottom: 14px;
        border-bottom: 1px solid #ededed;
        color: #747474;
        font-size: 13px;
        line-height: 1.55;
    }

    .dak-pkg-mobile-description p {
        margin: 0;
    }

    .dak-pkg-mobile-materials {
        display: flex;
        flex-direction: column;
    }

    .dak-pkg-mobile-material-item,
    .dak-pkg-mobile-subgroup-item {
        appearance: none;
        -webkit-appearance: none;
        width: 100%;
        min-height: 52px;
        padding: 0 2px;
        border: 0;
        border-bottom: 1px solid #ededed;
        background: transparent;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        color: var(--dak-pkg-text);
        text-align: left;
        font-size: 15px;
        cursor: pointer;
    }

    .dak-pkg-mobile-material-item > i,
    .dak-pkg-mobile-subgroup-item > i {
        flex: 0 0 auto;
        font-size: 19px;
        color: #666;
    }

    .dak-pkg-mobile-subgroup-list[hidden] {
        display: none !important;
    }

    .dak-pkg-mobile-subgroup-item {
        appearance: none;
        -webkit-appearance: none;
        width: 100%;
        min-height: 52px;
        padding: 0 2px;
        border: 0;
        border-bottom: 1px solid #ededed;
        background: transparent;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        color: var(--dak-pkg-text);
        text-align: left;
        font-size: 15px;
        cursor: pointer;
    }

    .dak-pkg-mobile-file-panel[hidden] {
        display: none !important;
    }

    .dak-pkg-mobile-file-heading {
        margin-bottom: 11px;
        font-size: 16px;
        line-height: 1.3;
        font-weight: 700;
    }

    .dak-pkg-mobile-file-row {
        min-height: 64px;
        padding: 8px 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 14px;
        align-items: center;
        border-bottom: 1px solid #ededed;
    }

    .dak-pkg-mobile-file-row:first-of-type {
        border-top: 1px solid #ededed;
    }

    .dak-pkg-mobile-file-row__body {
        min-width: 0;
    }

    .dak-pkg-mobile-file-row__name {
        font-size: 14px;
        line-height: 1.4;
    }

    .dak-pkg-mobile-file-row__size {
        margin-top: 4px;
        color: #888;
        font-size: 12px;
    }

    .dak-pkg-mobile-file-row__download {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: var(--dak-pkg-text);
        text-decoration: none !important;
    }

    .dak-pkg-mobile-file-row__download i:first-child {
        font-size: 21px;
    }

    .dak-pkg-mobile-file-row__download i:last-child {
        font-size: 18px;
    }
}


@media (prefers-reduced-motion: reduce) {

    .dak-pkg-mobile-track {
        transition: none;
    }
}
