/*
 * MAAT Electronics – TEKRA Documents Design v1.2.0.
 * Compact presentation matched to MAAT Engineering reference.
 * Only acts on the product documents tab generated by TEKRA Catalog Sync.
 */
#tab-maat_tekra_docs {
    --maat-doc-color: #454545;
    --maat-doc-blue: #1952b3;
    --maat-doc-separator: #e8e8ea;
}

/* The title is generated by documents_html() inside WoodMart's .wc-tab-inner.
   Hide BOTH nesting variants; the WooCommerce tab title remains visible. */
#tab-maat_tekra_docs > h2,
#tab-maat_tekra_docs > h3,
#tab-maat_tekra_docs > .wc-tab-inner > h2,
#tab-maat_tekra_docs > .wd-entry-content > h2,
#tab-maat_tekra_docs .wc-tab-inner > h2:first-child {
    display: none !important;
}

#tab-maat_tekra_docs ul.maat-tekra-documents {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 860px !important;
    margin: 10px auto 16px !important;
    padding: 0 !important;
    list-style: none !important;
}

#tab-maat_tekra_docs ul.maat-tekra-documents > li {
    display: block !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--maat-doc-separator) !important;
    list-style: none !important;
}

#tab-maat_tekra_docs ul.maat-tekra-documents > li::before,
#tab-maat_tekra_docs ul.maat-tekra-documents > li::marker {
    content: none !important;
    display: none !important;
}

#tab-maat_tekra_docs ul.maat-tekra-documents > li > a {
    display: grid !important;
    box-sizing: border-box !important;
    grid-template-columns: 27px minmax(0, 1fr) 83px !important;
    column-gap: 21px !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 70px !important;
    margin: 0 !important;
    padding: 12px 4px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--maat-doc-color) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    line-height: 1.38 !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    text-transform: none !important;
    text-align: left !important;
    overflow-wrap: anywhere;
    transition: background-color 0.15s ease !important;
}

/* PDF icon: the original supplied PNG is bundled locally with the plugin. */
#tab-maat_tekra_docs ul.maat-tekra-documents > li > a::before {
    content: '' !important;
    display: block !important;
    box-sizing: border-box !important;
    grid-column: 1 !important;
    width: 26px !important;
    height: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: url('pdf-red-icon_bg.png') center / contain no-repeat !important;
    box-shadow: none !important;
}

/* Clickable visual label shares the existing PDF link; links are not changed. */
#tab-maat_tekra_docs ul.maat-tekra-documents > li > a::after {
    content: 'Свали' !important;
    display: flex !important;
    box-sizing: border-box !important;
    grid-column: 3 !important;
    align-items: center !important;
    justify-content: flex-start !important;
    justify-self: end !important;
    width: 83px !important;
    min-width: 83px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 23px 0 0 !important;
    border: none !important;
    background: url('download-blue_bg.png') right center / 19px 19px no-repeat !important;
    box-shadow: none !important;
    color: var(--maat-doc-blue) !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    text-transform: none !important;
}

#tab-maat_tekra_docs ul.maat-tekra-documents > li > a:hover {
    background-color: #fafbfd !important;
}

#tab-maat_tekra_docs ul.maat-tekra-documents > li > a:hover::after {
    color: #113f8a !important;
}

#tab-maat_tekra_docs ul.maat-tekra-documents > li > a:focus-visible {
    outline: 2px solid var(--maat-doc-blue) !important;
    outline-offset: -2px !important;
}

@media (max-width: 900px) {
    #tab-maat_tekra_docs ul.maat-tekra-documents {
        max-width: calc(100% - 24px) !important;
    }
}

@media (max-width: 600px) {
    #tab-maat_tekra_docs ul.maat-tekra-documents {
        max-width: 100% !important;
        margin: 5px auto 14px !important;
    }

    #tab-maat_tekra_docs ul.maat-tekra-documents > li > a {
        grid-template-columns: 26px minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        column-gap: 11px !important;
        row-gap: 3px !important;
        min-height: 66px !important;
        padding: 10px 3px !important;
        font-size: 14px !important;
    }

    #tab-maat_tekra_docs ul.maat-tekra-documents > li > a::before {
        grid-column: 1 !important;
        grid-row: 1 / span 2 !important;
        align-self: start !important;
        width: 25px !important;
        height: 25px !important;
    }

    #tab-maat_tekra_docs ul.maat-tekra-documents > li > a::after {
        grid-column: 2 !important;
        grid-row: 2 !important;
        justify-self: end !important;
        width: 83px !important;
        min-width: 83px !important;
        min-height: 25px !important;
        background-size: 18px 18px !important;
        padding-right: 22px !important;
        font-size: 14px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #tab-maat_tekra_docs ul.maat-tekra-documents > li > a {
        transition: none !important;
    }
}

/* ================================================================
   MAAT Electronics – Product description width
   Match the 860px centered TEKRA documentation list.
   Limit changes to the Description tab; do not touch WoodMart
   tabs, other product content, or display/visibility settings.
   ================================================================ */
body.single-product #tab-description > .wc-tab-inner {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 860px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 900px) {
    body.single-product #tab-description > .wc-tab-inner {
        width: calc(100% - 24px) !important;
    }
}

@media (max-width: 600px) {
    body.single-product #tab-description > .wc-tab-inner {
        width: 100% !important;
    }
}
