/* Keep these controls above the template’s .six-postcontent a:link rules. */
.pd-file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .35rem 0; }
#phoca-dl-category-box .pd-file-actions { justify-content: flex-end; }
.pd-file-item.pd-file-item, .pd-file-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pd-file-item.pd-file-item { padding: .5rem .625rem; background-image: none; }
.pd-file-item > .pd-file-info, .pd-file-item > [class*="pd-document"], .pd-file-row > .pd-filenamebox { flex: 1 1 auto; min-width: 0; }
.pd-file-item.phoca-dl-file-box-mod > [class*="pd-document"] { height: auto; min-height: 32px; line-height: normal; }
.pd-file-item > .pd-file-actions, .pd-file-row > .pd-file-actions { flex: 0 0 auto; margin: 0; }
#phoca-dl-category-box .pd-file-row > .pd-filenamebox { float: none; margin: 0; }
#phoca-dl-category-box .pd-file-row .pd-filename { margin-top: 2px; margin-bottom: 0; }
#phoca-dl-category-box .pd-file-row [class*="pd-document"] { height: auto; }
.pd-file-info { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.pd-file-type-icon { display: inline-flex; flex: 0 0 24px; align-items: center; justify-content: center; width: 24px; }
.pd-file-type-icon img { display: block; width: 24px; height: 24px; max-width: none; margin: 0; object-fit: contain; }
.pd-file-label { min-width: 0; line-height: 1.4; overflow-wrap: anywhere; }
.pd-file-title { line-height: 1.35; }
.pd-file-name { color: #526675; font-size: 12px; font-weight: 400; line-height: 1.35; overflow-wrap: anywhere; }
.pd-file-item + .pd-file-item { border-top: 1px solid #e2e8f0; }
.pd-action.pd-action.pd-action { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; box-sizing: border-box; min-height: 34px; height: auto; max-width: 100%; padding: .375rem .75rem; border: 1px solid transparent; border-radius: 3px; margin: 0; font-family: Montserrat, 'Open Sans', Arial, sans-serif; font-size: 13px; font-weight: 600; line-height: 1.35; letter-spacing: .01em; text-align: center; text-decoration: none; white-space: normal; vertical-align: middle; cursor: pointer; background-image: none; box-shadow: none; transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
.pd-action.pd-action.pd-action--preview, .pd-action.pd-action.pd-action--preview:visited { color: #fff; background-color: #00205b; border-color: #00205b; }
.pd-action.pd-action.pd-action--download, .pd-action.pd-action.pd-action--download:visited { color: #00205b; background-color: #fff; border-color: #bac9dc; }
.pd-action.pd-action.pd-action--preview:hover { color: #fff; background-color: #003477; border-color: #003477; box-shadow: 0 5px 14px #00205b26; transform: translateY(-1px); text-decoration: none; }
.pd-action.pd-action.pd-action--download:hover { color: #00205b; background-color: #eaf8fa; border-color: #00aec7; box-shadow: 0 4px 12px #00205b12; transform: translateY(-1px); text-decoration: none; }
.pd-action.pd-action.pd-action:focus-visible { outline: 3px solid #00aec7; outline-offset: 3px; box-shadow: 0 0 0 1px #00205b; }
.pd-action.pd-action.pd-action:active { transform: translateY(0); box-shadow: none; }
.pd-action.pd-action.pd-action:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.pd-action .pd-action-icon { display: block; flex: 0 0 20px; width: 20px; height: 20px; margin: 0; transition: transform .18s ease; }
.pd-action--download:hover .pd-action-icon { transform: translateY(1px); }
a.pd-file-link.pd-file-link, a.pd-file-link.pd-file-link:visited { color: #00205b; font-weight: 400; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .22em; text-decoration-thickness: 2px; overflow-wrap: anywhere; transition: color .18s ease, text-decoration-color .18s ease; }
.pd-file-title a.pd-file-link.pd-file-link, .pd-title a.pd-file-link.pd-file-link { font-weight: 600; }
.pd-file-name a.pd-file-link.pd-file-link { color: #526675; }
a.pd-file-link.pd-file-link:hover { color: #003477; text-decoration-color: #00aec7; }
a.pd-file-link.pd-file-link:focus-visible { outline: 3px solid #00aec7; outline-offset: 4px; border-radius: 2px; }

.pd-preview-embed { display: block; max-width: 100%; border: 1px solid #d9dfe3; }
.pd-preview-dialog { box-sizing: border-box; width: min(1400px, calc(100% - 16px)); height: calc(100vh - 16px); height: calc(100dvh - 16px); max-width: calc(100% - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 16px 70px #0006; }
.pd-preview-dialog[open] { display: flex; flex-direction: column; }
.pd-preview-dialog::backdrop { background: #111b; }
.pd-preview-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem .5rem; background: #f4f7fb; border-bottom: 2px solid #00aec7; color: #00205b; font: 14px 'Open Sans', Arial, sans-serif; }
.pd-preview-toolbar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-preview-toolbar-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.pd-preview-toolbar button, .pd-preview-page button, .pd-preview-toolbar a.pd-preview-new-tab { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 34px; border: 1px solid #00205b; border-radius: 3px; padding: .375rem .75rem; background: #00205b; color: #fff; font: 13px/1.35 'Open Sans', Arial, sans-serif; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color .18s ease, box-shadow .18s ease; }
.pd-preview-toolbar a.pd-preview-new-tab { color: #00205b; background: #fff; border-color: #bac9dc; }
.pd-preview-toolbar a.pd-preview-new-tab:hover { color: #00205b; background: #eaf8fa; border-color: #00aec7; text-decoration: none; }
.pd-preview-toolbar button:hover, .pd-preview-page button:hover { background: #003477; box-shadow: 0 4px 12px #00205b26; }
.pd-preview-dialog > iframe { display: block; flex: 1 1 auto; min-height: 0; width: 100%; border: 0; }
.pd-preview-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; margin: 0; color: #172b3a; background: #f5f7f9; font: 16px/1.5 system-ui, sans-serif; }
.pd-preview-page * { box-sizing: border-box; }
.pd-preview-page header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: .5rem; padding: .375rem .75rem; background: #fff; border-bottom: 1px solid #d9dfe3; }
.pd-preview-page header > div { min-width: 0; }
.pd-preview-page header > .pd-action { flex-shrink: 0; }
.pd-preview-page h1 { margin: 0; overflow: hidden; font-size: 1rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.pd-preview-page h2 { font-size: 1.1rem; }
.pd-preview-eyebrow { display: none; }
.pd-preview-page main { flex: 1 1 auto; min-height: 0; padding: .5rem .75rem; overflow: auto; }
.pd-preview-page pre { margin: 0; padding: 1.25rem; background: #fff; border: 1px solid #d9dfe3; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.pd-preview-page a:not(.pd-action) { color: #00205b; text-decoration: underline; }
.pd-preview-download { flex-shrink: 0; }
.pd-preview-media { display: flex; align-items: center; justify-content: center; min-height: 200px; padding: 1rem; background: #e9edf0; border-radius: 6px; }
.pd-preview-media img, .pd-preview-media video { max-width: 100%; max-height: 72vh; object-fit: contain; }
.pd-preview-media audio { width: min(100%, 650px); }
.pd-preview-pdf { display: block; width: 100%; height: 74vh; border: 1px solid #d9dfe3; background: #fff; }
/* Give the PDF the space left after the actual header and help text heights. */
.pd-preview-page main:has(> .pd-preview-pdf) { display: flex; flex-direction: column; gap: .25rem; overflow: hidden; }
.pd-preview-page main:has(> .pd-preview-pdf) > .pd-preview-pdf { flex: 1 1 0; min-height: 0; height: 0; }
.pd-preview-page main:has(> .pd-preview-pdf) > p { flex: 0 0 auto; margin: 0; font-size: .8rem; }
.pd-preview-note { color: #526675; font-size: .9rem; }
.pd-preview-table { overflow: auto; max-height: 65vh; }
.pd-preview-page table { border-collapse: collapse; background: #fff; }
.pd-preview-page td { border: 1px solid #c9d3da; padding: .4rem .6rem; min-width: 5rem; max-width: 30rem; overflow-wrap: anywhere; }
.pd-preview-slide, .pd-preview-license { padding: 1rem 1.5rem; margin-bottom: 1rem; border: 1px solid #d9dfe3; border-radius: 6px; background: #fff; }
.pd-preview-page :focus-visible, .pd-preview-toolbar :focus-visible { outline: 3px solid #00aec7; outline-offset: 3px; }
@media (max-width: 600px), (max-height: 480px) {
    .pd-preview-page header { padding: .25rem .5rem; }
    .pd-preview-page header .pd-action { padding: .375rem .5rem; font-size: 12px; }
    .pd-preview-page main { padding: .25rem; }
    .pd-preview-dialog { width: 100%; height: 100vh; height: 100dvh; max-width: 100%; max-height: 100vh; max-height: 100dvh; border-radius: 0; }
    .pd-preview-toolbar > span { display: none; }
}
@media (max-width: 767px) {
    .pd-file-item.pd-file-item, .pd-file-row { flex-direction: column; align-items: stretch; gap: .5rem; }
    .pd-file-item > .pd-file-actions, .pd-file-row > .pd-file-actions { flex: none; }
    #phoca-dl-category-box .pd-file-row .pd-file-actions { justify-content: flex-start; }
}
@media (max-width: 420px) {
    .pd-file-actions { gap: .5rem; }
    .pd-file-actions .pd-action { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .pd-action.pd-action.pd-action, .pd-action .pd-action-icon, a.pd-file-link.pd-file-link { transition: none; }
    .pd-action.pd-action.pd-action:hover, .pd-action--download:hover .pd-action-icon { transform: none; }
}
