/*
 * TERA OPTIONS — help centre (/support). Builds on css/home.css (body.home: colours, type, header, footer,
 * buttons, sections); everything here is scoped to body.hc. Logical properties, so the Arabic page mirrors.
 */

/* ---------- search (the page title block is .hm-top in home.css) ---------- */
.hc-search { position: relative; max-width: 720px; margin-top: 28px; }
.hc-search svg { position: absolute; inset-inline-start: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.hc-search input { width: 100%; height: 56px; padding: 0 16px; padding-inline-start: 48px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; color: var(--ink);
  font-family: inherit; font-size: 17px; box-shadow: 0 1px 2px rgba(10, 26, 51, 0.04); outline: none; transition: border-color .15s, box-shadow .15s; }
.hc-search input::placeholder { color: var(--faint); }
.hc-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36, 83, 217, 0.15); }
.hc-popular { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: 16px !important; font-size: 14px; color: var(--muted); }
.hc .hc-popular a { color: var(--brand); text-decoration: none; }
@media (hover: hover) { .hc .hc-popular a:hover { text-decoration: underline; } }

/* ---------- body: topics and answers ---------- */
.hc-body { padding: 56px 0 96px; scroll-margin-top: 68px; }
.hc-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; }
.hc-side { position: sticky; top: 92px; }
.hc-side-h { font-size: 13px !important; font-weight: 600 !important; color: var(--muted) !important; text-transform: uppercase; letter-spacing: 0.08em !important; margin-bottom: 10px !important; }
html[lang="ar"] .hc-side-h { text-transform: none; letter-spacing: 0 !important; font-size: 14px !important; }
.hc-cats { display: grid; gap: 2px; }
.hc-cat { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text); font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.35; text-align: start; cursor: pointer; }
.hc-cat .hc-n { flex: none; font-family: var(--mono); font-size: 13px; color: var(--faint); }
@media (hover: hover) { .hc-cat:hover { background: var(--soft); color: var(--ink); } }
.hc-cat[aria-pressed="true"] { background: var(--soft); color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }
html[dir="rtl"] .hc-cat[aria-pressed="true"] { box-shadow: inset -2px 0 0 var(--brand); }

.hc-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.hc-list-head h2 { font-size: clamp(24px, 2.4vw, 28px); line-height: 1.25; overflow-wrap: anywhere; }
.hc-list-head button { flex: none; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--brand); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.hc-loading { color: var(--muted); padding: 20px 0; }
.hc-group + .hc-group { margin-top: 48px; }
.hc-group h3 { font-size: 15px; font-weight: 600; color: var(--muted); padding-bottom: 12px; }
.hc-list { border-top: 1px solid var(--line-2); }
.hc-art { border-bottom: 1px solid var(--line-2); scroll-margin-top: 92px; }
.hc-art summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; color: var(--ink); font-size: 17px; font-weight: 500; line-height: 1.45; }
.hc-art summary::-webkit-details-marker { display: none; }
.hc-art summary::after { content: ''; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.hc-art[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
@media (hover: hover) { .hc-art summary:hover { color: var(--brand); } }
.hc-art summary small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--faint); }
.hc-ans { padding: 0 0 22px; max-width: 46em; color: var(--text); font-size: 16px; line-height: 1.7; }
.hc-ans p { margin: 0 0 12px; }
.hc-ans ul, .hc-ans ol { margin: 0 0 12px; padding-inline-start: 22px; display: grid; gap: 6px; }
.hc-ans strong { color: var(--ink); font-weight: 600; }
.hc .hc-ans a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.hc-vote { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.hc-vote span { margin-inline-end: 4px; }
.hc-vote .hm-btn { min-height: 34px; padding: 0 14px; font-size: 14px; }
.hc-thanks { color: var(--up); font-weight: 500; }
.hc-empty { padding: 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.hc-empty p { color: var(--muted); }
.hc-empty b { color: var(--ink); font-weight: 600; font-size: 17px; }
.hc-empty .hm-btn { margin-top: 18px; }

/* ---------- contact ---------- */
.hc-contact .hm-cols3 > div { display: flex; flex-direction: column; align-items: flex-start; }
.hc-contact .hm-cols3 .hm-btn { margin-top: 20px; }
.hc-presence { display: flex; align-items: center; gap: 8px; color: var(--ink) !important; font-weight: 500; font-size: 15px; }
.hc-mail { margin-top: 4px !important; margin-bottom: 8px !important; }
.hc .hc-mail a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.hc-links { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.hc .hc-links a { display: inline-block; padding: 5px 0; text-decoration: none; font-weight: 500; }
@media (hover: hover) { .hc .hc-mail a:hover, .hc .hc-links a:hover { text-decoration: underline; } }

/* ---------- the support chat, in this page's type and colours ---------- */
body.hc { --font-sans: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
html[lang="ar"] body.hc { --font-sans: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; }
.hc .sc-launcher { background: var(--brand); border-radius: 6px; box-shadow: 0 10px 24px -8px rgba(10, 26, 51, 0.45); }
@media (hover: hover) { .hc .sc-launcher:hover { transform: none; background: var(--brand-2); box-shadow: 0 10px 24px -8px rgba(10, 26, 51, 0.45); } }
.hc .sc-panel { border-radius: 10px; background: var(--navy); }
.hc .sc-av { background: var(--brand); }
/* the chat keeps its own (light-on-dark) text: the page's heading, paragraph and link colours stop at its edge */
.hc .sc-panel :is(h1, h2, h3, h4) { color: var(--c-text); }
.hc .sc-fine a { color: var(--c-text-2); }

/* ---------- smaller screens ---------- */
@media (max-width: 1023px) {
  .hc-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } /* minmax: the tab row scrolls instead of widening the page */
  .hc-side { position: static; }
  .hc-side-h { display: none; }
  /* topics: one swipeable row of tabs */
  .hc-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: -24px; padding-inline: 24px; }
  .hc-cats::-webkit-scrollbar { display: none; }
  .hc-cat { flex: none; width: auto; min-height: 38px; padding: 0 14px; gap: 8px; border: 1px solid var(--line-2); background: #fff; font-size: 14px; white-space: nowrap; }
  .hc-cat[aria-pressed="true"], html[dir="rtl"] .hc-cat[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: none; }
  .hc-cat[aria-pressed="true"] .hc-n { color: #9fb0c8; }
  .hc-body { padding: 36px 0 72px; }
}
@media (max-width: 640px) {
  .hc-search { margin-top: 22px; }
  .hc-search input { height: 52px; font-size: 16px; }
  .hc-popular { gap: 6px 14px; }
  .hc-cats { margin-inline: -16px; padding-inline: 16px; }
  /* while searching, the answers come straight after the search box */
  .hc-body.is-searching .hc-side { display: none; }
  .hc-art summary { font-size: 16px; padding: 16px 0; gap: 16px; }
  .hc-ans { font-size: 15px; }
  .hc-group + .hc-group { margin-top: 36px; }
  .hc-empty { padding: 22px; }
  /* room under the footer for the chat button */
  .hc .hm-footer { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}
