.block-doclist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.block-doclist-item {
    position: relative;
}


.block-doclist-item a  {
    text-decoration: none !important;
}


.block-doclist-link {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    max-width: 100%;
    padding: 1rem 8.5rem 1rem 1.2rem;
    border-radius: 4px;
   background: var(--nm-surface-strong);
    border: 1px solid var(--nm-border);
    transition: background 0.2s ease;
}

.block-doclist-link:hover {
    background: var(--nm-surface-bright);
}

.block-doclist-ext {
    flex-shrink: 0;
    padding: 0.3rem 0.55rem;
    border-radius: 8px;
    background: rgba(232,56,79,0.12);
    color: var(--nm-red);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.block-doclist-ext a{
    text-decoration: none;
}

.block-doclist-ext--pdf {
    background: rgba(248,113,113,0.16);
    color: #f87171;
}

.block-doclist-ext--doc, .block-doclist-ext--docx {
    background: rgba(96,165,250,0.16);
    color: #60a5fa;
}

.block-doclist-ext--xls, .block-doclist-ext--xlsx {
    background: rgba(139,195,74,0.18);
    color: var(--nm-green);
}

.block-doclist-ext--ppt, .block-doclist-ext--pptx {
    background: rgba(251,146,60,0.16);
    color: #fb923c;
}

.block-doclist-ext--jpg, .block-doclist-ext--jpeg, .block-doclist-ext--png {
    background: rgba(192,132,252,0.16);
    color: #c084fc;
}

.block-doclist-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--nm-text);
}

.block-doclist-size {
    flex: 0 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: var(--nm-muted);
    font-size: 0.85rem;
}

.block-doclist-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nm-red);
}

.block-doclist-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    top: -100%;
    background: #fff;
    transition: top 0.25s ease-in-out;
}

.block-doclist-icon svg {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    color: #05121f;
    transition: color 0.25s ease-in-out;
}

.block-doclist-link:hover .block-doclist-icon::before {
    top: 0;
}

.block-doclist-link:hover .block-doclist-icon svg {
    color: var(--nm-red);
}

.block-doclist-preview {
    position: absolute;
    top: 50%;
    right: 4.25rem;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--nm-surface);
    border: 1px solid var(--nm-border);
    cursor: pointer;
    z-index: 1;
}

.block-doclist-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    top: 100%;
    background: var(--nm-red);
    transition: top 0.25s ease-in-out;
}

.block-doclist-preview svg {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    color: var(--nm-text);
    transition: color 0.25s ease-in-out;
}

.block-doclist-preview:hover::before,
.block-doclist-preview:focus-visible::before {
    top: 0;
}

.block-doclist-preview:hover svg,
.block-doclist-preview:focus-visible svg {
    color: #ffffff;
}

@media (max-width: 768px) {
    .block-doclist-size {
        flex-basis: 100%;
    }
}

@media (max-width: 480px) {
    .block-doclist-link {
        padding-right: 6.5rem;
    }

    .block-doclist-icon {
        right: 0.5rem;
    }

    .block-doclist-preview {
        right: 3.25rem;
    }
}
