@charset "utf-8";
/* eMJey-Forum 2.0 — Kunena 7 / Aurelia integration
 *
 * Goals
 * -----
 *  - Make sure Kunena's #kunena container can grow naturally inside .emjey-main.
 *  - Undo media/kunena/core/css/custom.css's `overflow: hidden` on `.table`
 *    which clips topic rows in the white card.
 *  - Keep front-end "Edit" popups (admin chrome) inside the page, not bleeding
 *    on top of the banner.
 *  - Keep RTL Persian text rendering correctly inside Aurelia tables.
 */

.emjey-forum-main {
    width: 100%;
    max-width: 100%;
    text-align: start;
}

.emjey-forum-main #kunena {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    color: var(--emjey-text);
}

/* Aurelia uses Bootstrap .table with our custom.css adding overflow:hidden +
   border-radius — perfect for rounded corners on a normal page, but inside the
   white card with table-layout:fixed parents it clips rows. Keep the rounded
   look but allow content to render. */
.emjey-forum-main #kunena .table {
    overflow: visible;
    width: 100%;
    margin: 0 0 1rem 0;
}

.emjey-forum-main #kunena .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

/* Fix: avatars / icons should not blow out the topic row height */
.emjey-forum-main #kunena .table img { max-width: 100%; height: auto; }

/* Subject column is the only mobile-visible cell — give it room */
.emjey-forum-main #kunena .table tbody td { vertical-align: top; }

/* RTL: flip Aurelia's float-start / float-end inside Kunena rows */
body.rtl .emjey-forum-main #kunena .float-start { float: right !important; }
body.rtl .emjey-forum-main #kunena .float-end   { float: left  !important; }

/* Pagination, search, breadcrumb spacing */
.emjey-forum-main #kunena .breadcrumb {
    background: #f7f1e1;
    padding: .5rem .75rem;
    border-radius: var(--emjey-radius);
    margin-bottom: 1rem;
}

/* Topic-row hover */
.emjey-forum-main #kunena .table tbody tr:hover td {
    background: rgba(255, 212, 121, .08);
}

/* Sections (root-level categories) — give them a clear divider when our
   override renders both the topic table and the sub-category index. */
.emjey-forum-main #kunena .section + .kfrontend,
.emjey-forum-main #kunena .table + .kfrontend { margin-top: 1.25rem; }

/* Front-end module-edit popups: never overlap the banner */
.emjey-forum-main .jmodedit { position: relative; z-index: 4; }

/* Mobile: stack Kunena widgets cleanly */
@media (max-width: 576px) {
    .emjey-forum-main #kunena h1,
    .emjey-forum-main #kunena h2 { font-size: 1.15rem; }
    .emjey-forum-main #kunena .table thead { display: none; } /* Aurelia already hides on xs but enforce */
}
