/**
 * Commpagnie - Product Attributes Table
 * Styles pour le tableau des attributs
 * 
 * @package Commpagnie_Product_Attributes
 * @version 1.0.0
 */

/* ========================================
   VARIABLES
   ======================================== */
.cmp-product-attributes-table {
    --cmp-attr-blue: #2B4678;
    --cmp-attr-text: #515151;
    --cmp-attr-yellow: #F7CA39;
    --cmp-attr-white: #ffffff;
}

/* ========================================
   CONTAINER
   ======================================== */
.cmp-product-attributes-table {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    background-color: var(--cmp-attr-white);
    overflow: hidden;
}

/* ========================================
   EN-TÊTE
   ======================================== */
.cmp-product-attributes-table .cmp-table-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--cmp-attr-white);
    border-bottom: 1px solid var(--cmp-attr-yellow);
}

.cmp-product-attributes-table .cmp-header-attribute,
.cmp-product-attributes-table .cmp-header-detail {
    padding: 16px 20px;
    color: var(--cmp-attr-blue);
    font-family: 'Fira Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

/* ========================================
   LIGNES
   ======================================== */
.cmp-product-attributes-table .cmp-attribute-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--cmp-attr-yellow);
    transition: background-color 0.2s ease;
}

.cmp-product-attributes-table .cmp-attribute-row:last-child {
    border-bottom: none;
}

.cmp-product-attributes-table .cmp-attribute-row:hover {
    background-color: rgba(247, 202, 57, 0.05);
}

.cmp-product-attributes-table .cmp-attribute-name {
    padding: 16px 20px;
    color: var(--cmp-attr-text);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.cmp-product-attributes-table .cmp-attribute-value {
    padding: 16px 20px;
    color: var(--cmp-attr-text);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

/* ========================================
   RESPONSIVE - TABLETTE
   ======================================== */
@media (max-width: 768px) {
    .cmp-product-attributes-table {
        margin: 20px 10px;
    }

    .cmp-product-attributes-table .cmp-table-header,
    .cmp-product-attributes-table .cmp-attribute-row {
        grid-template-columns: 1fr;
    }

    .cmp-product-attributes-table .cmp-header-detail {
        display: none;
    }

    .cmp-product-attributes-table .cmp-header-attribute {
        font-size: 18px;
        padding: 12px 16px;
    }

    .cmp-product-attributes-table .cmp-attribute-row {
        border-bottom: none;
    }

    .cmp-product-attributes-table .cmp-attribute-name {
        font-size: 14px;
        padding: 12px 16px 8px;
        background-color: rgba(247, 202, 57, 0.1);
    }

    .cmp-product-attributes-table .cmp-attribute-value {
        font-size: 14px;
        padding: 8px 16px 12px;
        border-bottom: 1px solid var(--cmp-attr-yellow);
    }

    .cmp-product-attributes-table .cmp-attribute-row:last-child .cmp-attribute-value {
        border-bottom: none;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 480px) {
    .cmp-product-attributes-table {
        margin: 15px 5px;
    }

    .cmp-product-attributes-table .cmp-header-attribute {
        font-size: 16px;
        padding: 10px 12px;
    }

    .cmp-product-attributes-table .cmp-attribute-name,
    .cmp-product-attributes-table .cmp-attribute-value {
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* ========================================
   IMPRESSION
   ======================================== */
@media print {
    .cmp-product-attributes-table {
        max-width: 100%;
        margin: 10px 0;
    }

    .cmp-product-attributes-table .cmp-attribute-row:hover {
        background-color: transparent;
    }

    .cmp-product-attributes-table .cmp-table-header,
    .cmp-product-attributes-table .cmp-attribute-row {
        border-bottom: 1px solid #000;
    }
}
