/* Org chart (/people/org, gap item 28) inside the OneGIG shell. Rendered by js/org-chart.js;
   header, footer, title and back link come from the shell. Tokens from tokens.css only (company colours: --c-gig, --c-afico,
   --c-srw, --c-bcoms). Logical properties, so the connectors mirror in Arabic with no overrides.
   44px tap targets; no horizontal overflow from 390 to 1920 (cards shrink and wrap). */
.oc-page{color:var(--ink); font-size:16px; line-height:1.6; padding-block-end:40px; min-width:0;}
.oc-page *, .oc-page *::before, .oc-page *::after{box-sizing:border-box;}
.oc-tools{display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-block-end:16px;}
.oc-search{flex:1 1 320px; min-width:0; max-width:560px;}
.oc-search input{width:100%; min-height:44px; font:inherit; font-size:16px; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px 14px;}
.oc-search input:focus{outline:var(--og-focus-ring); outline-offset:var(--og-focus-offset); border-color:var(--petrol);}
.oc-btns{display:flex; flex-wrap:wrap; gap:8px;}
.oc-btn{display:inline-flex; align-items:center; justify-content:center; min-height:44px; min-width:44px; padding:0 16px; font:inherit; font-size:14px; font-weight:600; color:var(--petrol); background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-sm); cursor:pointer; text-decoration:none;}
.oc-btn:hover{background:var(--petrol-tint); border-color:var(--petrol);}
.oc-btn[disabled]{opacity:.6; cursor:progress;}
.oc-btn-main{color:var(--surface); background:var(--petrol); border-color:var(--petrol);}
.oc-btn-main:hover{background:var(--ink); border-color:var(--ink);}
.oc-btn:focus-visible, .oc-tg:focus-visible, .oc-team:focus-visible, .oc-found:focus-visible{outline:var(--og-focus-ring); outline-offset:var(--og-focus-offset);}
.oc-nav{display:flex; flex-wrap:wrap; gap:8px; margin-block-end:16px;}
.oc-nav[hidden], .oc-more[hidden]{display:none;}
.oc-host{min-height:120px; min-width:0;}
.oc-co{display:flex; align-items:center; gap:10px; margin:24px 0 10px; font-size:18px; line-height:1.4; color:var(--petrol); overflow-wrap:anywhere;}
.oc-co:first-child{margin-block-start:0;}
.oc-dot{flex:0 0 auto; width:12px; height:12px; border-radius:50%; background:var(--oc-c, var(--petrol));}
[data-ent="GIG"]{--oc-c:var(--c-gig);} [data-ent="AFICO"]{--oc-c:var(--c-afico);} [data-ent="SRW"]{--oc-c:var(--c-srw);} [data-ent="BCOMS"]{--oc-c:var(--c-bcoms);}
.oc-roots, .oc-kids{list-style:none; margin:0; padding:0;}
.oc-roots{display:flex; flex-direction:column; gap:10px;}
.oc-kids{display:flex; flex-direction:column; gap:10px; margin-block-start:10px; margin-inline-start:22px; padding-inline-start:20px;}
.oc-kids.oc-collapsed{display:none;}
.oc-item{position:relative; min-width:0;}
/* Connectors: an elbow into every child and a vertical line down to the next sibling. Logical, so RTL mirrors. */
.oc-kids > .oc-item::before{content:""; position:absolute; inset-inline-start:-20px; top:0; width:18px; height:34px; border-inline-start:2px solid var(--line); border-block-end:2px solid var(--line); border-end-start-radius:10px;}
.oc-kids > .oc-item:not(:last-child)::after{content:""; position:absolute; inset-inline-start:-20px; top:34px; bottom:-10px; border-inline-start:2px solid var(--line);}
.oc-card{position:relative; display:flex; align-items:center; gap:10px; min-height:64px; padding:10px 12px; background:var(--surface); border:1px solid var(--line); border-inline-start:4px solid var(--oc-c, var(--petrol)); border-radius:var(--radius); box-shadow:var(--shadow); min-width:0;}
.oc-card.oc-hit{background:var(--petrol-tint); border-color:var(--petrol); border-inline-start-color:var(--oc-c, var(--petrol));}
.oc-tg{flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; margin-inline-start:-6px; padding:0; color:var(--petrol); background:transparent; border:0; border-radius:var(--radius-sm); cursor:pointer;}
.oc-tg:hover{background:var(--petrol-tint);}
.oc-tg-none{cursor:default; pointer-events:none;}
.oc-chev{transition:transform var(--t-fast) var(--ease);}
html[dir="rtl"] .oc-chev{transform:scaleX(-1);}
.oc-tg[aria-expanded="true"] .oc-chev, html[dir="rtl"] .oc-tg[aria-expanded="true"] .oc-chev{transform:rotate(90deg);}
.oc-spin{width:16px; height:16px; border:2px solid var(--line); border-top-color:var(--petrol); border-radius:50%; animation:oc-spin .8s linear infinite;}
@keyframes oc-spin{to{transform:rotate(360deg);}}
.oc-av{position:relative; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; overflow:hidden; font-size:15px; font-weight:700; color:var(--petrol); background:var(--petrol-tint); border-radius:50%; box-shadow:0 0 0 2px var(--oc-c, var(--petrol));}
.oc-av img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover;}
.oc-txt{flex:1 1 auto; min-width:0; display:flex; flex-direction:column;}
.oc-name{color:var(--petrol); font-size:16px; font-weight:700; overflow-wrap:anywhere;}
.oc-title{color:var(--ink); font-size:14px; overflow-wrap:anywhere;}
.oc-dept{color:var(--muted); font-size:13px; overflow-wrap:anywhere;}
.oc-side{flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; gap:4px;}
.oc-ent{padding:2px 10px; font-size:12px; font-weight:700; color:var(--ink); background:var(--bg); border:1px solid var(--line); border-radius:999px; white-space:nowrap;}
.oc-count{font-size:12px; color:var(--muted); white-space:nowrap;}
.oc-team{flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; color:var(--petrol); border-radius:var(--radius-sm);}
.oc-team:hover{background:var(--petrol-tint);}
.oc-err{padding:10px 14px; font-size:14px; color:var(--danger); background:var(--amber-bg); border:1px solid var(--line); border-radius:var(--radius-sm);}
.oc-err .oc-btn{margin-inline-start:8px;}
.oc-more{margin-block-start:28px; max-width:720px;}
.oc-more h2{margin:0 0 4px; font-size:18px; color:var(--petrol);}
.oc-more p{margin:0 0 10px; font-size:14px; color:var(--muted);}
.oc-more ul{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px;}
.oc-found{display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; min-height:44px; padding:10px 14px; color:var(--ink); text-decoration:none; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-sm);}
.oc-found:hover{border-color:var(--petrol);}
.oc-found b{color:var(--petrol); overflow-wrap:anywhere;} .oc-found span{font-size:14px; overflow-wrap:anywhere;} .oc-found small{color:var(--muted);}
@media (max-width:900px){ .oc-kids{margin-inline-start:14px; padding-inline-start:14px;} .oc-kids > .oc-item::before, .oc-kids > .oc-item:not(:last-child)::after{inset-inline-start:-14px;} .oc-kids > .oc-item::before{width:12px;} }
@media (max-width:560px){
  .oc-kids{margin-inline-start:6px; padding-inline-start:10px;}
  .oc-kids > .oc-item::before, .oc-kids > .oc-item:not(:last-child)::after{inset-inline-start:-10px;} .oc-kids > .oc-item::before{width:8px;}
  .oc-card{flex-wrap:wrap; gap:8px; padding:8px 10px;}
  .oc-tg{margin-inline-start:-4px;}
  .oc-av{width:40px; height:40px;}
  .oc-txt{flex:1 1 calc(100% - 140px);}
  .oc-side{flex-direction:row; align-items:center; flex-wrap:wrap; flex-basis:100%; padding-inline-start:54px;}
  .oc-btns{width:100%;} .oc-btns .oc-btn{flex:1 1 auto;}
}
@media (prefers-reduced-motion:reduce){ .oc-chev{transition:none;} .oc-spin{animation:none;} }
/* Print: only the chart, every loaded branch open, no controls, company colours kept. */
@media print{
  body.section-orgchart *{visibility:hidden !important;}
  body.section-orgchart #ocPage, body.section-orgchart #ocPage *{visibility:visible !important;}
  body.section-orgchart #ocPage{position:absolute; inset-inline:0; top:0; padding:0;}
  body.section-orgchart .oc-noprint, body.section-orgchart .oc-noprint *{display:none !important;}
  .oc-kids.oc-collapsed{display:flex !important;}
  .oc-card{box-shadow:none; break-inside:avoid; -webkit-print-color-adjust:exact; print-color-adjust:exact;}
  .oc-co{break-after:avoid;}
  .oc-tg{display:none;}
  .oc-dot, .oc-av{-webkit-print-color-adjust:exact; print-color-adjust:exact;}
}
/* "View in org chart" link on a People card (only rendered when the flag is on). */
.cc-porg{display:flex; align-items:center; gap:7px; min-height:44px; margin-top:6px; padding-top:6px; border-top:1px solid var(--line); font-size:13px; font-weight:600; text-decoration:none; color:var(--petrol) !important;}
.cc-porg:hover span{text-decoration:underline;}
