/**
 * Product page → Downloads tab (woocommerce/single-product/tabs/downloads.php).
 *
 * One row per file: icon tile, title and facts, text links ("View",
 * "Download", "Details"). The block frame (heading, divider between
 * blocks) is still legacy/page-shop.css's .download-block.
 * Enqueued on product pages by Kvaser_Download_Finder::enqueue().
 */

.kvaser-pd-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Icon and text side by side, the links on their own line under the
   text: the tab panel is narrow (about 450px on desktop), too narrow for
   links beside a long title. */
.kvaser-pd-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 14px;
    margin: 0;
    padding: 14px 0;
}

/* legacy/page-shop.css styles every list inside a product tab as a bullet
   list (block items, 25px indent, a dot in ::before) with a selector this
   long; matching it keeps those rows flex rows without !important. */
.single-product .product .woocommerce-tabs ul.tabs-custom li .woocommerce-Tabs-custom-panel ul.kvaser-pd-list > li.kvaser-pd-item {
    display: flex;
    padding-left: 0;
    font-size: inherit;
}

.single-product .product .woocommerce-tabs ul.tabs-custom li .woocommerce-Tabs-custom-panel ul.kvaser-pd-list > li.kvaser-pd-item::before {
    content: none;
}

.kvaser-pd-item + .kvaser-pd-item {
    border-top: 1px solid var(--kv-border-soft, #e5e6ea);
}

.kvaser-pd-item:first-child {
    padding-top: 0;
}

.kvaser-pd-item:last-child {
    padding-bottom: 0;
}

/* ── Icon tile: what kind of file this is ─────────────────────────────── */

.kvaser-pd-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: var(--kv-gray-600, #4b5563);
    background: var(--kv-gray-100, #f3f4f6);
    border-radius: 10px;
}

.kvaser-pd-icon--pdf      { color: #c8102e; background: #fdecee; }
.kvaser-pd-icon--windows  { color: #0067b8; background: #e8f1fb; }
.kvaser-pd-icon--linux    { color: #1f2937; background: #fff4d6; }
.kvaser-pd-icon--android  { color: #1e7e34; background: #e7f6ec; }
.kvaser-pd-icon--python   { color: #306998; background: #eaf1f8; }
.kvaser-pd-icon--firmware { color: #6d28d9; background: #f1ebfd; }
.kvaser-pd-icon--archive  { color: #b45309; background: #fdf3e6; }
.kvaser-pd-icon--code     { color: #1f2937; background: #eef0f3; }
.kvaser-pd-icon--software { color: var(--kv-red, #e4002b); background: #fde8ec; }

/* ── Title, description, facts ────────────────────────────────────────── */

.kvaser-pd-text {
    flex: 1;
    min-width: 0;
}

.kvaser-pd-title {
    display: block;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    color: var(--kv-text, #1f2937);
    text-decoration: none;
    overflow-wrap: anywhere;
}

a.kvaser-pd-title:hover {
    color: var(--kv-red, #e4002b);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kvaser-pd-text .kvaser-pd-desc,
.kvaser-pd-text .kvaser-pd-meta {
    margin: 2px 0 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--kv-gray-600, #4b5563);
}

.kvaser-pd-text .kvaser-pd-meta {
    font-size: 13px;
    color: var(--kv-text-muted, #6c717f);
}

/* ── Links: View · Download · Details ─────────────────────────────────── */

.kvaser-pd-links {
    flex: 0 0 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 20px;
    padding-left: 54px; /* icon 40px + gap 14px: aligned with the text */
    font-size: 15px;
    line-height: 22px;
}

.kvaser-pd-links a:not(.btn-style) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--kv-red, #e4002b);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.kvaser-pd-links a:not(.btn-style):hover {
    color: #b00020;
}

.kvaser-pd-links a:not(.btn-style) i {
    font-size: 14px;
}

.kvaser-pd-links a:focus-visible,
a.kvaser-pd-title:focus-visible {
    outline: none;
    box-shadow: var(--kv-focus-ring, 0 0 0 3px rgb(228 0 43 / 0.28));
    border-radius: 4px;
}

/* "All downloads" keeps its button. */
.kvaser-pd-links .btn-style {
    padding: 12px 20px;
    white-space: nowrap;
}

.download-block--all .kvaser-pd-links {
    padding-top: 4px;
}
