Jump to content

MediaWiki:Common.css

From SOJI ELECTRONICS
Revision as of 09:08, 13 May 2026 by Admin (talk | contribs)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* 1. Layout dòng Item */
#p-categorytree-portlet .CategoryTreeItem {
    position: relative !important;
    display: block !important;
    padding: 10px 30px 10px 0 !important;
    border-bottom: 1px solid #e7eaf0 !important;
}

/* 2. Cấu hình Bullet chứa mũi tên */
#p-categorytree-portlet .CategoryTreeBullet {
    position: absolute !important;
    right: 0 !important; /* Đẩy sát lề phải */
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Chúng ta dùng visibility: hidden để giữ chức năng click nhưng ẩn hình tam giác */
#p-categorytree-portlet .CategoryTreeToggle {
    visibility: hidden !important; 
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
}

/* 4. TỰ VẼ MŨI TÊN MẢNH (Chevron) */
/* Dùng visibility: visible để hiện lại mũi tên mảnh chúng ta tự vẽ */
#p-categorytree-portlet .CategoryTreeToggle::after {
    content: '' !important;
    visibility: visible !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 8px !important;
    height: 8px !important;
    border-right: 1.5px solid #4a5fd2 !important; /* Độ mảnh và màu xanh Teltonika */
    border-bottom: 1.5px solid #4a5fd2 !important;
    box-sizing: border-box !important;
    /* Mặc định xoay sang phải > */
    transform: translate(-70%, -50%) rotate(45deg) !important;
    transition: transform 0.2s ease !important;
}

/* 5. XOAY MŨI TÊN KHI MỞ (Trạng thái Expanded) */
/* MediaWiki khi mở sẽ đổi text từ "►" sang "▼" hoặc đổi onclick, 
   CSS dưới đây bắt theo cấu trúc chung của CategoryTree */
#p-categorytree-portlet .CategoryTreeToggle[onclick*="collapse"]::after,
#p-categorytree-portlet .CategoryTreeToggle-expanded::after {
    transform: translate(-50%, -75%) rotate(45deg) !important;
}

/* 6. ẨN CÁC DẤU CHẤM TRANG LÁ */
#p-categorytree-portlet .CategoryTreePageBullet,
#p-categorytree-portlet .CategoryTreeEmptyBullet {
    display: none !important;
}

/* 7. Kiểu chữ nhãn (Label) */
#p-categorytree-portlet .CategoryTreeLabel a {
    color: #4a5fd2 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    font-weight: 400 !important;
}

/* Thụt lề cho các cấp con */
#p-categorytree-portlet .CategoryTreeChildren {
    padding-left: 20px !important;
    margin: 0 !important;
}


/* Simple top header style */
body.skin-vector-2022 .vector-header-container,
body.skin-vector-2022 .vector-header,
body.skin-vector-2022 .vector-sticky-header-container,
body.skin-vector-2022 .vector-sticky-header {
    background-color: #B5C2CD !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

body.skin-vector-2022 .vector-header {
    min-height: 72px !important;
    padding: 0 24px !important;
    max-width: none !important;
}

body.skin-vector-2022 .mw-logo {
    min-height: 72px !important;
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
}

body.skin-vector-2022 .mw-logo-wordmark {
    color: #fff !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

body.skin-vector-2022 .mw-logo-icon {
    display: none !important;
}

body.skin-vector-2022 #vector-main-menu-dropdown-label,
body.skin-vector-2022 #vector-main-menu-dropdown-label .vector-icon,
body.skin-vector-2022 .vector-user-links a,
body.skin-vector-2022 #lang-switcher,
body.skin-vector-2022 #lang-select {
    color: #fff !important;
}

body.skin-vector-2022 #lang-select {
    background: transparent !important;
    border: 0 !important;
}

/* language select: đóng màu trắng, mở ra chữ đen nền trắng */
body.skin-vector-2022 #lang-select {
    color: #fff !important;
    background: transparent !important;
    border: 0 !important;
}

body.skin-vector-2022 #lang-select option {
    color: #202122 !important;
    background: #fff !important;
}

body.skin-vector-2022 .vector-dropdown-content a,
body.skin-vector-2022 .vector-dropdown-content a span,
body.skin-vector-2022 .vector-dropdown-content .vector-icon {
    color: #202122 !important;
    fill: #202122 !important;
}

body.skin-vector-2022 .mw-logo-wordmark,
body.skin-vector-2022 #vector-main-menu-dropdown-label,
body.skin-vector-2022 #vector-main-menu-dropdown-label .vector-icon,
body.skin-vector-2022 .vector-header .vector-user-links-main > div > .vector-menu-content a,
body.skin-vector-2022 .vector-header #p-vector-user-menu-overflow a,
body.skin-vector-2022 .vector-header #pt-login-2 a,
body.skin-vector-2022 #lang-select {
    color: #1F2A36 !important;
}

