/* PDF preview card — same plate look as the .link-list block: a row
   on surface-soft with a brand-filled icon column on the left, body
   in the middle, and a stack of square brand-filled action tiles on
   the right (eye + download). Visually mirrors news-single attached
   files so PDFs read consistently across the site. */
.universalis-pdf-card {
    display: flex;
    align-items: stretch;
    background-color: var(--c-surface-soft);
    margin: 1rem 0;
    transition: background-color 0.4s ease;
    font-family: Montserrat, sans-serif;
}

.universalis-pdf-card:hover {
    background-color: color-mix(in srgb, var(--c-brand) 8%, var(--c-surface-soft));
}

/* Left icon column — brand fill, white doc glyph + "PDF" badge,
   fixed 64px wide so multiple cards line up vertically. */
.universalis-pdf-card__icon {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 64px;
    background-color: var(--c-brand);
    color: var(--c-surface);
}

.universalis-pdf-card__ext {
    font-weight: 700;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.06em;
    color: var(--c-surface);
}

.universalis-pdf-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
}

.universalis-pdf-card__name {
    font-weight: 600;
    font-size: 16px;
    line-height: 22px;
    color: var(--c-text);
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.4s ease;
}

.universalis-pdf-card:hover .universalis-pdf-card__name {
    color: var(--c-brand);
}

.universalis-pdf-card__info {
    font-weight: 400;
    font-size: 13px;
    line-height: 18px;
    color: var(--c-text);
    opacity: 0.7;
}

/* Right action tiles — square, brand-filled like the icon column,
   stack horizontally. Same height as the card so they read as
   peers of the file-icon plate, not as floating buttons. Hover
   darkens, focus-visible gets a brand-coloured outline. */
.universalis-pdf-card__action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    background-color: var(--c-brand);
    color: var(--c-surface);
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-left: 1px solid color-mix(in srgb, var(--c-surface) 20%, transparent);
}

.universalis-pdf-card__action:hover,
.universalis-pdf-card__action:focus-visible {
    background-color: var(--c-brand-dark, color-mix(in srgb, #000 18%, var(--c-brand)));
    color: var(--c-surface);
    outline: none;
}

.universalis-pdf-card__action svg {
    display: block;
}

/* Force the surface colour onto the SVG strokes — site-wide <a>
   styles set color: var(--c-brand) on links, which makes
   currentColor resolve to brand and the icon disappear against the
   brand-coloured tile. Hardcoding the stroke here wins regardless. */
.universalis-pdf-card__action svg path,
.universalis-pdf-card__action svg circle {
    stroke: var(--c-surface);
}

@media (max-width: 600px) {
    /* Compact layout — buttons stay inline but icon column shrinks
       and body padding tightens so a long filename doesn't push the
       actions off-screen. */
    .universalis-pdf-card__icon,
    .universalis-pdf-card__action {
        width: 52px;
    }
    .universalis-pdf-card__body {
        padding: 12px 14px;
    }
}

/* Inline mode — straightforward iframe wrapper. Width is set on the
   wrapper so editors can centre/constrain via the shortcode without
   dealing with iframe sizing quirks; height passes through to the
   iframe directly. */
.universalis-pdf-inline {
    margin: 1rem auto;
}
.universalis-pdf-inline__frame {
    display: block;
    width: 100%;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.12));
    background: var(--c-surface-soft, #fafafa);
}
