﻿/* ============================================================
   TENDER DOCUMENT LIST
   Shared by Tender Detail / Tender Corrigendum
============================================================ */

.tender-document-list {
    margin: 0;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--surface-primary);
    list-style: none;
    overflow: hidden;
}


.tender-document-item + .tender-document-item {
    border-top: 1px solid var(--border-light);
}


.tender-document-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}


    .tender-document-link:hover,
    .tender-document-link:focus-visible {
        background: var(--brand-100);
        color: var(--brand-900);
        text-decoration: none;
    }


/* ============================================================
   DOCUMENT INFORMATION
============================================================ */

.tender-document-info {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}


.tender-document-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--brand-300);
    border-radius: 4px;
    background: var(--brand-100);
    color: var(--brand-900);
}


    .tender-document-icon svg {
        width: 18px;
        height: 18px;
    }


.tender-document-name {
    min-width: 0;
    color: inherit;
    font-size: var(--fs-desktop-p2);
    font-weight: var(--font-semibold);
    line-height: 1.45;
    overflow-wrap: anywhere;
}


/* ============================================================
   DOCUMENT ACTION
============================================================ */

.tender-document-open {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-900);
}


    .tender-document-open svg {
        width: 16px;
        height: 16px;
    }


/* ============================================================
   EMPTY STATE
============================================================ */

.tender-document-empty {
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--surface-secondary);
    color: var(--text-secondary);
    font-size: var(--fs-desktop-p2);
}


/* ============================================================
   ACCESSIBILITY
============================================================ */

.tender-document-link:focus-visible {
    outline: 3px solid color-mix( in srgb, var(--brand-900) 25%, transparent );
    outline-offset: -3px;
}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 576px) {

    .tender-document-link {
        gap: 12px;
        padding: 11px 12px;
    }


    .tender-document-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }


        .tender-document-icon svg {
            width: 16px;
            height: 16px;
        }


    .tender-document-name {
        font-size: var(--fs-mobile-p2);
    }
}


/* ============================================================
   REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {

    .tender-document-link {
        transition: none;
    }
}


/* ============================================================
   VIEW BUTTON
============================================================ */

.tender-document-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid var(--brand-900);
    border-radius: 4px;
    background: var(--surface-primary);
    color: var(--brand-900);
    font-family: inherit;
    font-size: var(--fs-desktop-p2);
    font-weight: var(--font-semibold);
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}


    .tender-document-view:hover,
    .tender-document-view:focus-visible {
        background: var(--brand-900);
        color: var(--surface-primary);
        text-decoration: none;
    }


    .tender-document-view svg {
        width: 15px;
        height: 15px;
        flex: 0 0 15px;
    }


@media (max-width: 576px) {

    .tender-document-view {
        padding: 6px 9px;
        font-size: var(--fs-mobile-p2);
    }
}