﻿/* =========================================================
   components.css
   Cards, editorial, featured, chips/tags, tables, analytics cards, forms primitives
   ========================================================= */

/* Editorial shells */
.editorial {
    background: transparent;
    padding: 2rem 0 4rem;
}

    .editorial .page-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 18px 16px;
    }

/* Featured */
.featured {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
    background: rgba(0,0,0,.45);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 0 1.6rem 0;
}

    .featured img {
        width: 100%;
        height: 100%;
        min-height: 320px;
        object-fit: cover;
        display: block;
    }

.featured-text {
    padding: 1.25rem 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .featured-text h2 {
        font-size: 1.75rem;
    }

.featured-cta {
    margin-top: .75rem;
    font-weight: 950;
}

/* Chips / tags */
.pill,
.chip,
.tag {
    background: rgba(51, 204, 102, 0.12);
    color: var(--green);
    border: 1px solid rgba(51, 204, 102, 0.35);
}

.industry-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin: .25rem 0 1.25rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.35);
    color: #d8d8d8;
    font-weight: 800;
    font-size: .92rem;
    white-space: nowrap;
}

    .chip:hover {
        border-color: rgba(51,204,102,.55);
        color: #baffcf;
    }

    .chip.is-active {
        background: rgba(51,204,102,.14);
        border-color: rgba(51,204,102,.55);
        color: #baffcf;
    }

/* Article grid + cards */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.15rem;
}

.article-card {
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.article-thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: rgba(255,255,255,.06);
}

    .article-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
    }

.article-meta {
    padding: .95rem 1.05rem 1.05rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    flex: 1;
}

    .article-meta h3 {
        margin: 0;
        line-height: 1.2;
        font-size: 1.05rem;
    }

    .article-meta a {
        margin-top: auto;
        font-weight: 900;
    }

/* Generic cards */
.card {
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
}

/* Mare grid */
.mare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

/* Tables (shell) */
.table-shell {
    background: rgba(0,0,0,.55);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.10);
}

.table-shell__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: .75rem;
}

.toolbar-title {
    font-size: 1.25rem;
    font-weight: 950;
}

.toolbar-sub {
    opacity: .75;
    font-size: .9rem;
}

.table-shell__body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Bloodstock table (alt section) */
.bloodstock-section.alt {
    background: rgba(0,0,0,.20);
    border-top: none;
    border-bottom: none;
}

    .bloodstock-section.alt .table-shell {
        background: rgba(0,0,0,.72);
        border: 1px solid rgba(255,255,255,.10);
        border-radius: 18px;
        padding: 14px;
        box-shadow: 0 14px 40px rgba(0,0,0,.35);
        backdrop-filter: blur(8px);
    }

    .bloodstock-section.alt .table-shell__body {
        background: rgba(255,255,255,.04);
        border: 1px solid rgba(255,255,255,.08);
        border-radius: 14px;
        padding: 10px;
        position: relative;
    }

        .bloodstock-section.alt .table-shell__body::after {
            content: "";
            position: sticky;
            right: 0;
            top: 0;
            height: 100%;
            width: 22px;
            float: right;
            pointer-events: none;
            background: linear-gradient(to left, rgba(0,0,0,.45), rgba(0,0,0,0));
        }

    .bloodstock-section.alt .hs-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        background: #fff;
        color: #0b0f0d;
        border-radius: 12px;
        overflow: hidden;
        table-layout: auto;
        min-width: 0;
        font-variant-numeric: tabular-nums;
    }

        .bloodstock-section.alt .hs-table thead th {
            position: sticky;
            top: 0;
            z-index: 5;
            background: #0b0f0d;
            color: #fff;
            padding: .55rem .6rem;
            font-weight: 900;
            text-align: left;
            white-space: nowrap;
            border-bottom: 1px solid rgba(255,255,255,.10);
            font-size: .92rem;
        }

        .bloodstock-section.alt .hs-table td {
            padding: .55rem .6rem;
            font-weight: 600;
            border-bottom: 1px solid rgba(0,0,0,.08);
            border-right: 1px solid rgba(0,0,0,.06);
            vertical-align: top;
            white-space: nowrap;
        }

            .bloodstock-section.alt .hs-table td:last-child,
            .bloodstock-section.alt .hs-table th:last-child {
                border-right: 0;
            }

        .bloodstock-section.alt .hs-table tbody tr:nth-child(even) td {
            background: rgba(0,0,0,.02);
        }

        .bloodstock-section.alt .hs-table tbody tr:hover td {
            background: rgba(51,204,102,.12);
        }

        .bloodstock-section.alt .hs-table thead th:first-child,
        .bloodstock-section.alt .hs-table tbody td:first-child {
            position: sticky;
            left: 0;
            z-index: 6;
        }

        .bloodstock-section.alt .hs-table thead th:first-child {
            background: #0b0f0d;
        }

        .bloodstock-section.alt .hs-table tbody td:first-child {
            background: #fff;
            box-shadow: 8px 0 14px rgba(0,0,0,.08);
        }

        .bloodstock-section.alt .hs-table th.num,
        .bloodstock-section.alt .hs-table td.num {
            width: 1%;
            white-space: nowrap;
            text-align: right;
            padding-left: .45rem;
            padding-right: .45rem;
        }

        .bloodstock-section.alt .hs-table th:nth-child(2),
        .bloodstock-section.alt .hs-table td:nth-child(2) {
            white-space: normal;
            max-width: 22ch;
        }

/* Pedigree analytics feature cards */
.feature-grid {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.1rem;
}

.feature-card {
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--radius);
    padding: 1.1rem 1.15rem;
}

.feature-title {
    font-weight: 950;
    font-size: 1.05rem;
    margin-bottom: .35rem;
}

.feature-card p {
    opacity: .86;
    margin: 0 0 .75rem 0;
}

.feature-link {
    font-weight: 900;
    display: inline-block;
}

/* Forms primitives */
.label {
    font-weight: 900;
    display: inline-block;
    margin-bottom: .25rem;
}

.input {
    width: 100%;
    padding: .65rem .85rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.1);
    color: #fff;
}

    .input.file {
        background: transparent;
    }

/* Responsive components */
@media (max-width: 900px) {
    .featured {
        grid-template-columns: 1fr;
    }

        .featured img {
            min-height: 240px;
        }

    .bloodstock-section.alt .hs-table thead th,
    .bloodstock-section.alt .hs-table td {
        padding: .5rem .55rem;
    }
}
