/* Force summary rows to use flex, not grid */
.row.body.summary {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 1rem;
    cursor: pointer;
}

/* Column widths (optional, but you can tune these) */
.row.body.summary > div[data-label="Software"] {
    flex: 2;
}

.row.body.summary > div[data-label="Type"] {
    flex: 0.5;
}

.row.body.summary > div[data-label="Issue"] {
    flex: 1.5;
}

.row.body.summary > div[data-label="Remediation"] {
    flex: 1;
}

/* Details block */
.details {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border-left: 2px solid rgba(255,255,255,0.2);
}

.hidden {
    display: none !important;
}

/* Force header to use flexbox */
.row.header {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 1rem;
}

/* Software / Type / Issue stay shared */
.row.header > div[data-label="Software"],
.row.body.summary > div[data-label="Software"] {
    flex: 0 0 45%;
}

.row.header > div[data-label="Type"],
.row.body.summary > div[data-label="Type"] {
    flex: 0 0 5%;
}

.row.header > div[data-label="Issue"],
.row.body.summary > div[data-label="Issue"] {
    flex: 0 0 25%;
}

/* Remediation: header fixed, body flexible + wrapping */
.row.header > div[data-label="Remediation"] {
    flex: 0 0 25%;
}

.row.body.summary > div[data-label="Remediation"] {
    flex: 1 1 auto;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}
.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.controls {
    flex: 1;
}
.sort-bar {
    margin-bottom: 1rem;
}

.sort-bar select {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #111;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, background 0.15s ease;
    cursor: pointer;
}

.sort-bar select:focus {
    outline: none;
    border-color: rgba(255,255,255,0.3);
}



/* Mobile cards */
@media (max-width: 768px) {
    .row.header {
        display: none !important;
    }

    .row.body.summary {
        flex-direction: column !important;
    }

    .row.body.summary > div {
        flex: none !important;
        min-width: 100% !important;
    }
    
    /* Prevent mobile card labels from wrapping */
    .row.body.summary > div::before {
    white-space: nowrap !important;
    }
    
    .controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .controls input#search {
        width: 100%;
    }

    .sort-bar select {
        width: 100%;
    }

}
