/* App Review Theme Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Inter fallback — adjusted Arial metrics so the swap from system
   font to the real Inter (after web font loads) shifts as little
   as possible. Reduces CLS impact of `display=swap` from 0.05-0.15
   to ~0.01 on text-heavy pages. */
@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial');
    size-adjust: 107%;
    ascent-override: 90%;
    descent-override: 22%;
    line-gap-override: 0%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* overflow-x: clip blocks horizontal overflow exactly like
       overflow-x: hidden, BUT doesn't promote the body to a scroll
       container. That distinction matters because position: sticky
       tracks the nearest scroll-container ancestor — when body is
       the scroll container, sticky descendants effectively never
       get a chance to "stick" because body's height equals page
       content height (no relative scroll happens). overflow: clip
       leaves the viewport as the scroll container, which is what
       sticky needs.
       Browser support is universal in 2026 (Chrome 90+, Firefox 81+,
       Safari 15.4+) so no fallback needed. */
    overflow-x: clip;
}

/* Header */
.art-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}
.art-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}
.art-logo {
    font-size: 18px;
    font-weight: 700;
    color: #534AB7;
    text-decoration: none;
}
.art-nav > ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}
.art-nav li {
    position: relative;
}
.art-nav a {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #5f6b7a;
    text-decoration: none;
    padding: 6px 6px;
    border-bottom: 2.5px solid transparent;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.art-nav a:hover {
    color: #1a1a1a;
}
/* Active item — purple text + purple underline (Kiểu 2) */
.art-nav .current-menu-item > a,
.art-nav .current_page_item > a,
.art-nav .current-menu-parent > a,
.art-nav .current-menu-ancestor > a {
    color: #534AB7;
    border-bottom-color: #534AB7;
}
/* Caret on items that have a dropdown */
.art-nav .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    margin-left: 3px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .55;
    transition: transform .15s;
}
.art-nav .menu-item-has-children:hover > a::after {
    transform: rotate(225deg) translateY(1px);
}
/* Invisible hover-bridge so the dropdown stays open while the cursor
   travels from the parent link down into the panel. */
.art-nav .menu-item-has-children::before {
    content: "";
    position: absolute;
    top: 100%; left: 0; right: 0;
    height: 12px;
}
/* Dropdown panel (Kiểu 4 style) */
.art-nav .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 215px;
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(20,20,30,.12);
    padding: 6px;
    margin: 0;
    list-style: none;
    z-index: 1000;
    flex-direction: column;
    gap: 2px;
}
.art-nav .menu-item-has-children:hover > .sub-menu,
.art-nav .menu-item-has-children:focus-within > .sub-menu {
    display: flex;
}
/* Tap-to-open (mobile): JS toggles .is-open on the parent <li>. */
.art-nav .menu-item-has-children.is-open > .sub-menu {
    display: flex;
}
.art-nav .menu-item-has-children.is-open > a::after {
    transform: rotate(225deg) translateY(1px);
}
.art-nav .sub-menu li { position: relative; width: 100%; }
.art-nav .sub-menu a {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    border-bottom: none;
    font-size: 14px;
    color: #2c2c34;
}
.art-nav .sub-menu a:hover {
    background: #EEEDFE;
    color: #534AB7;
}
.art-nav .sub-menu .current-menu-item > a {
    background: #EEEDFE;
    color: #534AB7;
    border-bottom: none;
}
/* Drawer chrome (hamburger button, drawer header, backdrop) only exist
   on mobile — hidden on desktop where the nav is an inline bar. */
.art-nav-toggle,
.art-nav__head,
.art-nav-overlay {
    display: none;
}
/* Lock background scroll while the mobile drawer is open. */
body.art-nav-lock {
    overflow-y: hidden;
}

/* Main */
.art-main {
    min-height: 70vh;
    /* Top padding intentionally tight (10px) so the breadcrumb sits
       close to the site header — mirrors XenForo / Discourse forum
       behavior. The previous 20px created an awkward dead zone
       between the header bar and the breadcrumb strip. */
    padding: 10px 0 40px;
}
@media (max-width: 700px) {
    .art-main {
        padding: 6px 0 32px;
    }
}