/* =========================
   SOJI CUSTOM FOOTER
   ========================= */

body.has-soji-footer .mw-footer-container {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.has-soji-footer #footer,
body.has-soji-footer .printfooter {
    display: none !important;
}

.soji-site-footer {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: #495970;
    color: #edf2f7;
}

.soji-footer-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 68px 42px 54px;
}

.soji-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr 1fr 0.9fr;
    gap: 56px;
    align-items: start;
}

.soji-footer-col h2 {
    margin: 0 0 18px;
    color: #fff;
    font-family: "Arial Narrow", "Roboto Condensed", sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.soji-footer-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.soji-footer-col li {
    margin: 0 0 7px;
}

.soji-footer-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.88) !important;
    font-family: "Arial Narrow", "Roboto Condensed", sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.soji-footer-link:hover {
    color: #ffffff !important;
    opacity: 1 !important;
    text-decoration: none !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.18);
}

.soji-footer-policy-row .soji-footer-link {
    color: rgba(255, 255, 255, 0.88) !important;
}

.soji-footer-policy-row .soji-footer-link:hover {
    color: #ffffff !important;
}

.soji-footer-bottom {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 42px;
    align-items: end;
}

.soji-footer-policy-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 22px;
}

.soji-footer-sep {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
}

.soji-footer-copy {
    color: rgba(255, 255, 255, 0.8);
    font-family: "Arial Narrow", "Roboto Condensed", sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.soji-footer-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
}

.soji-footer-subscribe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    color: #fff;
    font-family: "Arial Narrow", "Roboto Condensed", sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.soji-footer-social {
    display: flex;
    align-items: center;
    gap: 16px;
}

.soji-footer-social-label {
    color: #fff;
    font-family: "Arial Narrow", "Roboto Condensed", sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.soji-footer-social-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.soji-footer-social-item {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    color: #495970;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: lowercase;
}

@media (max-width: 1080px) {
    .soji-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }

    .soji-footer-bottom {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 680px) {
    .soji-footer-shell {
        padding: 44px 20px 36px;
    }

    .soji-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .soji-footer-social {
        flex-direction: column;
        align-items: flex-start;
    }
}

.soji-site-footer a.soji-footer-subscribe,
.soji-site-footer a.soji-footer-subscribe:link,
.soji-site-footer a.soji-footer-subscribe:visited,
.soji-site-footer a.soji-footer-subscribe:hover,
.soji-site-footer a.soji-footer-subscribe:active,
.soji-site-footer a.soji-footer-subscribe:focus {
    color: #ffffff !important;
    text-decoration: none !important;
}

.soji-site-footer a.soji-footer-subscribe {
    border-color: rgba(255, 255, 255, 0.6) !important;
    background: transparent !important;
}

.soji-site-footer a.soji-footer-subscribe:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.95) !important;
}
/* Vector 2022: đẩy footer xuống đáy viewport khi page ngắn */
/* Chỉ chừa khoảng cách với nội dung phía trên */
body.has-soji-footer .mw-footer-container,
body.has-soji-footer .mw-footer,
body.has-soji-footer .soji-site-footer {
    margin-top: 24px !important;
}

.custom-breadcrumb {
    padding: 8px 0 12px 0;
    font-size: 0.9em;
    color: #54595d;
    border-bottom: 1px solid #eaecf0;
    margin-bottom: 1em;
}
.custom-breadcrumb a { color: #3366cc; text-decoration: none; }
.custom-breadcrumb a:hover { text-decoration: underline; }

/* ============================================ */
/* Wikitable: zebra rows (default style)        */
/* ============================================ */

/* Row chẵn — màu nền xám nhạt */
.wikitable > tr:nth-child(even) > td,
.wikitable > * > tr:nth-child(even) > td {
    background-color: #f5f7fa;
}

/* Row lẻ — màu trắng */
.wikitable > tr:nth-child(odd) > td,
.wikitable > * > tr:nth-child(odd) > td {
    background-color: #ffffff;
}

/* Header giữ style mặc định */
.wikitable > tr > th,
.wikitable > * > tr > th {
    background-color: #eaecf0;
    font-weight: 600;
}

/* Hover row — highlight nhẹ */
.wikitable > tr:hover > td,
.wikitable > * > tr:hover > td {
    background-color: #eaf3ff;
    transition: background-color 0.15s ease;
}

/* Border row nhẹ hơn cho cảm giác clean */
.wikitable td,
.wikitable th {
    border: 1px solid #e1e4e8;
    padding: 8px 12px;
}

/* PDF */
.pdf-icon {
    font-size: 0.85em;
    opacity: 0.6;
    margin-left: 2px;
}
a:hover .pdf-icon {
    opacity: 1;
}

/* ============================================ */
/* Main Page — Teltonika-style (no card borders)*/
/* ============================================ */

.categories-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);    /* 4 cột, gọn như Teltonika */
    gap: 32px 24px;
    margin: 36px 0;
}

