﻿/*
 * Bootstrap layer pre-registration.
 * باید قبل از هر @import باشد تا layer order ثابت بماند.
 * این تضمین می‌کند که تمام rules بدون @layer در این فایل
 * به‌طور خودکار بر Bootstrap برتری دارند — بدون نیاز به !important.
 */
@layer bootstrap;

/*
 * Purple V2 CSS entrypoint.
 *
 * Import order matters — each layer builds on the previous:
 *
 *   ── FOUNDATION ──────────────────────────────────────────
 *   1.  tokens-base         theme-independent constants (z-index, spacing, radius,
 *                           fonts, glass-blur, house colors, component sizing)
 *   2.  tokens-dark         dark theme color tokens (only theme-varying vars)
 *   3.  tokens-light        light theme color tokens (only theme-varying vars)
 *   4.  tokens-components   component-scoped tokens (sidebar, panel, breadcrumb)
 *   5.  vendor              third-party fonts/icons (no overrides)
 *   6.  fonts               @font-face declarations (Vazir, Lalezar)
 *
 *   ── BASE & LAYOUT ──────────────────────────────────────
 *   7.  base                html/body resets, RTL setup
 *   8.  effects             custom cursors, background video/image, snow
 *   9.  layout              flexbox shell, sticky footer
 *
 *   ── NAVIGATION ─────────────────────────────────────────
 *  10.  navbar              MAGIC HEADER desktop navbar module
 *  11.  mobile-nav          mobile top/bottom bars, desktop navbar legacy overrides
 *
 *   ── COMPONENTS ─────────────────────────────────────────
 *  12.  blocks              reusable content blocks
 *  13.  sidebar             sidebar titles, right panel, toggle button
 *  14.  buttons             peach/dark/outline button styles
 *  15.  modals-tooltips     modals, tooltips, popups
 *  16.  components          pagination, badges, thumbnails, misc
 *  17.  forms               form element styling
 *
 *   ── MODULES ────────────────────────────────────────────
 *  18.  modules             cross-module shared rules (placeholder)
 *  19.  pm                  PM (private messages) module
 *  20.  newbb               NewBB forum module
 *  21.  extgallery          ExtGallery module
 *  22.  homepage            homepage articles, news grid, sections
 *  23.  dailyprophet        Daily Prophet news slider & modal
 *  24.  newsroom            Newsroom hero section & breadcrumb
 *  25.  book                interactive book/flip component
 *  26.  loyalty-sidebar     XP/loyalty sidebar panel
 *
 *   ── PAGE-SPECIFIC ──────────────────────────────────────
 *  27.  profile             profile page glassmorphism module
 *  28.  footer              footer (.hp-footer)
 *
 *   ── OVERRIDES ──────────────────────────────────────────
 *  29.  responsive          media queries not belonging to a specific module
 *  30.  utilities           single-purpose helper classes (.theme-*)
 *  31.  print-accessibility print / accessibility rules
 *  32.  polish              Bootstrap 5 compatibility tweaks (last — highest priority)
 *
 * To change a module: edit only its file.
 */

/*
 * CACHE-BUSTING WARNING
 * ─────────────────────────────────────────────────────────────────────────
 * Browsers IGNORE ?v=N query params on CSS @import URLs for cache-busting.
 * The ?v= params on the @import lines below DO NOT bust browser cache.
 *
 * The ONLY effective cache-buster for ALL v2 CSS files is the ?v=N param
 * on the <link> tag in tpl/head-assets.tpl:
 *   <link rel="stylesheet" href="...css/custom.css?v=N">
 * When that version is bumped, the browser re-fetches custom.css and all
 * its @imported files (because their URLs are parsed fresh from the new
 * custom.css response).
 *
 * RULE: whenever ANY v2 CSS file is edited, bump ?v= on the custom.css
 * <link> in tpl/head-assets.tpl. Do NOT rely on the per-file ?v= below.
 *
 * The per-file ?v=N params on @import lines are CHANGE LOG MARKERS only
 * (human-readable version tracking) — they have no cache-control effect.
 * ─────────────────────────────────────────────────────────────────────────
 */

/* ── Foundation ── */
@import url("v2/tokens-base.css?v=8");
@import url("v2/tokens-dark.css?v=21");
@import url("v2/tokens-light.css?v=23");
@import url("v2/tokens-components.css?v=15");
/* FA subset missing icons: fa-align-center, fa-align-left, fa-align-right, fa-hand-o-up, fa-layer-group, fa-pencil-square-o, fa-picture-o, fa-thumbs-o-up, fa-upload, fa-user-o — keeping full FA until subset regenerated */
@import url("vendor/fontawesome-all.min.css");
@import url("v2/fonts.css?v=13");
@import url("vazir.css");

/* ── Base & Layout ── */
@import url("v2/base.css?v=13");
@import url("v2/effects.css?v=14");
@import url("v2/layout.css?v=13");

/* ── Navigation ── */
@import url("v2/navbar.css?v=15");
@import url("v2/mobile-nav.css?v=18");

/* ── Components ── */
@import url("v2/blocks.css?v=20");
@import url("v2/sidebar.css?v=27");
@import url("v2/buttons.css?v=14");
@import url("v2/modals-tooltips.css?v=13");
@import url("v2/components.css?v=14");
/* ── Modules ── */
@import url("v2/article-shared.css?v=13");
@import url("v2/pm.css?v=14");
@import url("v2/newbb.css?v=35");
@import url("v2/polls.css?v=14");
@import url("v2/extgallery.css?v=23");
@import url("v2/xcgal.css?v=4");
@import url("v2/homepage.css?v=24");
@import url("v2/dailyprophet.css?v=16");
@import url("v2/newsroom.css?v=15");
@import url("v2/book.css?v=13");
@import url("v2/loyalty-sidebar.css?v=16");

/* ── Page-Specific ── */
@import url("v2/profile.css?v=16");
@import url("v2/login.css?v=5");
@import url("v2/notifications.css?v=1");
@import url("v2/footer.css?v=15");
@import url("v2/search.css?v=14");

/* ── Overrides (last = highest priority) ── */
@import url("v2/responsive.css?v=16");
@import url("v2/utilities.css?v=13");
@import url("v2/print-accessibility.css?v=14");
@import url("v2/polish.css?v=14");

/* Forum thread popup overrides */
.newbb-thread-card{
  overflow: visible;
  position: relative;
}

.newbb-thread-card__body{
  overflow: visible;
}

.newbb-thread-card__sidebar{
  overflow: visible;
}

.newbb-viewtopic-v2 .newbb-message-area,
.newbb-viewtopic-v2 .main-card,
.newbb-viewtopic-v2 .custom-user-data,
.newbb-viewtopic-v2 .newbb-thread-card__author-shell,
.newbb-viewtopic-v2 .newbb-thread-card__footer,
.newbb-viewtopic-v2 .newbb-thread-card__footerbar,
.newbb-viewtopic-v2 .newbb-thread-card__actions,
.newbb-viewtopic-v2 .newbb-fab{
  overflow: visible !important;
}

.newbb-thread-card__sidebar .mini-popup{
  max-width: calc(100% - 12px);
}

.newbb-thread-card.mini-popup-open{
  z-index: 30;
}
