MediaWiki:Common.css: Difference between revisions

No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1,030: Line 1,030:
   height: 0 !important;
   height: 0 !important;
}
}
/* ═══════════════════════════════════════════════════════════════════
  Mobile Design Addon — append to Common.css
  Target: screens ≤ 768px
  Philosophy: non-destructive — only adds, never removes desktop rules
  ═══════════════════════════════════════════════════════════════════ */


@media (max-width: 768px) {
//Mobile styles
/* =========================
  MOBILE RESPONSIVE FIXES
  EM-BASED SCALING
  ========================= */


  /* ── 1. BASE FONT + BODY ─────────────────────────────────────── */
@media screen and (max-width: 768px) {
  body {
    font-size: 18px !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }


  .mw-parser-output {
    /* Global scaling */
    font-size: 18px !important;
    html {
    line-height: 1.75 !important;
        font-size: 1.125em;
     padding: 0 4px !important;
     }
  }


  /* ── 2. CONTENT AREA — full width, proper padding ───────────── */
    body {
  #mw-content-text,
        font-size: 1em;
  .mw-body,
        line-height: 1.7em;
  .mw-body-content,
        -webkit-text-size-adjust: 100%;
  .vector-body,
     }
  #content {
    margin: 0 !important;
    padding: 0 12px !important;
    width: 100% !important;
    max-width: 100% !important;
     box-sizing: border-box !important;
  }


  /* ── 3. READER TOOLBAR — larger tap targets ──────────────────── */
    /* Full-width mobile layout */
  #gr-static-bar {
    .mw-page-container {
    height: 52px !important;
        max-width: 100% !important;
    padding: 0 8px !important;
        padding: 0 !important;
    overflow-x: auto !important;
     }
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
     scrollbar-width: none !important;
    gap: 2px !important;
  }
  #gr-static-bar::-webkit-scrollbar { display: none !important; }


  .gr-controls .gr-btn {
    .mw-content-container {
    height: 44px !important;
        margin: 0 !important;
    padding: 0 10px !important;
        padding: 1em !important;
    font-size: 14px !important;
     }
     min-width: 44px !important;
    flex-shrink: 0 !important;
  }


  .gr-controls .gr-icon-btn {
    /* Remove desktop-card feel */
    width: 44px !important;
    .mw-body {
    min-width: 44px !important;
        border-radius: 0 !important;
    padding: 0 !important;
        box-shadow: none !important;
    justify-content: center !important;
    }
  }


  .gr-controls .gr-fl {
    .vector-feature-zebra-design-enabled .mw-page-container {
    font-size: 13px !important;
        padding: 0 !important;
     min-width: 40px !important;
     }
  }


  .gr-script-sel {
     /* =========================
    height: 40px !important;
      HEADER
    font-size: 13px !important;
      ========================= */
     max-width: 110px !important;
    padding-right: 22px !important;
  }


  .gr-controls .gr-sep {
    .vector-header-container,
    display: none !important;
    .vector-sticky-header-container {
  }
        min-height: 5.5em !important;
        padding: 0.75em 1em !important;


  /* Hide PDF/EPUB labels on mobile — icon only */
        display: flex;
  .gr-btn-pdf .gr-lbl,
        align-items: center;
  .gr-btn-epub .gr-lbl,
    }
  .gr-btn-search .gr-lbl,
  .gr-btn-newdoc .gr-lbl { display: none !important; }


  /* ── 4. TOC — hide sidebar TOC, show as overlay ─────────────── */
    /* Logo text */
  /* Hide the Vector sidebar TOC completely on mobile */
    .mw-logo-wordmark {
  .vector-column-start,
        font-size: 1.35em !important;
  .vector-toc-landmark,
        line-height: 1.2em !important;
  #vector-toc,
    }
  .vector-sticky-pinned-container {
    display: none !important;
  }


  /* TOC toggle button — floating pill at top of content */
    /* Logo icon */
  .gr-mobile-toc-btn {
    .mw-logo-icon img {
    display: flex !important;
        width: 2.5em !important;
    align-items: center;
        height: 2.5em !important;
    gap: 6px;
     }
    position: fixed;
    bottom: 72px;
    left: 16px;
    z-index: 9000;
    background: #fff;
    border: 1px solid #e0d6d0;
    border-radius: 24px;
    padding: 8px 14px;
    font-size: 14px;
    font-family: system-ui, sans-serif;
    color: #b5451b;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
     cursor: pointer;
    font-weight: 500;
  }


  /* TOC overlay panel */
    /* =========================
  .gr-mobile-toc-panel {
      SEARCH
    display: none;
      ========================= */
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 80vw;
    max-width: 320px;
    background: #fff;
    z-index: 10300;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    overflow-y: auto;
    padding: 20px 16px 40px;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  }
  .gr-mobile-toc-panel.open {
    display: block;
    transform: translateX(0);
  }
  .gr-mobile-toc-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 10299;
  }
  .gr-mobile-toc-backdrop.open { display: block; }


  /* TOC panel header */
    .cdx-search-input {
  .gr-mobile-toc-header {
        height: 2.8em !important;
    display: flex;
        font-size: 1em !important;
    align-items: center;
        border-radius: 0.7em !important;
    justify-content: space-between;
        padding: 0 0.9em !important;
    margin-bottom: 16px;
     }
    padding-bottom: 12px;
    border-bottom: 1px solid #f0ebe6;
  }
  .gr-mobile-toc-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b5451b;
    font-family: system-ui, sans-serif;
  }
  .gr-mobile-toc-close {
    background: none;
     border: none;
    font-size: 20px;
    color: #888;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
  }


  /* Clone Vector TOC links into mobile panel */
    .cdx-search-input::placeholder {
  .gr-mobile-toc-panel .vector-toc-list-item {
        font-size: 1em;
    padding: 6px 0 !important;
     }
    border-bottom: 1px solid #f5f0ed !important;
  }
  .gr-mobile-toc-panel .vector-toc-link {
    font-size: 16px !important;
    color: #2c1810 !important;
    text-decoration: none !important;
    display: block !important;
    padding: 4px 0 !important;
    line-height: 1.5 !important;
  }
  .gr-mobile-toc-panel .vector-toc-list-item-active .vector-toc-link {
    color: #b5451b !important;
     font-weight: 600 !important;
  }


  /* ── 5. ANNOTATIONS BAR (Notes/Bookmark/Feedback) ───────────── */
    /* =========================
  #gra-mobile-bar-inner {
      CONTENT TYPOGRAPHY
    padding-bottom: env(safe-area-inset-bottom, 8px) !important;
      ========================= */
  }
  .gra-mob-btn {
    min-height: 64px !important;
    font-size: 12px !important;
  }
  .gra-mob-btn .gra-icon {
    width: 26px !important;
    height: 26px !important;
  }


  /* Toggle button — move up to avoid overlap with TOC btn */
    .mw-parser-output {
  #gra-toggle {
        font-size: 1.05em;
    bottom: 72px !important;
        line-height: 1.9em;
    right: 16px !important;
     }
    width: 52px !important;
     height: 52px !important;
  }


  /* ── 6. HEADINGS ─────────────────────────────────────────────── */
    /* Headings */
  .mw-parser-output h2,
  .mw-parser-output .mw-heading2 h2 {
    font-size: 1.15em !important;
    width: 100% !important;
    margin: 20px 0 4px !important;
  }
  .mw-parser-output h3,
  .mw-parser-output .mw-heading3 h3 {
    font-size: 1em !important;
    width: 100% !important;
    margin: 16px 0 4px !important;
  }


  /* ── 7. VERSE + BHASHYAM INDENT ─────────────────────────────── */
    .mw-parser-output h1 {
  .bhashyam-block { margin-left: 0 !important; }
        font-size: 1.9em !important;
  .padya-block    { margin-left: 16px !important; }
        line-height: 1.2em !important;
  .prasna-answer  { margin-left: 16px !important; }
        margin-bottom: 0.5em !important;
    }


  /* ── 8. HOME PAGE GRID ───────────────────────────────────────── */
    .mw-parser-output h2 {
  .gr-home-grid {
        font-size: 1.5em !important;
    flex-direction: column !important;
        line-height: 1.3em !important;
    gap: 12px !important;
     }
  }
  .gr-home-card {
    min-width: unset !important;
    max-width: 100% !important;
     flex: 1 1 100% !important;
  }


  /* ── 9. MAIN PAGE TOGGLE ─────────────────────────────────────── */
    .mw-parser-output h3 {
  .gr-home-toggle { flex-wrap: wrap !important; gap: 6px !important; }
        font-size: 1.25em !important;
  .gr-toggle-btn  { font-size: 0.85em !important; padding: 8px 16px !important; }
        line-height: 1.35em !important;
    }


  /* ── 10. VECTOR COLUMN LAYOUT — single column ───────────────── */
    /* Paragraphs */
  .mw-page-container,
  .vector-page-container {
    padding: 0 !important;
  }
  .vector-column-end,
  .vector-body-container {
    padding: 0 !important;
  }
  .vector-page-content {
    padding: 0 !important;
  }


  /* ── 11. SEARCH OVERLAY ──────────────────────────────────────── */
    .mw-parser-output p {
  #gr-search-overlay { padding-top: 0 !important; align-items: stretch !important; }
        margin-bottom: 1em;
  #gr-search-panel {
     }
    border-radius: 0 !important;
     width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }


  /* ── 12. COMPOSERS (feedback/note/bookmark) ──────────────────── */
    /* Sanskrit / verse blocks */
  .gra-composer,
  .gra-bm-composer {
    width: calc(100vw - 24px) !important;
    max-width: 400px !important;
  }


  /* ── 13. PANEL (notes/bookmarks) ────────────────────────────── */
    .verse,
  #gra-panel { width: 100vw !important; right: -100vw !important; }
    .sloka,
    .sanskrit-text {
        font-size: 1.15em !important;
        line-height: 2em !important;
    }


    /* =========================
      TABLES
      ========================= */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
    /* =========================
      TOC
      ========================= */
    #toc,
    .toc {
        font-size: 1em !important;
        padding: 1em !important;
        line-height: 1.7em;
    }
    /* =========================
      BUTTONS
      ========================= */
    button,
    .cdx-button {
        min-height: 2.8em;
        font-size: 1em;
        padding: 0.6em 1em;
        border-radius: 0.6em;
    }
    /* Reduce desktop spacing */
    .vector-page-titlebar {
        margin-top: 0 !important;
    }
}
}
/* ── MOBILE TOC JS — injected by inline script below ─────────── */