/* Paper action buttons (Abstract, Download, XML, e-Pub, Video, Audio, Citation,
   Certificate): the paper cards (includes/paper_item.php) and the article page
   (view_issue.php). Always on one line.

   The default is the narrow form: equal-width icon buttons (each link keeps its
   label as title/aria-label). Where there is room the page switches to labels
   by setting the --pa-* variables: paper-list.css from the card's width
   (container queries), view_issue.php from the screen width (media queries).

   Size: buttons with labels are 31px tall (Bootstrap's .btn-sm height); the
   icon-only buttons on phones stay 36px so they are easy to tap.

   Colours are set per button class, not by position, so a missing button
   never shifts the others' colours. */
.paper-actions {
    --pa-label: none;      /* label text; none = icon only */
    --pa-icon: inline-block; /* the icon; none = label only */
    --pa-item: 1 1 0;      /* flex of each button; 1 1 0 = equal widths */
    --pa-min: 0;           /* buttons may shrink only while they are icons */
    --pa-h: 36px;          /* button height */
    --pa-pad: 0;
    --pa-fs: 15px;
    --pa-gap: 5px;
    display: flex;
    flex-wrap: nowrap;
    gap: var(--pa-gap);
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

.paper-actions li {
    flex: var(--pa-item);
    min-width: var(--pa-min);
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    list-style: none;
}

.paper-actions li a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: var(--pa-h);
    padding: var(--pa-pad);
    border-radius: 6px;
    font-size: var(--pa-fs);
    font-weight: 600;
    line-height: 1.2;
    color: #fff !important;
    text-decoration: none;
    white-space: nowrap;
    transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}

.paper-actions .pa-label {
    display: var(--pa-label);
}

.paper-actions li a > i {
    display: var(--pa-icon);
}

.paper-actions li a:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
}

.paper-actions li a:focus-visible {
    outline: 3px solid rgba(7, 91, 81, .35);
    outline-offset: 2px;
}

.paper-actions li a.pa-abstract    { background: #2e7d32; }
.paper-actions li a.pa-download    { background: #e0a526; }
.paper-actions li a.pa-xml         { background: #5b1f86; }
.paper-actions li a.pa-epub        { background: #0e9b8a; }
.paper-actions li a.pa-video       { background: #b4470f; }
.paper-actions li a.pa-audio       { background: #1f7fcf; }
.paper-actions li a.pa-citation    { background: #e91e63; }
.paper-actions li a.pa-certificate { background: #6c757d; }
