/* HeroUI v3 Card, Button, Tabs and dark theme, adapted to resource detail templates.
 * Apache-2.0; existing forms, action handlers and user content preserved.
 */
.container.resource-detail {
 --detail-bg:oklch(.2103 .0059 285.89); --detail-fg:oklch(.9911 0 0);
 --detail-muted:oklch(70.5% .015 286.067); --detail-default:oklch(27.4% .006 286.033);
 max-width:1360px; width:100%; margin:24px auto 0; padding:0 24px;
 font:400 14px/20px BronzCategoryInter,ui-sans-serif,system-ui,sans-serif; color:var(--detail-fg);
}
.resource-detail > .row { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:20px; margin:0; }
.resource-detail > .row > [class*="col-"] { width:100%; max-width:100%; min-width:0; padding:0; }
.resource-detail .card { background:var(--detail-bg) !important; color:var(--detail-fg); border:0; border-radius:24px; box-shadow:0 0 0 0 transparent inset; overflow:hidden; }
.resource-detail .card-body { padding:16px; min-width:0; }
.resource-detail .card-header { padding:16px 16px 8px; border:0; background:transparent !important; color:var(--detail-fg); font-weight:500; }
.resource-detail .card-footer { padding:8px 16px 16px; border:0; background:transparent !important; }
.resource-detail .card-header h3, .resource-detail .card-header h4 { font:500 16px/24px BronzCategoryInter,ui-sans-serif,system-ui,sans-serif; }
.resource-detail .resource-summary-card .card-body { gap:16px; }
.resource-detail .resource-icon-lg { width:80px; height:80px; border:0; border-radius:16px !important; object-fit:cover; }
.resource-detail .resource-detail__title { font:500 22px/28px BronzCategoryInter,ui-sans-serif,system-ui,sans-serif; text-transform:none; overflow-wrap:anywhere; }
.resource-detail .text-muted { color:var(--detail-muted) !important; }
.resource-detail .btn {
 display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:36px;
 padding:8px 16px; border:0 !important; border-radius:24px !important;
 background:var(--detail-default) !important; color:var(--detail-fg) !important;
 font:500 14px/20px BronzCategoryInter,ui-sans-serif,system-ui,sans-serif;
 white-space:normal; text-decoration:none; box-shadow:none; transition:background-color 100ms ease;
}
.resource-detail .btn:hover { background:color-mix(in oklab,var(--detail-default) 96%,var(--detail-fg) 4%) !important; filter:none; }
.resource-detail .btn-theme { background:oklch(.6204 .195 253.83) !important; }
.resource-detail .btn-theme:hover { background:color-mix(in oklab,oklch(.6204 .195 253.83) 90%,var(--detail-fg) 10%) !important; }
.resource-detail .btn:disabled, .resource-detail .btn.disabled { opacity:.5; pointer-events:none; }
.resource-detail .btn:focus-visible, .resource-detail .resource-tabs .nav-link:focus-visible { outline:2px solid oklch(.6204 .195 253.83); outline-offset:2px; }
.resource-detail .resource-tabs-card { background:transparent !important; overflow:visible; }
.resource-detail .resource-tabs-card .card-body { padding:0 !important; }
.resource-detail .resource-tabs { display:flex; flex-wrap:wrap; gap:4px; width:fit-content; max-width:100%; padding:4px; border-radius:20px; background:var(--detail-default); }
.resource-detail .resource-tabs .nav-link { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:8px 12px !important; margin:0 !important; border-radius:16px; font:500 14px/20px BronzCategoryInter,ui-sans-serif,system-ui,sans-serif; color:var(--detail-muted); background:transparent; }
.resource-detail .resource-tabs .nav-link:hover { color:var(--detail-fg); }
.resource-detail .resource-tabs .nav-link.active { background:var(--detail-bg); color:var(--detail-fg); box-shadow:0 1px 3px rgba(0,0,0,.12); }
.resource-detail .resource-actions-card:not(:has(.btn,.badge)) { display:none; }
.resource-detail .resource-actions-card .card-body { padding:12px 16px 4px; }
.resource-detail .resource-description-card .card-body { padding:20px; font:400 15px/24px BronzCategoryInter,ui-sans-serif,system-ui,sans-serif; }
.resource-detail .forum_post { overflow-wrap:anywhere; }
.resource-detail .forum_post img, .resource-detail .forum_post video, .resource-detail .forum_post iframe { max-width:100%; }
.resource-detail .forum_post pre { overflow-x:auto; }
.resource-detail .list-group-item { gap:12px; padding:8px 16px; background:transparent !important; border:0; color:var(--detail-muted) !important; font:400 13px/20px BronzCategoryInter,ui-sans-serif,system-ui,sans-serif; }
.resource-detail .list-group-item strong { color:var(--detail-fg); font-weight:500; text-align:right; overflow-wrap:anywhere; min-width:0; }
.resource-detail .list-group { padding-bottom:12px; }
.resource-detail .badge-secondary { padding:4px 8px; border-radius:999px; background:var(--detail-default); color:var(--detail-fg); font-weight:500; }
.resource-detail .resource-review, .resource-detail .resource-release { border:0; border-radius:16px; padding:12px; background:var(--detail-default); box-shadow:none; }
.resource-detail .resource-review + .resource-review { margin-top:8px; }
.resource-detail .table { color:var(--detail-fg); font:inherit; }
.resource-detail .table thead th { text-transform:none; font-weight:500; color:var(--detail-muted); border-color:color-mix(in oklch,var(--detail-fg) 12%,transparent); }
.resource-detail .table td { border-color:color-mix(in oklch,var(--detail-fg) 8%,transparent); }
.resource-detail .form-control { border:0 !important; border-radius:12px; background:var(--detail-default) !important; color:var(--detail-fg) !important; font:inherit; }
.resource-detail .dropdown-menu { padding:6px; border-radius:24px; background:var(--detail-bg) !important; box-shadow:0 0 1px rgba(255,255,255,.3) inset; }
.resource-detail .dropdown-item { border-radius:16px; min-height:36px; padding:8px 10px; font:inherit; color:var(--detail-fg) !important; }
.resource-detail .dropdown-item:hover { background:var(--detail-default) !important; }
@media(max-width:991px) { .resource-detail > .row { grid-template-columns:minmax(0,1fr); } }
@media(max-width:575px) {
 .container.resource-detail { padding:0 16px; }
 .resource-detail .resource-summary-card .card-body { align-items:center; }
 .resource-detail .resource-detail__title { font-size:20px; line-height:26px; }
 .resource-detail .resource-description-card .card-body { padding:16px; }
}
@media(prefers-reduced-motion:reduce) { .resource-detail .btn { transition:none; } }
/* Keep action dropdowns above neighbouring cards, without clipping. */
.resource-detail .resource-actions-card { overflow:visible; position:relative; z-index:5; }
.resource-detail .resource-actions-card:has(.dropdown.show) { z-index:100; }
.resource-detail .resource-actions-card .dropdown-toggle { background:var(--detail-default) !important; color:var(--detail-fg) !important; border:0 !important; }
.resource-detail .resource-actions-card .dropdown-menu { min-width:200px; max-width:calc(100vw - 48px); margin-top:8px; }
.resource-detail .resource-actions-card .dropdown-item { white-space:normal; }
.resource-author__profile { display:flex; align-items:center; gap:12px; margin-bottom:12px; text-decoration:none; }
.resource-author__avatar { position:relative; display:flex; align-items:center; justify-content:center; width:48px; height:48px; flex-shrink:0; border-radius:50%; overflow:hidden; background:var(--detail-default); color:var(--detail-fg); }
.resource-author__avatar img { position:absolute; inset:0; width:48px; height:48px; object-fit:cover; }
.resource-author__avatar img[hidden] { display:none; }
.resource-author__initials { font-weight:500; }
.resource-author__name, .resource-author__name * { font:500 14px/20px BronzCategoryInter,ui-sans-serif,system-ui,sans-serif; color:var(--detail-fg) !important; }
.resource-detail .resource-author__resources { width:100%; box-sizing:border-box; }
.resource-detail .resource-version-table { background:transparent !important; border-collapse:separate; border-spacing:0; margin:0; }
.resource-detail .resource-version-table th { background:transparent !important; padding:10px 16px; font-size:12px; border:0; color:var(--detail-muted) !important; }
.resource-detail .resource-version-table td { background:transparent !important; padding:12px 16px; color:var(--detail-fg) !important; vertical-align:middle; border:0; border-top:1px solid color-mix(in oklch,var(--detail-fg) 8%,transparent); }
.resource-detail .resource-version-table tbody tr:hover td { background:color-mix(in oklab,var(--detail-bg) 96%,var(--detail-fg) 4%) !important; }
.resource-detail .resource-version-table .btn { min-height:32px; padding:6px 12px; }
.resource-detail .resource-versions-card .card-footer { padding-top:12px; }

/* Align card columns within the centred page container. */
.container.resource-container.resource-detail { margin-inline:auto !important; }
.resource-detail > .row { align-items:start; }
.resource-detail > .row > [class*="col-"] > .card { width:100%; margin-inline:0; }