/* Grid 3 cột cho Products */
.categories-list-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* Grid 4 cột cho Information */
.categories-list-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .categories-list-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .categories-list-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 700px) {
    .categories-list-3,
    .categories-list-4 {
        grid-template-columns: 1fr !important;
    }
}

/* Style cho separator <hr> giữa 2 section */
.mw-parser-output > hr {
    border: 0;
    border-top: 1px solid #eaecf0;
    margin: 32px 0;
}

/* Title link không underline */
.category-block-title a {
    color: #1976d2 !important;
    text-decoration: none !important;
}

.category-block-title a:hover {
    text-decoration: underline !important;
}


.category-block {
    /* ❌ KHÔNG có border, background, shadow */
    padding: 0;
    background: transparent;
    border: none;
    text-align: center;
}

/* Header: icon trên, title dưới */
.category-block-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
}

/* Icon đứng trần — không frame xám */
.category-block-icon {
    background: transparent !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
}

.category-block-icon img {
    height: 72px !important;
    width: auto !important;
}

.category-block-title {
    font-size: 1.05em !important;
    color: #1976d2 !important;
    font-weight: 600 !important;
    margin-top: 4px !important;
    display: block !important;
}

.category-block-desc {
    color: #54595d;
    font-size: 0.88em;
    margin: 6px 8px 12px;
    line-height: 1.5;
    min-height: 60px;
}

.category-block-toggle {
    margin-top: 8px;
    padding-top: 0;
    border-top: none;
}

