/* 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;
    gap: 20px;
}
.art-nav a {
    font-size: 14px;
    color: #666;
    text-decoration: none;
}
.art-nav a:hover {
    color: #1a1a1a;
}

/* 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-bottom: 8px;
}
.art-footer ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 16px;
}
.art-footer a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

/* 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 */
@media (max-width: 640px) {
    .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;
    }
    .art-nav {
        /* Nav wraps to its own row below logo+actions. order:99
           guarantees it's last in the flex flow regardless of where
           it sits in the HTML, so we don't depend on source order. */
        order: 99;
        flex: 1 0 100%;
    }
    .art-nav ul {
        gap: 16px;
        justify-content: center;
        flex-wrap: wrap;
    }
    .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. */
