/* Parts that the WordPress theme did not have: attachment block, PDF viewer, expired labels. */

.co-attachments { margin: 18pt 0; }
.co-attachments__title { font-size: 20px; color: darkblue; margin: 0 0 8px; }
.co-attachments__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.co-attachment { display: flex; gap: 14px; align-items: flex-start; border: 1px solid #ddd; border-radius: 4px; padding: 10px; background: #fafafa; }
.co-attachment__thumb { flex: 0 0 90px; height: 116px; border: 1px solid #ddd; background: #fff; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.co-attachment__thumb:disabled { cursor: default; }
.co-attachment__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.co-attachment__ext { font-weight: 700; color: #107623; font-size: 14px; }
.co-attachment__body { flex: 1; min-width: 0; }
.co-attachment__name { font-weight: 600; color: #222; word-break: break-word; line-height: 1.3; }
.co-attachment__meta { font-size: 14px; color: #666; margin: 4px 0 8px; }
.co-attachment__badge { display: inline-block; background: #107623; color: #fff; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 3px; margin-right: 6px; }
.co-attachment__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.co-btn { display: inline-block; background: #107623; color: #fff !important; border: 1px solid #107623; border-radius: 3px; padding: 4px 14px; font-size: 15px; line-height: 1.5; cursor: pointer; text-decoration: none !important; }
.co-btn:hover { background: #0c5c1b; }
.co-btn--outline { background: #fff; color: #107623 !important; }
.co-btn--outline:hover { background: #f0f7f1; }

.co-viewer { position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, .75); display: flex; flex-direction: column; }
.co-viewer__bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #fff; padding: 8px 12px; font-size: 15px; }
.co-viewer__title { flex: 1; min-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-viewer__pages { color: #666; }
.co-viewer__bar select, .co-viewer__find input { font-size: 14px; padding: 2px 6px; border: 1px solid #ccc; border-radius: 3px; }
.co-viewer__body { flex: 1; position: relative; }
.co-viewer__container { position: absolute; inset: 0; overflow: auto; background: #525659; }
.co-viewer__error { color: #fff; text-align: center; padding: 40px; }

.co-expired-label { display: inline-block; color: #b91c1c; font-weight: 600; font-size: 14px; margin: 0; }
.co-expired-banner { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 3px; padding: 6px 10px; font-size: 15px; margin: 6px 0 10px; }

@media (max-width: 600px) {
  .co-attachment__thumb { flex-basis: 64px; height: 84px; }
}

/* /document/<id> when no preview exists yet */
.co-document-fallback { max-width: 640px; margin: 80px auto; padding: 0 16px; font-family: inherit; }
.co-document-fallback h1 { font-size: 22px; margin-bottom: 8px; word-break: break-word; }
.co-document-fallback p { margin: 12px 0; color: #444; }
