/* Chatterly – shared styles */
body.public-body { background: var(--bs-body-bg); }

.post-content img { max-width: 100%; height: auto; }
.post-content pre { background: var(--bs-tertiary-bg); padding: .75rem; border-radius: .5rem; overflow-x: auto; }
.post-content blockquote { border-left: 4px solid var(--bs-primary); padding-left: 1rem; color: var(--bs-secondary-color); }

.pagination { --bs-pagination-margin-start: .15rem; }
.installer-steps { letter-spacing: .04em; }
code { word-break: break-word; }

/* ---------------------------------------------------------------
 * Admin panel
 * --------------------------------------------------------------- */
.admin-sidebar { width: 250px; min-height: 100vh; position: sticky; top: 0; align-self: flex-start; max-height: 100vh; overflow-y: auto; }
.admin-sidebar .nav-link { color: rgba(255,255,255,.75); border-radius: .375rem; padding: .45rem .75rem; }
.admin-sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.admin-sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.14); }
.admin-sidebar .nav-link .badge { float: right; }
@media (max-width: 991.98px) { .admin-sidebar { display: none !important; } }
#adminSidebar .nav-link { color: rgba(255,255,255,.75); border-radius: .375rem; }
#adminSidebar .nav-link:hover, #adminSidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }

.admin-stat-card .display-6 { font-weight: 600; }
.table td .btn-sm + .btn-sm { margin-left: .25rem; }
.grab { user-select: none; }
#menuItems li.dragged { opacity: .4; }
#menuItems li.border-top { border-top: 2px solid var(--bs-primary) !important; }

/* CKEditor inside Bootstrap forms */
.ck-editor__editable_inline { min-height: 260px; background: #fff; color: #212529; }

/* Toasts (shared with chat) */
.toast-stack { position: fixed; bottom: 1rem; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; }

/* ---------------------------------------------------------------
 * Installer
 * --------------------------------------------------------------- */
.installer-shell { max-width: 760px; margin: 3vh auto 6vh; }
.installer-shell .card { border: 0; box-shadow: 0 1rem 3rem rgba(0,0,0,.08); }
.req-table td:first-child { width: 60%; }

/* ---------------------------------------------------------------
 * Public site
 * --------------------------------------------------------------- */
.site-header .navbar-brand img { border-radius: .25rem; }
.post-card img.card-img-top { object-fit: cover; height: 180px; }
.post-content img { max-width: 100%; height: auto; border-radius: .5rem; }
.post-content table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.post-content table td, .post-content table th { border: 1px solid var(--bs-border-color); padding: .4rem .6rem; }
.comment-body p:last-child { margin-bottom: 0; }

/* Avatars */
.avatar-xs { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

/* Theme preview tiles (admin/themes) */
.theme-preview { height: 64px; border-radius: .5rem .5rem 0 0; }
.theme-preview-default { background: linear-gradient(135deg, #f8f9fa, #e9ecef); }
.theme-preview-gradient { background: linear-gradient(135deg, #667eea, #7c3aed 50%, #d946ef); }
.theme-preview-ocean { background: linear-gradient(135deg, #083344, #0e7490); }
.theme-preview-sunset { background: linear-gradient(135deg, #7c2d12, #ea580c, #f59e0b); }

/* ───────────────────────── site footer (3 columns) ───────────────────────── */
.site-footer { }
.footer-brand img { display: inline-block; }
.footer-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.footer-menu .nav-link,
.footer-menu a { display: inline-block; padding: 0; color: var(--bs-body-color); text-decoration: none; }
.footer-menu .nav-link:hover,
.footer-menu a:hover { color: var(--bs-primary); text-decoration: underline; }
.footer-menu .nav-link.active { color: var(--bs-primary); font-weight: 600; }

/* ───────────────────────── thin modern scrollbars ───────────────────────── */
* { scrollbar-width: thin; scrollbar-color: rgba(135,135,150,.55) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(135,135,150,.5); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(135,135,150,.8); }
::-webkit-scrollbar-corner { background: transparent; }
