/* Omegit shared stylesheet: loaded for every theme via templates/custom/header.tmpl.
 * 1) Arabic typography  2) flat UI (no shadows)  3) RTL fixes for dir="rtl"  4) landing page + footer brand.
 * Self-hosted fonts only (no third-party CDN). IBM Plex Sans Arabic: SIL OFL 1.1, see ../fonts/OFL-IBMPlexSansArabic.txt */

/* 1. Arabic typography: unicode-range limits these faces to Arabic script, Latin keeps the system UI font. */
@font-face { font-family: "Omegit Arabic"; src: url("../fonts/IBMPlexSansArabic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Omegit Arabic"; src: url("../fonts/IBMPlexSansArabic-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Omegit Arabic"; src: url("../fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Omegit Arabic"; src: url("../fonts/IBMPlexSansArabic-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
:root { --fonts-override: "Omegit Arabic", var(--fonts-proportional); }
html[lang="ar"] body { line-height: 1.6; }

/* 2. Flat: no drop shadows on menus, popups, modals, cards and segments (borders carry the structure). */
.ui.menu, .ui.segment, .ui.segments, .ui.card, .ui.cards > .card, .ui.modal, .ui.popup, .tippy-box,
.ui.dropdown .menu, .ui.selection.dropdown .menu, .ui.floating.dropdown > .menu, .ui.floating.dropdown .menu,
.ui.label, .ui.button, .ui.buttons .button, .ui.input input, .ui.form input, .ui.form textarea, .ui.attached.segment,
.repository .header-wrapper, .flash-message, .ui.message, .navbar-right .ui.dropdown .menu {
  box-shadow: none !important;
}
.ui.button:focus-visible, .ui.input input:focus, .ui.form input:focus, .ui.form textarea:focus {
  outline: 2px solid var(--color-primary-alpha-50); outline-offset: 1px;
}

/* 3. RTL (Arabic). Gitea is laid out mostly with flexbox, which mirrors automatically under dir="rtl";
 *    these rules cover text alignment, code and identifiers that must stay LTR, and directional icons. */
html[dir="rtl"] .ui.form .field > label, html[dir="rtl"] .ui.dropdown .menu > .item, html[dir="rtl"] .ui.menu .item { text-align: start; }
html[dir="rtl"] .markup[dir="auto"] { text-align: start; }   /* user content keeps its own direction (dir="auto") */
html[dir="rtl"] pre, html[dir="rtl"] code, html[dir="rtl"] kbd, html[dir="rtl"] .code-view, html[dir="rtl"] .lines-num,
html[dir="rtl"] .lines-code, html[dir="rtl"] .diff-file-box, html[dir="rtl"] .file-view, html[dir="rtl"] .commit-id,
html[dir="rtl"] .sha, html[dir="rtl"] .ui.sha.label, html[dir="rtl"] .repo-clone-url, html[dir="rtl"] .clone-panel input,
html[dir="rtl"] input[type="url"], html[dir="rtl"] input[type="email"], html[dir="rtl"] .monaco-editor, html[dir="rtl"] .cm-editor {
  direction: ltr; text-align: left; unicode-bidi: isolate;
}
/* paragraphs/headings take their direction from their own first strong character (mixed Arabic/English READMEs) */
html[dir="rtl"] .markup p, html[dir="rtl"] .markup h1, html[dir="rtl"] .markup h2, html[dir="rtl"] .markup h3,
html[dir="rtl"] .markup blockquote { unicode-bidi: plaintext; text-align: start; }
html[dir="rtl"] .octicon-arrow-right, html[dir="rtl"] .octicon-arrow-left, html[dir="rtl"] .octicon-chevron-right,
html[dir="rtl"] .octicon-chevron-left, html[dir="rtl"] .octicon-reply { transform: scaleX(-1); }
html[dir="rtl"] .ui.dropdown > .dropdown.icon { margin-left: 0; margin-right: .5em; }
html[dir="rtl"] .ui.dropdown .menu { left: auto; right: 0; }
html[dir="rtl"] .ui.dropdown .menu.left, html[dir="rtl"] .navbar-right .ui.dropdown .menu { right: auto; left: 0; }
html[dir="rtl"] .ui.label > .icon, html[dir="rtl"] .ui.button > .svg:not(:only-child) { margin-left: .4em; margin-right: 0; }
html[dir="rtl"] .navbar-right > .item > .svg:not(:only-child) { margin-left: .35em; }

/* 4a. Footer brand */
.omegit-footer-brand { display: inline-flex; align-items: center; gap: 6px; }
.omegit-footer-brand img { display: block; }

/* 4b. Landing page */
.omegit-home { padding: 72px 24px 48px; }
.omegit-hero { max-width: 760px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.omegit-hero-mark { display: block; margin-bottom: 20px; }
.omegit-hero-title { font-size: 48px; font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--color-text-dark); }
.omegit-hero-tagline { font-size: 22px; font-weight: 500; color: var(--color-primary); margin: 10px 0 0; }
.omegit-hero-desc { font-size: 16px; color: var(--color-text-light-2); max-width: 600px; margin: 14px 0 0; }
.omegit-hero-actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; justify-content: center; }
.omegit-features { max-width: 1040px; margin: 64px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.omegit-feature { border: 1px solid var(--color-secondary); border-radius: 12px; padding: 20px; background: var(--color-box-body); text-align: start; }
.omegit-feature .svg { color: var(--color-primary); }
.omegit-feature h3 { font-size: 16px; margin: 12px 0 6px; color: var(--color-text); }
.omegit-feature p { margin: 0; color: var(--color-text-light-2); font-size: 14px; line-height: 1.55; }

/* 4c. The navbar "Help" item links to the upstream Gitea documentation; hidden until an Omegit help page exists. */
.navbar a.item[href="https://docs.gitea.com"], .ui.dropdown .menu a.item[href="https://docs.gitea.com"] { display: none !important; }