/* Toggle text: xanh + không đậm */
.category-block-toggle span[class*="mw-customtoggle-cb-"] {
    cursor: pointer;
    color: #1976d2 !important;
    font-weight: 400 !important;       /* không đậm */
    font-size: 0.95em;
    user-select: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.category-block-toggle span[class*="mw-customtoggle-cb-"]:hover {
    color: #0d47a1 !important;
    text-decoration: underline;
}

.category-block-toggle span[class*="mw-customtoggle-cb-"]:hover .toggle-arrow {
    border-color: #0d47a1;
}

/* Chevron arrow — mặc định trỏ xuống (collapsed) */
.toggle-arrow {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 2px solid #1976d2;
    border-bottom: 2px solid #1976d2;
    transform: rotate(45deg);             /* trỏ xuống ⌄ */
    transition: transform 0.25s ease;
    margin-top: -4px;
}

/* Khi expanded — xoay lên ⌃ */
.category-block-toggle span[class*="mw-customtoggle-cb-"].is-expanded .toggle-arrow {
    transform: rotate(-135deg);           /* trỏ lên */
    margin-top: 2px;
}


.category-block-toggle span[class*="mw-customtoggle-cb-"]:hover {
    color: #000 !important;
    text-decoration: underline;
}

.category-block-products {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e1e4e8;
    text-align: left;
}

.category-block-products ul {
    margin: 6px 0;
    padding-left: 20px;
}

.category-block-products li {
    margin: 5px 0;
    font-size: 0.9em;
    line-height: 1.5;
}

.category-block-products .mw-collapsible-toggle,
.category-block-products .mw-collapsible-toggle-default,
.category-block-products a.mw-collapsible-text {
    display: none !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .categories-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .categories-list {
        grid-template-columns: 1fr;
    }
    .category-block-desc {
        min-height: auto;
    }
}

/* ============================================ */
/* Document download/view buttons               */
/* ============================================ */

a.btn-download {
    display: inline-block;
    padding: 4px 10px;
    background: #1976d2;
    color: #fff !important;
    border-radius: 4px;
    font-size: 0.88em;
    font-weight: 500;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

a.btn-download:hover {
    background: #0d47a1;
    color: #fff !important;
    text-decoration: none !important;
}

/* Style cho link View (không phải button, chỉ là link icon) */
a[href*=".pdf"][target="_blank"]:not(.btn-download) {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92em;
}

a[href*=".pdf"][target="_blank"]:not(.btn-download):hover {
    text-decoration: underline;
}

/* ============================================ */
/* Global heading styles                        */
/* ============================================ */

/* HEADING (H2) — to, đậm, xanh */
.mw-parser-output h2 {
    font-size: 1.55em !important;
    font-weight: 700 !important;
    color: #1976d2 !important;
    margin: 1.3em 0 0.6em !important;
    padding-bottom: 0.3em !important;
    border-bottom: 1px solid #eaecf0 !important;
    line-height: 1.3 !important;
}

/* SUB-HEADING 1 (H3) — to, không đậm */
.mw-parser-output h3 {
    font-size: 1.35em !important;
    font-weight: 400 !important;
    color: #202122 !important;
    margin: 1em 0 0.4em !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    line-height: 1.3 !important;
}

/* SUB-HEADING 2 (H4) — to vừa, không đậm */
.mw-parser-output h4 {
    font-size: 1.25em !important;
    font-weight: 400 !important;
    color: #202122 !important;
    margin: 0.9em 0 0.35em !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    line-height: 1.3 !important;
    font-style: normal !important;
}

/* SUB-HEADING 3 (H5) — không đậm */
.mw-parser-output h5 {
    font-size: 1.15em !important;
    font-weight: 400 !important;
    color: #202122 !important;
    margin: 0.85em 0 0.3em !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    line-height: 1.3 !important;
    font-style: normal !important;
}

/* SUB-HEADING 4 (H6) — không đậm, không nghiêng */
.mw-parser-output h6 {
    font-size: 1.05em !important;
    font-weight: 400 !important;
    color: #202122 !important;
    margin: 0.8em 0 0.3em !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    line-height: 1.3 !important;
    font-style: normal !important;   /* override Vector default italic */
}

/* Edit link bên cạnh heading */
.mw-parser-output .mw-editsection,
.mw-parser-output .mw-editsection a {
    font-size: 0.6em !important;
    font-weight: 400 !important;
    color: #54595d !important;
}

.mw-parser-output h2 .mw-editsection a {
    color: #1976d2 !important;
}

/* ============================================ */
/* TOC: collapse sub-headings by default        */
/* ============================================ */

/* Ẩn mọi sub-list trong TOC mặc định */
.vector-toc .vector-toc-list .vector-toc-list-item .vector-toc-list {
    display: none;
}

/* Hiển thị khi item được expand */
.vector-toc .vector-toc-list-item-expanded > .vector-toc-list,
.vector-toc-toggle[aria-expanded="true"] ~ .vector-toc-list {
    display: block;
}

/* Hiển thị mũi tên ▶ rõ ràng hơn */
.vector-toc-toggle {
    opacity: 0.7;
    transition: opacity 0.15s;
}

.vector-toc-toggle:hover {
    opacity: 1;
}

body, .mw-parser-output, h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif !important;
}

/* Icon SVG render crisp */
.category-block-icon img,
img[src*="Icon-"] {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}




/* ============================================ */
/* Override all blue to SOJI brand color         */
/* ============================================ */

/* Heading H2 */
.mw-parser-output h2 {
    color: #0054A6 !important;
    border-bottom-color: #eaecf0 !important;
}

/* Page title H1 */
.mw-page-title,
#firstHeading,
h1.firstHeading {
    color: #0054A6 !important;
}

/* Wiki links */
.mw-parser-output a {
    color: #0054A6;
}

.mw-parser-output a:visited {
    color: #003a7a;
}

.mw-parser-output a:hover {
    color: #003a7a;
}

/* Category block title */
.category-block-title,
.category-block-title a {
    color: #0054A6 !important;
}

/* Category block hover border */
.category-block:hover {
    border-color: #0054A6 !important;
}

/* Toggle text */
.category-block-toggle span[class*="mw-customtoggle-cb-"] {
    color: #0054A6 !important;
}

.category-block-toggle span[class*="mw-customtoggle-cb-"]:hover {
    color: #003a7a !important;
}

/* Chevron arrow */
.toggle-arrow {
    border-right-color: #0054A6 !important;
    border-bottom-color: #0054A6 !important;
}

.category-block-toggle span:hover .toggle-arrow {
    border-color: #003a7a !important;
}

/* Document download button */
.doc-download a {
    background: #0054A6 !important;
    color: #fff !important;
}

.doc-download a:hover {
    background: #003a7a !important;
}

/* Document view link */
.doc-view a {
    color: #0054A6 !important;
}

/* Wiki link blue (mặc định Vector) */
a.external,
.mw-body-content a {
    color: #0054A6;
}

/* TOC links */
.vector-toc a,
.vector-toc-link {
    color: #0054A6 !important;
}

/* Sidebar menu links */
.vector-main-menu a,
#p-categorytree-portlet a,
.CategoryTreeLabel,
.CategoryTreeLabel a {
    color: #0054A6 !important;
}

/* Edit link bên cạnh heading */
.mw-parser-output h2 .mw-editsection a {
    color: #0054A6 !important;
}

/* Breadcrumb */
.custom-breadcrumb a {
    color: #0054A6 !important;
}
SOJI Electronics