/* Footer */
.art-footer {
    background: #fff;
    border-top: 1px solid #e5e5e5;
    padding: 24px 0;
    text-align: center;
}
.art-footer p {
    font-size: 13px;
    color: #999;
    margin: 0;
}
.art-footer ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 18px;
    padding: 0;
    margin: 0 0 12px;
}
.art-footer li {
    margin: 0;
}
.art-footer a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
}
.art-footer a:hover {
    color: #534AB7;
}

/* WP pagination */
.page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.page-numbers a,
.page-numbers span {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
}
.page-numbers .current {
    background: #534AB7;
    color: #fff;
}
.page-numbers a:hover {
    background: #f0f0f0;
}

/* Responsive — 768px to match the plugin's header-wrap breakpoint AND
   nav.js isMobile(), so the wrapped header, the tap-to-open behavior,
   and the full-width overlay dropdown all switch on at the same width. */
@media (max-width: 768px) {
    .art-header__inner {
        flex-wrap: wrap;
        gap: 8px 12px;
        align-items: center;
        /* Cancel out the container's 12px padding so the header
           hugs the viewport edge (mobile-app pattern). Re-add a
           small 8px inside gutter so logo doesn't sit literally
           flush against the screen edge. */
        margin: 0 -12px;
        padding: 12px 8px;
    }
    .art-logo {
        flex-shrink: 1;
        min-width: 0;
        max-width: 60%;
        overflow: hidden;
    }
    .art-logo__img {
        /* Override inline height from admin settings — 28px is the
           sweet spot for mobile. The admin slider goes up to 120px
           which only makes sense on desktop. */
        height: 28px !important;
        max-width: 100%;
        object-fit: contain;
        object-position: left center;
    }
    /* ── Hamburger button (left of logo) ── */
    .art-nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 38px;
        height: 38px;
        padding: 8px;
        margin-right: 4px;
        background: transparent;
        border: none;
        cursor: pointer;
        flex: 0 0 auto;
        order: -1;
    }
    .art-nav-toggle span {
        display: block;
        height: 2.5px;
        width: 100%;
        background: #534AB7;
        border-radius: 2px;
    }

    /* ── Slide-in drawer ── */
    .art-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 82%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        background: #fff;
        z-index: 10000;
        transform: translateX(-100%);
        transition: transform .28s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 2px 0 28px rgba(20, 20, 30, .25);
        /* override desktop/plugin flex behaviour — fixed removes it from
           flow anyway, but be explicit. */
        flex: none;
        order: 0;
        display: block;
    }
    .art-nav.is-open {
        transform: translateX(0);
    }

    /* Drawer header bar (purple) */
    .art-nav__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px;
        background: #534AB7;
        color: #fff;
        position: sticky;
        top: 0;
        z-index: 1;
    }
    .art-nav__title {
        font-size: 17px;
        font-weight: 600;
    }
    .art-nav__close {
        background: transparent;
        border: none;
        color: #fff;
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
        padding: 0 4px;
    }

    /* Menu items as a vertical list */
    .art-nav > ul {
        display: block;
        gap: 0;
    }
    .art-nav li {
        position: static;
        width: 100%;
    }
    .art-nav a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px;
        font-size: 15px;
        color: #2c2c34;
        border-bottom: 1px solid #f0f0f0;
        border-left: 3px solid transparent;
        white-space: normal;
    }
    .art-nav a:hover {
        background: #f7f7fb;
    }
    /* Active top-level item — purple left bar + tint */
    .art-nav .current-menu-item > a,
    .art-nav .current_page_item > a,
    .art-nav .current-menu-parent > a,
    .art-nav .current-menu-ancestor > a {
        color: #534AB7;
        border-bottom-color: #f0f0f0;
        border-left-color: #534AB7;
        background: #F6F5FE;
    }

    /* Parent caret (chevron) on the right, rotates when expanded */
    .art-nav .menu-item-has-children::before { display: none; }
    .art-nav .menu-item-has-children > a::after {
        content: "";
        display: inline-block;
        width: 8px;
        height: 8px;
        margin: 0;
        border-right: 2px solid #9a9aa5;
        border-bottom: 2px solid #9a9aa5;
        transform: rotate(45deg) translateY(-2px);
        transition: transform .2s;
        flex: 0 0 auto;
    }
    .art-nav .menu-item-has-children.is-open > a::after {
        transform: rotate(225deg) translateY(2px);
    }

    /* Sub-menu = inline accordion (hidden until parent .is-open) */
    .art-nav .sub-menu {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        max-width: none;
        transform: none;
        background: #fafafe;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        flex-direction: column;
    }
    .art-nav .menu-item-has-children.is-open > .sub-menu {
        display: flex;
    }
    .art-nav .sub-menu a {
        padding: 12px 20px 12px 38px;
        font-size: 14px;
        color: #555;
        border-left: 3px solid transparent;
    }
    .art-nav .sub-menu .current-menu-item > a {
        background: #EEEDFE;
        color: #534AB7;
        border-left-color: #534AB7;
    }

    /* Backdrop behind the drawer */
    .art-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 15, 25, .5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: opacity .28s ease, visibility .28s ease;
    }
    .art-nav-overlay.is-open {
        opacity: 1;
        visibility: visible;
    }

    .arc-header-actions {
        gap: 10px;
        margin-left: auto;
    }
}

