/*
 * Styles for Refactored Compatible Devices Page
 * --------------------------------------------------
 */

/* Main container and card setup */
.h3-compat-container {
    margin-bottom: 100px;
}

.h3-compat-container .card {
    padding: 20px 40px;
    background-color: #ffffff;
    color: #000000;
}

/* --- Desktop Header --- */
.h3-compat-header {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 2px solid #00aeef;
    margin-bottom: 20px;
}

.h3-compat-header__item {
    font-size: 20px;
    font-weight: 100;
    color: #00aeef;
    text-align: left;
}

/* --- Main Content Sections --- */
.h3-compat-section {
    margin-bottom: 40px;
}

.h3-compat-section:last-child {
    margin-bottom: 0;
}

.h3-compat-section__vendor-title {
    font-size: 22px;
    font-weight: 600;
    color: #000000;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.h3-compat-section__category {
    margin-bottom: 25px;
}

.h3-compat-section__category-title {
    font-size: 18px;
    text-decoration: underline;
    margin-bottom: 15px;
    padding-left: 15px;
    font-weight: 400;
}

/* --- Data Rows (Desktop Flex Table) --- */
.h3-compat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s;
}

.h3-compat-row:last-child {
    border-bottom: none;
}

.h3-compat-row:hover {
    background-color: #f9f9f9;
}

.h3-compat-row__item {
    text-align: left;
}

.h3-compat-row__item[data-label="Model"] {
    flex-basis: 40%;
    padding-left: 30px;
}

.h3-compat-row__item[data-label="TDP"] {
    flex-basis: 20%;
    color: #505255;
}

.h3-compat-row__item[data-label="Chassis"] {
    flex-basis: 40%;
}

.h3-compat-row__item a {
    color: #000000;
    text-decoration: none;
}

.h3-compat-row__item a:hover {
    color: #00aeef;
    text-decoration: underline;
}

/* Hide mobile-only labels by default */
.h3-compat-row__item::before {
    display: none;
    font-weight: 600;
    margin-right: 8px;
    color: #333;
}


/* --- Responsive Layout for Mobile (< 768px) --- */
@media (max-width: 767px) {
    /* Hide desktop header on mobile */
    .h3-compat-header {
        display: none;
    }

    .h3-compat-container .card {
        padding: 15px;
    }

    .h3-compat-section__vendor-title {
        font-size: 20px;
    }

    .h3-compat-section__category-title {
        padding-left: 0;
        font-size: 17px;
    }

    /* Convert row to a stacked block */
    .h3-compat-row {
        flex-direction: column;
        align-items: flex-start;
        border: 1px solid #e5e5e5;
        border-radius: 4px;
        padding: 15px;
        margin-bottom: 15px;
    }

    .h3-compat-row:last-child {
        margin-bottom: 0;
    }

    .h3-compat-row__item {
        flex-basis: auto;
        width: 100%;
        padding: 6px 0;
        text-align: left !important; /* Override desktop alignment */
    }

    .h3-compat-row__item[data-label="Model"] {
        font-size: 1.1em;
        font-weight: bold;
        padding-left: 0;
    }

    /* Display the label using the content from the data-label attribute */
    .h3-compat-row__item::before {
        content: attr(data-label) ": ";
        display: inline-block;
    }

    /* The model name doesn't need its own "Model:" label */
    .h3-compat-row__item[data-label="Model"]::before {
        display: none;
    }
}