/*
 * supported-models.css - FINAL RESPONSIVE VERSION
 * Implements table-to-list transformation on mobile for ultimate responsiveness.
 */

/* ------------------------------------------- */
/* --- 1. Page Header & Filter Section --- */
/* ------------------------------------------- */

.supported-models-body {
    background-color: var(--color-bg-dark);
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin: 40px 0 30px 0;
}

.page-title {
    font-size: 2.8em;
    color: var(--color-text-light);
    font-weight: 900;
    margin-bottom: 10px;
}

.page-title i {
    color: var(--color-accent);
    margin-right: 10px;
}

.page-subtitle {
    font-size: 1.1em;
    color: var(--color-text-subtle);
    max-width: 800px;
    margin: 0 auto;
}

.filter-section {
    max-width: 1100px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
}

/* --- Search Bar & Filters (Styling retained) --- */
.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-accent-dim);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.search-bar i {
    color: var(--color-accent);
    margin-right: 10px;
    font-size: 1.2em;
}

#model-search {
    flex-grow: 1;
    border: none;
    background: transparent;
    color: var(--color-text-light);
    font-size: 1.1em;
    outline: none;
}

.filter-controls {
    display: flex;
    gap: 20px;
}

.custom-select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--color-accent-dim);
    border-radius: 8px;
    background-color: var(--color-bg-card);
    color: var(--color-text-light);
    font-size: 1em;
    appearance: none; 
    background-image: url('data:image/svg+xml;utf8,<svg fill="%2300FFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    cursor: pointer;
    outline: none;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.05);
}


/* ------------------------------------------- */
/* --- 2. Supported Models Table (Desktop) --- */
/* ------------------------------------------- */

.models-table-container {
    padding: 0 20px 80px 20px;
}

.supported-models-table {
    width: 100%;
    border-collapse: collapse;
}

.supported-models-table thead th {
    background-color: var(--color-accent-dim);
    color: var(--color-accent);
    padding: 15px;
    text-align: left;
    font-weight: 700;
    font-size: 1em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--color-accent);
    letter-spacing: 0.5px;
}

.supported-models-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.supported-models-table tbody tr:hover {
    background-color: rgba(0, 255, 255, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.supported-models-table tbody td {
    padding: 18px 15px;
    color: var(--color-text-light);
    font-size: 0.95em;
    vertical-align: middle;
}

/* Highlight Model and Processor */
.supported-models-table tbody td:nth-child(2) {
    font-weight: 700; 
    color: #fff;
}
.supported-models-table tbody td:nth-child(3) {
    color: #4CAF50; 
    font-weight: 600;
}


/* --- Highlighted Operations Badges (Beautiful & Colorful) --- */
.operations-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.op-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px; /* More rounded pill-shape */
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
}

/* Custom colors for operations (Enhanced and vibrant) */
.op-frp { 
    background: linear-gradient(45deg, #f1c40f, #e67e22); 
    color: #333; 
} /* Gold to Orange */
.op-mdm { 
    background: linear-gradient(45deg, #3498db, #2980b9); 
    color: #fff; 
} /* Sky to Deep Blue */
.op-kg { 
    background: linear-gradient(45deg, #e74c3c, #c0392b); 
    color: #fff; 
} /* Vivid Red */
.op-flash { 
    background: linear-gradient(45deg, #2ecc71, #27ae60); 
    color: #333; 
} /* Emerald Green */


/* --- No Results Message --- */
.no-results-message {
    text-align: center;
    padding: 40px;
    background-color: var(--color-bg-card);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 1.2em;
    font-weight: 600;
}


/* ------------------------------------------- */
/* --- 3. RESPONSIVENESS (Mobile Transformation) --- */
/* ------------------------------------------- */

@media (max-width: 768px) {
    
    /* Stack filters vertically */
    .filter-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    /* 1. Hide the table header on mobile */
    .supported-models-table thead {
        display: none;
    }
    
    /* 2. Make each table row a block-level card/list item */
    .supported-models-table,
    .supported-models-table tbody,
    .supported-models-table tr {
        display: block;
        width: 100%;
    }
    
    .supported-models-table tr {
        margin-bottom: 20px;
        background-color: var(--color-bg-card);
        border-radius: 10px;
        border: 1px solid var(--color-accent-dim);
        padding: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    /* 3. Make each table cell a block-level item */
    .supported-models-table td {
        display: block;
        text-align: right; /* Align value to the right */
        padding: 5px 10px;
        border: none;
        position: relative;
    }
    
    /* 4. Use the 'data-label' attribute to display the column name */
    .supported-models-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--color-text-subtle);
    }
    
    /* Special styling for the Model Name (top item) */
    .supported-models-table tbody tr td:nth-child(2) {
        font-size: 1.3em;
        font-weight: 900;
        color: var(--color-accent);
        text-align: center;
        border-bottom: 1px dashed var(--color-border);
        padding-bottom: 15px;
        margin-bottom: 10px;
    }
    
    /* Remove the 'Manufacturer' label in this special cell */
    .supported-models-table tbody tr td:nth-child(2)::before {
        content: none;
    }
    
    /* Adjust operations cell layout for block view */
    .operations-cell {
        justify-content: flex-end; /* Align badges to the right */
        padding-top: 10px;
    }
    
    .operations-cell::before {
        float: left;
        margin-right: auto; /* Push label to the left */
    }
}