@import "styles.css";

@font-face {
  font-family: 'Code';
  src: url(resources/DroidSansMonoRegular.ttf) format('truetype');
}

ol.alpha{
    list-style-type:lower-alpha;
}
/*code-font*/
*[class~='pr-d/codeblock'],
*[class~='codeblock'],
*[class~='pr-d/codeph'],
*[class~='codeph'] {
  font-family: 'Code', monospace;
}

@media print {
  p {
       text-align: justify;
  }

  *[class ~= "topic/p"], *[class ~= "topic/note"], *[class ~= "topic/section"]
  {
      text-align: justify;
  }

  .dark-only {
      display: none !important;
  }
}

@media screen {
  *[class ~= "wh_logo"]
  {
      width: 20rem;
  } 
  
  /*Displays book part number as breadcrumb root*/
  *[class ~= "home"] span{
      display: none;
  }
  *[class ~= "home"] >  :after {
      content: "Home \2302";
  }
  
    math {
  font-size: x-large;
}
}

*[class ~= "front-page/front-page"]:before(2) {

    background-image: url("./resources/logo.svg");

    margin-top: 2cm;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 8cm 100%;
    height: 3cm;
    width: 12.8cm;
    display: inline-block;
    content: "";

}

*[class ~= "front-page/front-page"]:before {

    background-image: url(oxy_xpath('//*[contains(@class, " bookmap/bookmeta ")]//*[contains(@name, "feature.image")]/@value'));
    background-position: center;
    margin-top: 1cm;
    background-repeat: no-repeat;
    background-size: 12.8cm 7cm;
    display: block;
    width: 12.8cm;
    height: 7cm;
    content: "";
}


*[class ~= "front-page/front-page-title"]:before(2) {
    margin-top: 1cm;
    font-family: BrandingFont;
    line-height: 1em;
    width: 10cm;
    display: block;
    margin-left: auto;
    margin-right: auto;
    content: oxy_xpath('//*[contains(@class, " bookmap/bookmeta ")]//*[contains(@name, "title.type")]/@value');
}
*[class ~= "front-page/front-page-title"]:before(1) {
    font-family: BrandingFont;
    line-height: 1em;
    width: 10cm;
    display: block;
    margin-left: auto;
    margin-right: auto;
    content: oxy_xpath('//*[contains(@class, " bookmap/bookmeta ")]//*[contains(@name, "title.products")]/@value');
}

*[class ~= "front-page/front-page-title"] {
    margin-top: 0cm;
    content: '';
}

*[class ~= "front-page/front-page-title"]:after {
    font-family: BrandingFont;
    color: var(--brand-front-page-subtitle);
    font-size: 10pt;
    font-style: italic;
    content: oxy_xpath('//*[contains(@class, " bookmap/bookmeta ")]/*[contains(@class, " bookmap/bookid ")]/*[contains(@class, " bookmap/bookpartno ")]/text()')
 " (" oxy_xpath('//*[contains(@class, " bookmap/bookmeta ")]//*[contains(@class, " topic/revised ")]/@modified') " )";
}

.metadata-container {
    display: flex;
    align-items: center;
    gap: 20px; /* Space between elements */
    padding: 10px;
    margin-bottom: 15px;
    background: var(--brand-metadata-bg);
    border-radius: 5px;
    border-left: 4px solid var(--brand-metadata-border);
}

.metadata {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.metadata .icon {
    display: inline-flex;
    align-items: center;
    margin-right: 5px;
    color: var(--brand-metadata-border);
}

.metadata .label {
    font-weight: bold;
    margin-right: 5px;
}

.metadata .value {
    color: var(--brand-metadata-value);
}

/* Override oxygen.css base skin rules that weren't active in production
   (oxygen.css was previously only a resource file, not a linked stylesheet).
   Now that it's loaded for dark mode variable support, we override the
   rules that conflict with our Styles Basket customizations. */
.wh_top_menu {
    text-transform: none;
}
.wh_tile {
    font-weight: normal;
}
.wh_main_page .wh_search_input {
    padding: 20px 0;
}
.wh_tools {
    background-color: var(--wh-primary-bg);
}
.wh_publication_title > a {
    color: var(--wh-link-color);
}
.wh_publication_toc {
    border-radius: 0;
}
.webhelp_full_width_link {
    display: none;
}

/* Definition lists: grid layout — term in narrow left column, definition beside it.
   Force all dd into column 2 so multiple consecutive dd elements (e.g. expanded
   descriptions in DITA dlentry) don't wrap into the term column. */
dl {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1.5em;
    row-gap: 0.4em;
    align-items: baseline;
}
dl > dt {
    grid-column: 1;
    margin: 0;
    font-weight: bold;
}
dl > dt::after {
    content: " :";
}
dl > dd {
    grid-column: 2;
    margin: 0;
}

/* Full-width tables — DITA pgwide="1" produces this class but Oxygen WebHelp
   doesn't ship a default rule for it.  Force 100 % so every table with the
   attribute fills its container and columns align across sibling tables. */
.table--pgwide-1 {
    width: 100%;
}

/* Image sizing utilities — use via outputclass on <image> */
.half-width {
    width: 50%;
}

/* Drift table — section headers (merged rows separating as-found / Δ / En).
   Reuse brand table-header variables so they match the rest of the theme. */
td.drift-section-header {
    background-color: var(--brand-table-header-bg);
    color: var(--wh-strong-color);
    font-weight: bold;
    font-size: 0.85em;
}

/* Drift table — continuous Dev/Spec gradient highlighting.
   Color = conformity (blue=in-spec, red=out-of-spec).
   Opacity = |Dev/Spec| (proximity to specification limit).
   --ds CSS custom property is injected by XSLT extension.
   Clamped to [0, 1.5]: full intensity at 1.5x spec. */
td.drift-in-spec {
    background-color: rgba(var(--brand-drift-sig-rgb),
        calc(clamp(0, var(--ds, 0), 1.5) / 1.5 * 0.30));
}
td.drift-out-of-spec {
    background-color: rgba(var(--brand-drift-fail-rgb),
        calc(clamp(0, var(--ds, 0), 1.5) / 1.5 * 0.35));
    color: var(--brand-drift-fail-color);
    font-weight: bold;
}

/* Legacy: out-of-spec without gradient (non-drift tables) */
td.out-of-spec {
    background-color: rgba(var(--brand-drift-fail-rgb), 0.12);
    color: var(--brand-drift-fail-color);
    font-weight: bold;
}