/* Container Download + Report */
.dlbeacon-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin: 8px 0;
}


/* Download beacon */
.dlbeacon {
    --beacon-background: #ffffff;
    --beacon-border: #c9ced8;
    --beacon-border-hover: #9da5b2;
    --beacon-title: #1a1a1a;
    --beacon-meta: #6b6b6b;

    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-rows: auto auto;
    width: fit-content;
    min-width: 220px;
    max-width: 360px;
    overflow: hidden;
    border: 1px solid var(--beacon-border);
    border-radius: 12px;
    background: var(--beacon-background);
    color: inherit;
    text-decoration: none !important;
    box-shadow: none;
    box-sizing: border-box;
}

.dlbeacon:hover {
    border-color: var(--beacon-border-hover);
    text-decoration: none !important;
}

.dlbeacon:focus-visible {
    outline: 3px solid rgba(47, 147, 201, 0.25);
    outline-offset: 2px;
}

/* Icon */
.dlbeacon-icon {
    display: flex;
    grid-column: 1;
    grid-row: 1 / 3;
    align-items: center;
    justify-content: center;
    width: 50px;
    color: #ffffff;
    box-sizing: border-box;
}

.dlbeacon-icon i {
    font-size: 18px;
}

/* Titlu și informații */
.dlbeacon-title,
.dlbeacon-meta {
    display: block;
    grid-column: 2;
    min-width: 0;
    overflow: hidden;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none !important;
    box-sizing: border-box;
}

.dlbeacon-title {
    grid-row: 1;
    align-self: end;
    padding: 10px 14px 0;
    color: var(--beacon-title);
    font-size: 14px;
    font-weight: 700;
}

.dlbeacon-meta {
    grid-row: 2;
    align-self: start;
    padding: 2px 14px 10px;
    color: var(--beacon-meta);
    font-size: 12px;
}

/* Culori icon */
.dlbeacon-light-blue .dlbeacon-icon {
    background: #505dd8;
}

.dlbeacon-purple .dlbeacon-icon {
    background: #7457c2;
}

.dlbeacon-green .dlbeacon-icon {
    background: #4cb973;
}

/* VirusTotal — light mode */
.dlbeacon-virustotal {
    --beacon-border: #aeb5e8;
    --beacon-border-hover: #7f89d8;
}

/* Stări fișier */
.dlbeacon-missing,
.dlbeacon-invalid {
    opacity: 0.6;
}

/* Buton Report */
.dlbeacon-report {
    --report-background: #ffffff;
    --report-background-hover: #fff3f3;
    --report-border: #c9ced8;
    --report-border-hover: #df8d8d;
    --report-color: #8a8a8a;
    --report-color-hover: #c43c3c;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--report-border);
    border-radius: 10px;
    background: var(--report-background);
    color: var(--report-color);
    cursor: pointer;
    box-shadow: none;
    box-sizing: border-box;
}

.dlbeacon-report:hover {
    border-color: var(--report-border-hover);
    background: var(--report-background-hover);
    color: var(--report-color-hover);
}

.dlbeacon-report:focus-visible {
    outline: 3px solid rgba(196, 60, 60, 0.2);
    outline-offset: 2px;
}

.dlbeacon-report svg {
    display: block;
}

/* Dark mode — Download */
.dark .dlbeacon {
    --beacon-background: #12843b;
    --beacon-border: rgba(255, 255, 255, 0.1);
    --beacon-border-hover: rgba(255, 255, 255, 0.18);
    --beacon-title: #f1f4fa;
    --beacon-meta: #dfdfdf;
}

/* Dark mode — VirusTotal */
.dark .dlbeacon-virustotal {
    --beacon-background: #3c4ac2;
    --beacon-title: #ffffff;
    --beacon-meta: rgba(255, 255, 255, 0.72);
}

/* Dark mode — Report */
.dark .dlbeacon-report {
    --report-background: #302438;
    --report-background-hover: #3b2943;
    --report-border: rgba(255, 105, 105, 0.35);
    --report-border-hover: rgba(255, 105, 105, 0.55);
    --report-color: #ff7373;
    --report-color-hover: #ff8a8a;
}

.dark .dlbeacon-report:focus-visible {
    outline-color: rgba(255, 115, 115, 0.3);
}

