/**
 * PDP Fitment tab — dark theme (loads after apa_embeded_script.css)
 */
#tab-fitment,
#tab-fitment .apa-fitment-compatibility-wrapper,
.apa-product-fitment-wrap #tab-fitment,
.productView-description #tab-fitment {
    background: transparent !important;
    color: #fff !important;
}

#tab-fitment .apa-fitment-compatibility-wrapper h4,
.productView-description #tab-fitment .apa-fitment-compatibility-wrapper h4 {
    color: #fff !important;
    font-weight: 700;
    margin: 0 0 1rem;
}

#tab-fitment #apa-fitment-compatibility-table-wrapper,
.productView-description #tab-fitment #apa-fitment-compatibility-table-wrapper {
    border: 1px solid #4a4a4a;
    background: #000 !important;
}

#tab-fitment #apa-fitment-compatibility-table,
.productView-description #tab-fitment #apa-fitment-compatibility-table {
    background: #000 !important;
    border-collapse: separate !important;
    border-spacing: 0;
    width: 100%;
}

#tab-fitment #apa-fitment-compatibility-table thead th,
.productView-description #tab-fitment #apa-fitment-compatibility-table thead th {
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%) !important;
    color: #fff200 !important;
    border: 1px solid #4a4a4a !important;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 12px 10px !important;
}

#tab-fitment #apa-fitment-compatibility-table .filterRow td,
.productView-description #tab-fitment #apa-fitment-compatibility-table .filterRow td {
    background: #111 !important;
    border: 1px solid #4a4a4a !important;
    padding: 6px 8px !important;
}

#tab-fitment #apa-fitment-compatibility-table .filterRow input,
.productView-description #tab-fitment #apa-fitment-compatibility-table .filterRow input {
    background: #1a1a1a !important;
    color: #e8e8e8 !important;
    border: 1px solid #fff200 !important;
    box-shadow: none !important;
}

/* Data cells — maximum specificity; pairs with JS inline paint */
#tab-fitment #apa-fitment-compatibility-table tbody.apa-fitment-data-body td.fitment-field,
.productView-description #tab-fitment #apa-fitment-compatibility-table tbody.apa-fitment-data-body td.fitment-field,
#tab-fitment #apa-fitment-compatibility-table tbody.apa-fitment-data-body tr.apa-fitment-data-row td,
.productView-description #tab-fitment #apa-fitment-compatibility-table tbody.apa-fitment-data-body tr td {
    border: 1px solid #333 !important;
    padding: 10px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: currentColor !important;
}

#tab-fitment #apa-fitment-compatibility-table tbody.apa-fitment-data-body tr:nth-child(odd) td,
.productView-description #tab-fitment #apa-fitment-compatibility-table tbody.apa-fitment-data-body tr:nth-child(odd) td {
    background-color: #141414 !important;
    color: #fff !important;
}

#tab-fitment #apa-fitment-compatibility-table tbody.apa-fitment-data-body tr:nth-child(even) td,
.productView-description #tab-fitment #apa-fitment-compatibility-table tbody.apa-fitment-data-body tr:nth-child(even) td {
    background-color: #0a0a0a !important;
    color: #fff !important;
}

#tab-fitment #apa-fitment-compatibility-table tbody.apa-fitment-data-body td.apa-fitment-col-primary,
.productView-description #tab-fitment #apa-fitment-compatibility-table td.apa-fitment-col-primary {
    color: #fff200 !important;
    -webkit-text-fill-color: #fff200 !important;
    font-weight: 500 !important;
}

#tab-fitment .apa-compat-pagination-wrapper .page-num,
.productView-description #tab-fitment .apa-compat-pagination-wrapper .page-num {
    color: #ccc !important;
}

#tab-fitment .pagi_master .prevPage,
#tab-fitment .pagi_master .nextPage,
.productView-description #tab-fitment .pagi_master .prevPage,
.productView-description #tab-fitment .pagi_master .nextPage {
    color: #fff200 !important;
    background: transparent !important;
    border: 1px solid #4a4a4a !important;
}

#tab-fitment .pagi_master li a,
.productView-description #tab-fitment .pagi_master li a {
    color: #ccc !important;
    background: #1a1a1a !important;
    border: 1px solid #4a4a4a !important;
}

#tab-fitment .pagi_master li.active a,
.productView-description #tab-fitment .pagi_master li.active a {
    background: #fff200 !important;
    color: #000 !important;
    border-color: #fff200 !important;
}

/* Kill legacy white wrapper inside PDP tab */
#tab-fitment .apa-fitment-compatibility-wrapper,
.productView-description #tab-fitment .APAsection .apa-fitment-compatibility-wrapper {
    background: transparent !important;
    padding: 0 !important;
}

/* Literature tab — PDF icon + label link */
#tab-literature .apa-literature-grid,
.productView-description #tab-literature .apa-literature-grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.25rem 0;
}

#tab-literature .apa-literature-item,
.productView-description #tab-literature .apa-literature-item {
    flex: 0 0 auto;
    max-width: 100%;
}

#tab-literature .apa-literature-link,
.productView-description #tab-literature .apa-literature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #fff200 !important;
    transition: color 0.2s ease, opacity 0.2s ease;
}

#tab-literature .apa-literature-link:hover,
.productView-description #tab-literature .apa-literature-link:hover {
    color: #e0c44a !important;
    text-decoration: none;
    opacity: 0.92;
}

#tab-literature .apa-literature-pdf-icon,
.productView-description #tab-literature .apa-literature-pdf-icon {
    display: inline-block;
    flex-shrink: 0;
    width: 28px;
    height: 34px;
    background: linear-gradient(145deg, #e0c44a 0%, #fff200 55%, #a8861f 100%);
    border-radius: 2px 2px 3px 2px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

#tab-literature .apa-literature-pdf-icon::before,
.productView-description #tab-literature .apa-literature-pdf-icon::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 9px;
    height: 9px;
    background: linear-gradient(135deg, #f0dc8a 50%, #8a6f1a 50%);
    border-radius: 0 0 0 2px;
}

#tab-literature .apa-literature-pdf-icon::after,
.productView-description #tab-literature .apa-literature-pdf-icon::after {
    content: "PDF";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5px;
    text-align: center;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    line-height: 1;
}

#tab-literature .apa-literature-label,
.productView-description #tab-literature .apa-literature-label {
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 400;
    color: #fff200 !important;
}

#tab-literature .apa-literature-thumb,
.productView-description #tab-literature .apa-literature-thumb {
    width: 28px;
    height: auto;
    flex-shrink: 0;
    border: 1px solid #4a4a4a;
    background: #fff;
}