/* ───────────────────────────────────────────────────────────
   Admin pending pill (header)
   Compact gradient pill that lives inside .arc-header-actions
   right before the search icon. Shows only when viewer is an
   admin AND total pending > 0. Click → moderation page.
   ─────────────────────────────────────────────────────────── */
.arc-admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 9px;
    background: linear-gradient(90deg, #534AB7 0%, #6A60C9 100%);
    color: #fff !important;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(83, 74, 183, 0.28);
    position: relative;
    line-height: 1;
    white-space: nowrap;
    transition: transform .12s, box-shadow .12s;
}
.arc-admin-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(83, 74, 183, 0.35);
    color: #fff !important;
}
.arc-admin-pill__icon {
    font-size: 13px;
    line-height: 1;
}
.arc-admin-pill__num {
    background: rgba(255, 255, 255, 0.25);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}
/* Pulsing yellow attention dot — only animates while there's
   something to look at. Sits at top-right of the pill so it
   reads as a "new" indicator without obscuring the count. */
.arc-admin-pill::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFD700;
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    animation: arc-admin-pill-pulse 2s infinite;
}
@keyframes arc-admin-pill-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    70%  { box-shadow: 0 0 0 7px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* Mobile: drop the text label, keep icon + count. Header is
   already crowded with logo, search, notif, msg, avatar — text
   "Cần duyệt" pushes everything to wrap. The pulse dot still
   draws the eye, the count is still visible, and tap still
   takes admin to moderation. */
@media (max-width: 640px) {
    .arc-admin-pill {
        padding: 5px 8px;
        gap: 4px;
    }
    .arc-admin-pill__label {
        display: none;
    }
}

/* Legacy .art-admin-alert.* classes removed — old full-width
   banner was visually heavy and wrapped awkwardly between the
   quickdash bar and page content. Replaced by the pill above. */

/* ==========================================================================
   VTC card — footer CTA button (empty state)

   When a logged-in user has never khoe, the footer keeps its normal
   single-row layout but inserts a "Khoe ngay" button between the
   stats text and the see-all link. Matches the visual weight of the
   converted state ("Bạn đã khoe N lần") — no amber banner, no extra
   row. Just one extra control where the eye is already looking.

   Mobile: button drops to its own full-width row, see-all centers
   below it.
   ========================================================================== */

.arc-vtc-card__footer--cta {
    gap: 14px;
}

.arc-vtc-card__cta-btn.arc-btn-post-topic {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.4;
}

.arc-vtc-card__cta-btn.arc-btn-post-topic span {
    font-size: 11px;
    transition: transform 0.15s ease;
}

.arc-vtc-card__cta-btn.arc-btn-post-topic:hover span {
    transform: translateX(2px);
}

/* In the CTA state, the see-all link auto-pushes to the right so
   the button sits next to the stats text (not at the far right). */
.arc-vtc-card__footer--cta .arc-vtc-card__total {
    margin-left: auto;
}

/* Mobile — stack vertically: stats line / full-width button / see-all.
   Below 480px the row layout starts to get cramped, so we go column
   to keep each control tappable. */
@media (max-width: 480px) {
    .arc-vtc-card__footer--cta {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .arc-vtc-card__footer--cta .arc-vtc-card__personal {
        justify-content: flex-start;
    }
    .arc-vtc-card__footer--cta .arc-vtc-card__cta-btn.arc-btn-post-topic {
        justify-content: center;
        padding: 10px 16px;
    }
    .arc-vtc-card__footer--cta .arc-vtc-card__total {
        margin-left: 0;
        text-align: center;
    }
}