/* Ecrane mici */
@media (max-width: 480px) {
    .dlbeacon-wrap {
        width: 100%;
    }

    .dlbeacon {
        flex: 1;
        width: auto;
        min-width: 0;
    }
}





/* Buton Download */
.file-button,
.attachement_file {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border: none;
    background-color: #28a745;
    color: white;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.file-button:hover,
.attachement_file:hover {
    background-color: #218838; /* Verde mai închis la hover */
    color: white;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.file-button .iconify,
.attachement_file .iconify {
    margin-right: 8px; /* Spațiu între icon și text */
    font-size: 20px; /* Dimensiunea icon-ului */
}


.download-blocks {
  display: flex !important;
  justify-content: center !important; /* horizontal */
  align-items: center !important;    /* vertical */
}
/* Shared modern download button; native click/verification behavior is unchanged. */
:is(a.dlbeacon-green,.file-button,.attachement_file) {
 display:inline-flex; align-items:center; justify-content:flex-start; gap:12px;
 width:fit-content; min-width:0; max-width:100%; min-height:60px;
 padding:11px 16px 11px 12px; margin:0; box-sizing:border-box;
 border:1px solid #ccdcd2; border-radius:12px; background:#f7fcf9;
 color:#173c28!important; font-family:inherit; font-size:14px; font-weight:600; line-height:1.4;
 text-decoration:none!important; box-shadow:none; cursor:pointer;
 transition:background-color .15s ease,border-color .15s ease;
}
:is(a.dlbeacon-green,.file-button,.attachement_file):hover {
 background:#edf8f1; border-color:#77b58f; color:#123d25!important; box-shadow:none;
 text-decoration:none!important;
}
:is(a.dlbeacon-green,.file-button,.attachement_file):focus-visible {
 outline:3px solid rgb(22 128 74 / .4); outline-offset:3px;
}
.dark :is(a.dlbeacon-green,.file-button,.attachement_file) {
 background:#142c22; border-color:#315540; color:#d8f5e3!important;
}
.dark :is(a.dlbeacon-green,.file-button,.attachement_file):hover {
 background:#1b392a; border-color:#609c75; color:#f0fff6!important;
}
a.dlbeacon-green .dlbeacon-icon {
 display:inline-flex; flex:none; align-items:center; justify-content:center;
 width:36px; height:36px; padding:8px; border-radius:9px;
 background:#dcefe3; color:#18733e; box-sizing:border-box;
}
.dlbeacon-icon svg { display:block; width:20px; height:20px; flex:none; }
a.dlbeacon-green .ds-download-copy {
 display:flex; flex-direction:column; align-items:flex-start; justify-content:center;
 gap:2px; min-width:0;
}
a.dlbeacon-green .dlbeacon-title {
 display:block; align-self:auto; padding:0; color:inherit; font-size:14px; font-weight:600; line-height:1.4;
}
a.dlbeacon-green .dlbeacon-meta {
 display:block; align-self:auto; padding:0; color:#4e6a58; font-size:12px;
 line-height:1.4; opacity:1; max-width:32ch;
}
:is(.file-button,.attachement_file) .iconify {
 flex:none; width:36px; height:36px; margin:0; padding:8px; border-radius:9px;
 background:#dcefe3; color:#18733e; font-size:20px; box-sizing:border-box;
}
.dark :is(a.dlbeacon-green .dlbeacon-icon,.file-button .iconify,.attachement_file .iconify) {
 background:#244c34; color:#a7e8bd;
}
.dark a.dlbeacon-green .dlbeacon-meta { color:#aecdb8; }
.dlbeacon[aria-disabled="true"] { opacity:.6; cursor:not-allowed; }
@media(max-width:480px) {
 a.dlbeacon-green { width:fit-content; min-width:0; max-width:100%; }
 a.dlbeacon-green .dlbeacon-meta { max-width:22ch; }
}
@media(prefers-reduced-motion:reduce) { .dlbeacon,.file-button,.attachement_file { transition:none; } }

/* Same SVG and icon tile for internal attachments and external downloads. */
:is(.file-button,.attachement_file) .dlbeacon-icon{display:inline-flex;flex:none;align-items:center;justify-content:center;width:36px;height:36px;padding:8px;border-radius:9px;background:#dcefe3;color:#18733e;box-sizing:border-box}
.dark :is(.file-button,.attachement_file) .dlbeacon-icon{background:#244c34;color:#a7e8bd}
