/* ======================================================= */
/* ====== SOFTWARE DOWNLOADS TABLE CSS =================== */
/* ======================================================= */

.downloads-section {
    background-color: white;
    padding-top: 4rem; /* py-16 */
    padding-bottom: 4rem;
}
@media (min-width: 640px) { /* sm:py-20 */
    .downloads-section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}
.downloads-container {
    max-width: 80rem; /* max-w-7xl */
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Filter & Search Bar --- */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}
@media (min-width: 768px) {
    .filter-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.cat-button {
    padding: 0.375rem 1rem; /* px-4 py-1.5 */
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px; /* rounded-full */
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
    background-color: #f3f4f6;
    color: #374151;
}
.cat-button:hover { background-color: #e5e7eb; }
.cat-button--active {
    background-color: #1f2937;
    color: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.search-wrapper {
    position: relative;
    width: 100%;
}
@media (min-width: 768px) { .search-wrapper { width: auto; } }
.search-wrapper svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}
.search-input {
    width: 100%;
    box-sizing: border-box;
    padding-left: 2.25rem; /* pl-9 */
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    color: black;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
}
.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
}
@media (min-width: 768px) { .search-input { width: 16rem; } } /* md:w-64 */

/* --- The Table --- */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}
.downloads-table {
    min-width: 100%;
    border-collapse: collapse;
}
.downloads-table thead { background-color: #f9fafb; }
.downloads-table th {
    padding: 0.75rem 1.5rem; /* px-6 py-3 */
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}
.downloads-table td {
    padding: 1rem 1.5rem; /* px-6 py-4 */
    vertical-align: top;
    white-space: nowrap;
    border-bottom: 1px solid #e5e7eb;
}
.downloads-table tbody tr:last-child td { border-bottom: none; }

.file-name { font-weight: 600; color: #1f2937; margin:0; }
.compatible-models { font-size: 0.875rem; color: #6b7280; margin:0.25rem 0 0 0; }
.version-tag {
    display: inline-block;
    padding: 0.125rem 0.625rem; /* px-2.5 py-0.5 */
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #f3f4f6;
    color: #1f2937;
    border-radius: 9999px;
}
.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.2s;
}
.download-button:hover { background-color: #1d4ed8; }
.text-right { text-align: right; }
.no-files-found {
    text-align: center;
    padding: 2.5rem;
    color: #6b7280;
}

/* Responsive Table Columns */
.hidden-md { display: none; }
.hidden-lg { display: none; }
@media (min-width: 768px) { .hidden-md { display: table-cell; } }
@media (min-width: 1024px) { .hidden-lg { display: table-cell; } }