/*!
 * Download page.
 */

.download-page {
    padding-bottom: 60px;
}

.download-panel {
    background: #fff;
    min-height: 640px;
    box-shadow: 0 8px 24px rgba(50, 44, 37, 0.08);
}

.download-tabs {
    display: flex;
    background: #e7e7e7;
    border-bottom: 1px solid #d6d6d6;
}

.download-tab {
    min-width: 190px;
    padding: 18px 24px;
    text-align: center;
    color: #1d1d1d;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-right: 1px solid #d8d8d8;
    position: relative;
}

.download-tab:hover,
.download-tab.active {
    color: #1d1d1d;
    background: #fff;
    text-decoration: none;
}

.download-tab.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 58px;
    height: 2px;
    background: #c78332;
    transform: translateX(-50%);
}

.download-tab-content {
    padding: 28px 28px 36px;
}

.download-pane {
    display: none;
}

.download-pane.active {
    display: block;
}

.download-entry {
    padding: 0 0 30px;
    margin-bottom: 34px;
    border-bottom: 1px dashed #8aa4c8;
}

.download-entry:last-child {
    border-bottom: 0;
    margin-bottom: 0;
}

.download-entry-body {
    color: #4c2d0d;
    font-size: 13px;
    line-height: 1.85;
}

.download-entry-body h2 {
    font-size: 16px;
    color: #3d260c;
    margin-bottom: 12px;
    font-weight: 700;
}

.download-meta {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

.download-checksum {
    word-break: break-all;
    margin-bottom: 10px;
}

.download-description {
    white-space: normal;
}

/* Images in editor content are styled once, in base.css, where the rule keeps
   them inline so they sit beside text exactly as the editor shows them. A
   second block-level rule used to live here; base.css loads later and won, so
   it only made the real behaviour hard to find. */

.download-rich-content table {
    width: 100%;
    margin: 14px 0;
    border-collapse: collapse;
}

.download-rich-content th,
.download-rich-content td {
    border: 1px solid #c3a783;
    padding: 8px 10px;
}

.download-rich-content blockquote {
    border-left: 3px solid #d38a30;
    padding-left: 14px;
    color: #6b4a21;
}

.download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
    justify-content: center;
    align-items: center;
}

.download-action {
    min-width: 158px;
    min-height: 48px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.35);
    box-shadow: inset 0 1px rgba(255,255,255,.35), 0 8px 18px rgba(80, 46, 9, 0.18);
}

.download-action:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.download-action-orange {
    background: linear-gradient(180deg, #ffb54d, #f08622);
}

.download-action-blue {
    background: linear-gradient(180deg, #6c8fd3, #315da4);
}

.download-action-dark {
    background: linear-gradient(180deg, #36425e, #1f2638);
}

.download-action-green {
    background: linear-gradient(180deg, #35b779, #158a54);
}

/* Custom colours come in as an inline background-color, so the preset
   gradient and chrome are cleared to let the flat colour read properly. */

.download-action-custom {
    background: #910000;
    border-color: rgba(0, 0, 0, .12);
    box-shadow: 0 8px 18px rgba(80, 46, 9, .18);
}

/* An image button is the artwork itself: no padding, border or background
   competing with it. Size comes from the inline width/height when the admin
   set one, otherwise from the image's own dimensions. */

.download-action-image {
    padding: 0;
    min-width: 0;
    min-height: 0;
    border: 0;
    background: none;
    box-shadow: none;
    line-height: 0;
}

.download-action-image:hover {
    filter: brightness(1.06);
}

.download-action-face {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Uploaded icon, in place of the icon font. */
.download-action-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex: 0 0 auto;
}

.download-empty {
    padding: 80px 20px;
    text-align: center;
    color: #8b8177;
    font-size: 15px;
}

@media (max-width: 767.98px) {
    .download-tabs {
        overflow-x: auto;
    }

    .download-tab {
        min-width: 160px;
        padding: 15px 18px;
    }

    .download-tab-content {
        padding: 22px 18px 28px;
    }

    .download-actions {
        display: grid;
    }
}
