/* Theme colour for every Documents button/badge (admin preview overrides inline) */
:root { --wdoc-primary: #0D7535; --wdoc-btn: #0D7535; --wdoc-btn-hover: #0a5d2a; }
/* Webber Documents — Frontend CSS */

/* ── Layouts ──────────────────────────────────────────────── */
.wdoc-library { margin: 20px 0; }
.wdoc-grid { display: grid; gap: 20px; }
.wdoc-layout-grid .wdoc-grid { grid-template-columns: repeat(var(--wdoc-columns, 3), 1fr); }
.wdoc-layout-list .wdoc-grid { grid-template-columns: 1fr; }
.wdoc-layout-cards .wdoc-grid { grid-template-columns: repeat(var(--wdoc-columns, 3), 1fr); }
.wdoc-layout-table .wdoc-grid { grid-template-columns: 1fr; }
.wdoc-layout-accordion .wdoc-grid { grid-template-columns: 1fr; }

/* ── Card ─────────────────────────────────────────────────── */
.wdoc-card { background: var(--wdoc-bg, #fff); border: 1px solid #e2e8f0; border-radius: var(--wdoc-radius, 8px); overflow: hidden; transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; }
.wdoc-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.wdoc-card-thumb { position: relative; overflow: hidden; }
.wdoc-thumb-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.wdoc-badge { position: absolute; top: 8px; right: 8px; background: var(--wdoc-primary, #2563eb); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.wdoc-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.wdoc-card-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.wdoc-file-icon { flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: #f0f6ff; border-radius: 8px; color: var(--wdoc-primary, #2563eb); }
.wdoc-card-title-wrap { flex: 1; min-width: 0; }
.wdoc-card-title { font-size: 15px; font-weight: 600; margin: 0; line-height: 1.4; color: var(--wdoc-text, #1f2937); }
.wdoc-card-title a { color: inherit; text-decoration: none; }
.wdoc-card-title a:hover { color: var(--wdoc-primary, #2563eb); }
.wdoc-card-dept { font-size: 12px; color: #6b7280; margin-top: 2px; display: block; }
.wdoc-card-excerpt { font-size: 13px; color: #6b7280; line-height: 1.5; margin-bottom: 10px; flex: 1; }

/* ── Meta ─────────────────────────────────────────────────── */
.wdoc-card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.wdoc-meta-item { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #6b7280; background: #f3f4f6; padding: 2px 8px; border-radius: 4px; }
.wdoc-meta-type { background: #ede9fe; color: #5b21b6; font-weight: 600; }

/* ── Actions ──────────────────────────────────────────────── */
.wdoc-card-actions { display: flex; gap: 8px; margin-top: auto; }
.wdoc-download-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--wdoc-btn, #2563eb); color: #fff !important; border: none; border-radius: var(--wdoc-radius, 8px); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .2s; flex: 1; justify-content: center; }
.wdoc-download-btn:hover { background: var(--wdoc-btn-hover, #1d4ed8); }
.wdoc-view-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: #f3f4f6; color: var(--wdoc-text, #1f2937) !important; border: 1px solid #e5e7eb; border-radius: var(--wdoc-radius, 8px); font-size: 13px; font-weight: 500; text-decoration: none; transition: background .2s; }
.wdoc-view-btn:hover { background: #e5e7eb; }

/* ── List Layout ──────────────────────────────────────────── */
.wdoc-layout-list .wdoc-card { flex-direction: row; }
.wdoc-layout-list .wdoc-card-thumb { width: 120px; flex-shrink: 0; }
.wdoc-layout-list .wdoc-thumb-img { height: 100%; }
.wdoc-layout-list .wdoc-card-body { padding: 12px 16px; }
.wdoc-layout-list .wdoc-card-actions { justify-content: flex-start; }

/* ── Table Layout ─────────────────────────────────────────── */
.wdoc-layout-table .wdoc-grid { display: block; }

/* ── Accordion Layout ─────────────────────────────────────── */
.wdoc-layout-accordion .wdoc-card { border-radius: 0; border: none; border-bottom: 1px solid #e5e7eb; }
.wdoc-layout-accordion .wdoc-card:hover { box-shadow: none; transform: none; }
.wdoc-layout-accordion .wdoc-card-thumb { display: none; }
.wdoc-accordion-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; cursor: pointer; background: #f9fafb; border: 1px solid #e5e7eb; transition: background .2s; }
.wdoc-accordion-header:hover { background: #f3f4f6; }
.wdoc-accordion-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.wdoc-accordion-open .wdoc-accordion-body { max-height: 500px; }
.wdoc-accordion-body-inner { padding: 16px; }

/* ── Search ───────────────────────────────────────────────── */
.wdoc-live-search { margin-bottom: 20px; }
.wdoc-search-input-group { display: flex; gap: 0; max-width: 500px; }
.wdoc-search-input { flex: 1; padding: 10px 14px; border: 2px solid #e5e7eb; border-radius: var(--wdoc-radius, 8px) 0 0 var(--wdoc-radius, 8px); font-size: 14px; outline: none; transition: border-color .2s; }
.wdoc-search-input:focus { border-color: var(--wdoc-primary, #2563eb); }
.wdoc-search-btn { padding: 10px 16px; background: var(--wdoc-primary, #2563eb); color: #fff; border: none; border-radius: 0 var(--wdoc-radius, 8px) var(--wdoc-radius, 8px) 0; cursor: pointer; }
.wdoc-search-btn:hover { background: var(--wdoc-btn-hover, #1d4ed8); }
.wdoc-search-clear { padding: 10px 12px; background: #f3f4f6; border: 2px solid #e5e7eb; border-left: none; border-radius: 0 var(--wdoc-radius, 8px) var(--wdoc-radius, 8px) 0; cursor: pointer; font-size: 18px; color: #6b7280; }
.wdoc-search-results { margin-top: 12px; }
.wdoc-search-result { padding: 12px; border: 1px solid #e5e7eb; border-radius: var(--wdoc-radius, 8px); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wdoc-search-result:hover { background: #f9fafb; }
.wdoc-result-title { font-weight: 600; color: var(--wdoc-text, #1f2937); text-decoration: none; }
.wdoc-result-title:hover { color: var(--wdoc-primary, #2563eb); }
.wdoc-result-meta { font-size: 12px; color: #6b7280; }
.wdoc-result-download { font-size: 12px; color: var(--wdoc-primary, #2563eb); text-decoration: none; font-weight: 600; white-space: nowrap; }
.wdoc-result-download:hover { text-decoration: underline; }
.wdoc-results-count { font-size: 13px; color: #6b7280; margin-bottom: 12px; }

/* ── Categories ───────────────────────────────────────────── */
.wdoc-cat-list { list-style: none; padding: 0; margin: 0; }
.wdoc-cat-item { margin-bottom: 4px; }
.wdoc-cat-link { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: var(--wdoc-radius, 8px); text-decoration: none; color: var(--wdoc-text, #1f2937); font-weight: 500; transition: all .2s; }
.wdoc-cat-link:hover { background: #f0f6ff; border-color: var(--wdoc-primary, #2563eb); color: var(--wdoc-primary, #2563eb); }
.wdoc-cat-count { font-size: 12px; color: #9ca3af; font-weight: 400; }
.wdoc-cat-children { list-style: none; padding-left: 24px; margin-top: 4px; }
.wdoc-cat-children li { margin-bottom: 2px; }
.wdoc-cat-children a { display: block; padding: 6px 12px; font-size: 13px; color: #4b5563; text-decoration: none; border-radius: 6px; }
.wdoc-cat-children a:hover { background: #f0f6ff; color: var(--wdoc-primary, #2563eb); }

/* ── Stats Shortcode ──────────────────────────────────────── */
.wdoc-stats-shortcode { margin: 20px 0; }
.wdoc-stats-row { display: flex; flex-wrap: wrap; gap: 20px; }
.wdoc-stat-item { flex: 1; min-width: 140px; background: var(--wdoc-bg, #fff); border: 1px solid #e2e8f0; border-radius: var(--wdoc-radius, 8px); padding: 20px; text-align: center; }
.wdoc-stat-number { font-size: 32px; font-weight: 700; color: var(--wdoc-primary, #2563eb); display: block; }
.wdoc-stat-label { font-size: 13px; color: #6b7280; margin-top: 4px; display: block; }

/* ── Pagination ───────────────────────────────────────────── */

/* ── Empty / Loading ──────────────────────────────────────── */
.wdoc-empty { text-align: center; padding: 40px; color: #9ca3af; font-style: italic; }
.wdoc-loading { text-align: center; padding: 20px; color: #6b7280; }
.wdoc-no-results { text-align: center; padding: 20px; color: #9ca3af; }
.wdoc-error { text-align: center; padding: 20px; color: #dc2626; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .wdoc-layout-grid .wdoc-grid,
  .wdoc-layout-cards .wdoc-grid { grid-template-columns: 1fr; }
  .wdoc-layout-list .wdoc-card { flex-direction: column; }
  .wdoc-layout-list .wdoc-card-thumb { width: 100%; height: 150px; }
  .wdoc-layout-table .wdoc-card { flex-direction: column; align-items: flex-start; }
  .wdoc-card-actions { flex-direction: column; }
  .wdoc-download-btn, .wdoc-view-btn { width: 100%; justify-content: center; }
  .wdoc-stats-row { flex-direction: column; }
  .wdoc-search-result { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .wdoc-layout-grid .wdoc-grid,
  .wdoc-layout-cards .wdoc-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Accessibility ────────────────────────────────────────── */
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.wdoc-download-btn:focus-visible,
.wdoc-view-btn:focus-visible,
.wdoc-cat-link:focus-visible,
.wdoc-search-btn:focus-visible { outline: 3px solid var(--wdoc-primary, #2563eb); outline-offset: 2px; }

/* ── High Contrast ────────────────────────────────────────── */
@media (prefers-contrast: high) {
  .wdoc-card { border-width: 2px; }
  .wdoc-download-btn { border: 2px solid #000; }
}

/* ── Datatable Layout ─────────────────────────────────────── */
.wdoc-datatable-wrap { overflow-x: auto; margin: 20px 0; }
.wdoc-datatable { width: 100%; border-collapse: collapse; background: var(--wdoc-bg, #fff); border: 1px solid #e2e8f0; border-radius: var(--wdoc-radius, 8px); overflow: hidden; font-size: 14px; }
.wdoc-datatable thead { background: #f8fafc; }
.wdoc-datatable th { padding: 12px 16px; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #475569; border-bottom: 2px solid #e2e8f0; white-space: nowrap; user-select: none; }
.wdoc-datatable td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.wdoc-datatable tbody tr:hover { background: #f8fafc; }
.wdoc-dt-row.wdoc-dt-featured { background: #fffbeb; }
.wdoc-dt-row.wdoc-dt-featured:hover { background: #fef3c7; }

/* Sortable columns */
.wdoc-dt-sortable { cursor: pointer; position: relative; padding-right: 24px !important; }
.wdoc-dt-sortable:hover { color: var(--wdoc-primary, #2563eb); }
.wdoc-dt-sort-icon::after { content: '↕'; font-size: 11px; color: #9ca3af; margin-left: 4px; }
.wdoc-dt-sortable.sort-asc .wdoc-dt-sort-icon::after { content: '↑'; color: var(--wdoc-primary, #2563eb); }
.wdoc-dt-sortable.sort-desc .wdoc-dt-sort-icon::after { content: '↓'; color: var(--wdoc-primary, #2563eb); }

/* Table cells */
.wdoc-dt-title { font-weight: 500; }
.wdoc-dt-title a { color: var(--wdoc-text, #1f2937); text-decoration: none; font-weight: 600; }
.wdoc-dt-title a:hover { color: var(--wdoc-primary, #2563eb); }
.wdoc-dt-title .wdoc-file-icon { display: inline-flex; width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; }
.wdoc-dt-title .wdoc-badge { position: static; vertical-align: middle; margin-left: 8px; font-size: 10px; }
.wdoc-dt-type .wdoc-file-badge { display: inline-block; background: #ede9fe; color: #5b21b6; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.wdoc-dt-size { color: #6b7280; font-size: 13px; white-space: nowrap; }
.wdoc-dt-dept { font-size: 13px; color: #475569; }
.wdoc-dt-version { font-size: 13px; color: #6b7280; }
.wdoc-dt-date { font-size: 13px; color: #6b7280; white-space: nowrap; }

/* Actions column */
.wdoc-dt-actions { text-align: center; white-space: nowrap; }
.wdoc-download-btn-sm { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; background: var(--wdoc-btn, #2563eb); color: #fff !important; border-radius: 6px; }
.wdoc-download-btn-sm:hover { background: var(--wdoc-btn-hover, #1d4ed8); }

/* ── Single Download Card ─────────────────────────────────── */
.wdoc-single-download { background: var(--wdoc-bg, #fff); border: 1px solid #e2e8f0; border-radius: var(--wdoc-radius, 8px); overflow: hidden; }
.wdoc-single-download:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, .08); }
.wdoc-single-inner { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.wdoc-single-icon { flex-shrink: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: #f0f6ff; border-radius: 10px; color: var(--wdoc-primary, #2563eb); }
.wdoc-single-details { flex: 1; min-width: 0; }
.wdoc-single-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; line-height: 1.3; color: var(--wdoc-text, #1f2937); }
.wdoc-single-title a { color: inherit; text-decoration: none; }
.wdoc-single-title a:hover { color: var(--wdoc-primary, #2563eb); }
.wdoc-single-dept { font-size: 12px; color: #6b7280; display: block; margin-bottom: 4px; }
.wdoc-single-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wdoc-single-actions { flex-shrink: 0; }

/* Single download — inline layout */
.wdoc-single-inline .wdoc-single-inner { padding: 12px 16px; gap: 12px; }
.wdoc-single-inline .wdoc-single-icon { width: 36px; height: 36px; }
.wdoc-single-inline .wdoc-single-title { font-size: 14px; }

/* Single download — button layout */
.wdoc-single-button .wdoc-single-inner { padding: 0; }
.wdoc-single-button .wdoc-single-details { display: none; }
.wdoc-single-button .wdoc-download-btn { width: 100%; justify-content: center; padding: 12px 24px; border-radius: 0 var(--wdoc-radius, 8px) var(--wdoc-radius, 8px) 0; }

/* ── Datatable Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .wdoc-datatable-wrap { font-size: 13px; }
  .wdoc-datatable th,
  .wdoc-datatable td { padding: 8px 10px; }
  .wdoc-dt-title .wdoc-file-icon { width: 22px; height: 22px; }
  .wdoc-single-inner { flex-direction: column; align-items: flex-start; }
  .wdoc-single-actions { width: 100%; }
  .wdoc-single-actions .wdoc-download-btn { width: 100%; justify-content: center; }
  .wdoc-single-button .wdoc-single-details { display: block; }
  .wdoc-single-button .wdoc-single-title { font-size: 14px; margin-bottom: 8px; }
}


/* ── PDF preview modal ─────────────────────────────────────────────── */
.wdoc-preview-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: #fff; color: var(--wdoc-primary, #2563eb); border: 1px solid var(--wdoc-primary, #2563eb); border-radius: var(--wdoc-radius, 8px); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.wdoc-preview-btn:hover, .wdoc-preview-btn:focus-visible { background: var(--wdoc-primary, #2563eb); color: #fff; }
.wdoc-modal[hidden] { display: none; }
.wdoc-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.wdoc-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .65); }
.wdoc-modal-dialog { position: relative; display: flex; flex-direction: column; width: min(1100px, 100%); height: min(90vh, 900px); background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.wdoc-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; }
.wdoc-modal-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; color: #1f2937; }
.wdoc-modal-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.wdoc-modal-tools .wdoc-download-btn { flex: none; }
.wdoc-modal-newtab { font-size: 13px; color: var(--wdoc-primary, #2563eb); text-decoration: underline; }
.wdoc-modal-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f3f4f6; font-size: 22px; line-height: 1; cursor: pointer; }
.wdoc-modal-close:hover { background: #e5e7eb; }
.wdoc-modal-frame { flex: 1; width: 100%; border: 0; background: #525659; }
html.wdoc-modal-open { overflow: hidden; }

/* ── Citizen's Charter layout ──────────────────────────────────────── */
.wdoc-charter { --wdoc-primary: #0D7535; --wdoc-btn: #0D7535; --wdoc-btn-hover: #0a5d2a; }
.wdoc-charter-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.wdoc-charter-filters input[type="search"] { flex: 1 1 280px; padding: 12px 16px; border: 2px solid #d1d5db; border-radius: 8px; font-size: 16px; }
.wdoc-charter-filters select { flex: 0 1 320px; padding: 12px 16px; border: 2px solid #d1d5db; border-radius: 8px; font-size: 16px; background: #fff; }
.wdoc-charter-filters input:focus, .wdoc-charter-filters select:focus { border-color: #0D7535; outline: none; }
.wdoc-charter-hero { margin-bottom: 24px; }
.wdoc-charter-hero .wdoc-card { border: 2px solid #0D7535; background: linear-gradient(135deg, #f0faf4 0%, #fff 70%); }
.wdoc-charter-hero .wdoc-card-title { font-size: 20px; }
.wdoc-charter-item[hidden] { display: none; }
.wdoc-charter-item { display: flex; }
.wdoc-charter-item .wdoc-card { width: 100%; }
.wdoc-charter-grid { grid-template-columns: repeat(var(--wdoc-columns, 3), 1fr); }
.wdoc-card-actions { flex-wrap: wrap; }
@media (max-width: 900px) { .wdoc-charter-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .wdoc-charter-grid { grid-template-columns: 1fr; } .wdoc-modal { padding: 0; } .wdoc-modal-dialog { height: 100vh; border-radius: 0; } }

.wdoc-charter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.wdoc-chip { padding: 8px 18px; border: 1px solid #0D7535; border-radius: 999px; background: #fff; color: #0D7535; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.wdoc-chip:hover, .wdoc-chip:focus-visible { background: #e8f5ed; }
.wdoc-chip.is-active { background: #0D7535; color: #fff; }

.wdoc-coming-soon { display: inline-block; padding: 8px 14px; border-radius: 999px; background: #f3f4f6; color: #6b7280; font-size: 13px; font-weight: 600; }

/* ── Compact buttons (cards, table, modal) ─────────────────────────── */
.wdoc-card-actions { gap: 6px; flex-wrap: wrap; align-items: center; }
.wdoc-download-btn, .wdoc-view-btn, .wdoc-preview-btn { flex: 0 0 auto; padding: 5px 12px; font-size: 12.5px; line-height: 1.5; border-radius: 6px; gap: 5px; }
.wdoc-download-btn svg, .wdoc-preview-btn svg { width: 14px; height: 14px; }
.wdoc-download-btn-sm { padding: 5px 9px; }
.wdoc-card-body { padding: 14px 16px; }
.wdoc-file-icon { width: 36px; height: 36px; }
.wdoc-file-icon svg { width: 20px; height: 20px; }

/* ── Pagination: same look as /documents/ and /citizens-charter/ (Bootstrap .pagination) ── */
.wdoc-pagination { margin: 28px 0 8px; }
.wdoc-pagination .pagination { flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.wdoc-pagination .page-item .page-link { min-width: 38px; padding: 6px 12px; text-align: center; font-size: 14px; line-height: 1.5; border-radius: 6px; border: 1px solid #dee2e6; color: #0D7535; background: #fff; }
.wdoc-pagination .page-item .page-link:hover { background: #e8f5ed; }
.wdoc-pagination .page-item.active .page-link { background: #0D7535; border-color: #0D7535; color: #fff; }
.wdoc-pagination .page-item.disabled .page-link { color: #9ca3af; background: transparent; border-color: transparent; }

/* ── Table actions: Preview + Download share one height and sit centred in the row ── */
.wdoc-datatable td.wdoc-dt-actions, .wdoc-datatable th:last-child { text-align: center; }
.wdoc-datatable td.wdoc-dt-actions { vertical-align: middle; white-space: nowrap; }
.wdoc-dt-actions .wdoc-preview-btn,
.wdoc-dt-actions .wdoc-download-btn,
.wdoc-dt-actions .wdoc-coming-soon { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 30px; margin: 0 2px; padding-top: 0; padding-bottom: 0; vertical-align: middle; line-height: 1; }
.wdoc-dt-actions .wdoc-download-btn { width: 34px; padding-left: 0; padding-right: 0; }

/* ── Card footer: meta (date, type, size) on the left, actions on the right, one compact row ── */
.wdoc-card-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; margin-top: auto; padding-top: 10px; }
.wdoc-card-foot .wdoc-card-meta { margin: 0; gap: 4px; flex: 1 1 auto; }
.wdoc-card-foot .wdoc-card-actions { margin: 0; flex: 0 0 auto; margin-left: auto; gap: 4px; }
.wdoc-card-foot .wdoc-download-btn,
.wdoc-card-foot .wdoc-preview-btn,
.wdoc-card-foot .wdoc-view-btn { height: 26px; padding: 0 10px; font-size: 12px; line-height: 1; border-radius: 5px; display: inline-flex; align-items: center; gap: 4px; }
.wdoc-card-foot .wdoc-download-btn svg, .wdoc-card-foot .wdoc-preview-btn svg { width: 12px; height: 12px; }
.wdoc-card-foot .wdoc-coming-soon { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; font-size: 11.5px; font-weight: 600; line-height: 1; border-radius: 999px; white-space: nowrap; }
.wdoc-card-foot .wdoc-meta-item { padding: 2px 7px; }

/* ── Grid cards on /documents/ and /citizens-charter/ ── */
.wdoc-gcard { border-radius: 12px; box-shadow: 0 0 4px rgba(0, 0, 0, .25); transition: transform .2s, box-shadow .2s; }
.wdoc-gcard:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.wdoc-gicon { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: #f0f6ff; }
.wdoc-gcard .wdoc-card-foot { padding-top: 14px; flex-wrap: nowrap; }
.wdoc-gcard .wdoc-card-foot .wdoc-card-meta { flex: 1 1 0; min-width: 0; }
.wdoc-gmeta { display: block; font-size: 12px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wdoc-gcard .wdoc-card-actions { flex-wrap: nowrap; }

/* ── Shortcode grid cards = the /documents/ library cards ── */
.wdoc-grid { gap: 16px; }
.wdoc-card.wdoc-gcard { border: 0; border-radius: 12px; overflow: visible; background: #fff; box-shadow: 0 0 4px rgba(0, 0, 0, .25); }
.wdoc-card.wdoc-gcard:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.wdoc-gbody { display: flex; flex-direction: column; flex: 1; padding: 16px 20px; }
.wdoc-ghead { display: flex; align-items: center; gap: 12px; }
.wdoc-gtitlewrap { flex: 1 1 auto; min-width: 0; }
.wdoc-gcard .wdoc-card-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.wdoc-gcard .wdoc-card-dept { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: #6b7280; }
.wdoc-gcard .wdoc-card-excerpt { margin-top: 12px; font-size: 13px; color: #6b7280; line-height: 1.5; }
.wdoc-gstar { color: #f59e0b; font-size: 16px; line-height: 1; }
.wdoc-gcard .wdoc-card-foot { padding-top: 14px; flex-wrap: nowrap; }
.wdoc-gcard .wdoc-card-foot .wdoc-card-meta { flex: 1 1 0; min-width: 0; }
.wdoc-gcard .wdoc-card-actions { flex-wrap: nowrap; }
.wdoc-gcard .wdoc-gicon, .wdoc-charter .wdoc-gicon { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: #f0f6ff; }
.wdoc-charter-hero .wdoc-card.wdoc-gcard { outline: 2px solid #0D7535; }

.wdoc-gcard .wdoc-card-title, .wdoc-gcard .wdoc-card-title a { color: #111827; text-decoration: none; }
.wdoc-gcard .wdoc-card-title a:hover { color: #0D7535; }
.wdoc-gcard .wdoc-ghead { min-height: 44px; }
.wdoc-gcard .wdoc-gtitlewrap > * { padding: 0; }

.wdoc-gcard .wdoc-gbody { padding: 16px 20px; }

/* ── Document viewer: file opens automatically in a rounded frame (same look everywhere) ── */
.wdoc-viewer { margin: 0 0 24px; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #f9fafb; }
.wdoc-viewer-frame { display: block; width: 100%; height: var(--wdoc-viewer-h, 600px); border: 0; background: #525659; }
.wdoc-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 14px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.wdoc-viewer-title { font-size: 14px; font-weight: 700; color: #111827; line-height: 1.3; }
.wdoc-viewer-actions { display: inline-flex; align-items: center; gap: 12px; }
.wdoc-viewer-link { font-size: 12.5px; color: var(--wdoc-primary, #0D7535); text-decoration: underline; }
.wdoc-viewer-bar .wdoc-download-btn { height: 28px; padding: 0 12px; font-size: 12.5px; display: inline-flex; align-items: center; }
@media (max-width: 768px) { .wdoc-viewer-frame { height: min(var(--wdoc-viewer-h, 600px), 70vh); } }
