/*
 | This file is part of the DITA Open Toolkit project.
 | See the accompanying LICENSE file for applicable license.
*/
/*
 | (c) Copyright 2004, 2005 IBM Corporation
 */
body {
    font-family: 'Uni Sans', sans-serif;
    direction: rtl;
    text-align: right;
}

.unresolved {
    background-color: skyblue;
}

.noTemplate {
    background-color: yellow;
}

.base {
    background-color: #ffffff;
}
/* Add space for top level topics */
.nested0 {
    margin-top: 1em;
}
/* div with class=p is used for paragraphs that contain blocks, to keep the XHTML valid */
.p {
    margin-top: 1em;
}
/* Default of italics to set apart figure captions */
.figcap {
    font-style: italic;
}

.figdesc {
    font-style: normal;
}
/* Use @frame to create frames on figures */
.figborder {
    border-style: solid;
    padding-right: 3px;
    padding-left: 3px;
    margin-top: 1em;
    border-color: Silver;
}

.figsides {
    border-right: 2px solid;
    border-left: 2px solid;
    padding-right: 3px;
    padding-left: 3px;
    margin-top: 1em;
    border-color: Silver;
}

.figtop {
    border-top: 2px solid;
    margin-top: 1em;
    border-color: Silver;
}

.figbottom {
    border-bottom: 2px solid;
    border-color: Silver;
}

.figtopbot {
    border-top: 2px solid;
    border-bottom: 2px solid;
    margin-top: 1em;
    border-color: Silver;
}
/* Most link groups are created with <div>. Ensure they have space before and after. */
.ullinks {
    list-style-type: none;
    padding-right: 0;
}

.ulchildlink {
    margin-top: 1em;
    margin-bottom: 1em;
}

.olchildlink {
    margin-top: 1em;
    margin-bottom: 1em;
}

.linklist {
    margin-bottom: 1em;
}

ul.linklist {
    margin-top: 0;
    list-style-type: none;
    padding-right: 0;
}

li.linklist {
    margin-top: 0;
    margin-bottom: 0;
}

.linklistwithchild {
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.sublinklist {
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.relconcepts {
    margin-top: 1em;
    margin-bottom: 1em;
}

.reltasks {
    margin-top: 1em;
    margin-bottom: 1em;
}

.relref {
    margin-top: 1em;
    margin-bottom: 1em;
}

.relinfo {
    margin-top: 1em;
    margin-bottom: 1em;
}

.breadcrumb {
    font-size: smaller;
    margin-bottom: 1em;
}

dt.prereq {
    margin-right: 20px;
}
/* Set heading sizes, getting smaller for deeper nesting */
.topictitle1 {
    font-size: 3em;
    font-weight: bold;
    font-style: oblique;
}

.topictitle2 {
    font-size: 2.55em;
    font-weight: bold;
}

.topictitle3 {
    font-size: 2.1em;
    font-weight: bold;
    font-style: oblique;
}

.topictitle4 {
    margin-top: 0.83em;
    font-size: 1.76em;
    font-weight: bold;
}

.topictitle5 {
    font-size: 1.76em;
    font-weight: bold;
}

.topictitle6 {
    font-size: 1.76em;
    font-style: italic;
}

.sectiontitle {
    margin-top: 1em;
    margin-bottom: 0;
    color: black;
    font-size: 1.17em;
    font-weight: bold;
}

.section {
    margin-top: 1em;
    margin-bottom: 1em;
}

.example {
    margin-top: 1em;
    margin-bottom: 1em;
}

div.tasklabel {
    margin-top: 1em;
    margin-bottom: 1em;
}

h2.tasklabel,
h3.tasklabel,
h4.tasklabel,
h5.tasklabel,
h6.tasklabel {
    font-size: 100%;
}
/* All note formats have the same default presentation */
.note {
    margin-top: 1em;
    margin-bottom: 1em;
}

.notetitle {
    font-weight: bold;
}

.notelisttitle {
    font-weight: bold;
}

.tip {
    margin-top: 1em;
    margin-bottom: 1em;
}

.tiptitle {
    font-weight: bold;
}

.fastpath {
    margin-top: 1em;
    margin-bottom: 1em;
}

.fastpathtitle {
    font-weight: bold;
}

.important {
    margin-top: 1em;
    margin-bottom: 1em;
}

.importanttitle {
    font-weight: bold;
}

.remember {
    margin-top: 1em;
    margin-bottom: 1em;
}

.remembertitle {
    font-weight: bold;
}

.restriction {
    margin-top: 1em;
    margin-bottom: 1em;
}

.restrictiontitle {
    font-weight: bold;
}

.attention {
    margin-top: 1em;
    margin-bottom: 1em;
}

.attentiontitle {
    font-weight: bold;
}

.dangertitle {
    font-weight: bold;
}

.danger {
    margin-top: 1em;
    margin-bottom: 1em;
}

.cautiontitle {
    font-weight: bold;
}

.caution {
    font-weight: bold;
    margin-bottom: 1em;
}

.warning {
    margin-top: 1em;
    margin-bottom: 1em;
}

.warningtitle {
    font-weight: bold;
}

table.hazardstatement {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
}

    table.hazardstatement th,
    table.hazardstatement td {
        padding: 0.5em;
        word-wrap: break-word;
        text-align: right;
    }

.hazardstatement td:first-child {
    width: 10%;
}

.hazardstatement td:last-child {
    width: 90%;
}

.hazardstatement--caution {
    width: 100%;
    text-align: right;
}

.hazardstatement--caution {
    background-color: #ffd100;
}

.hazardstatement--danger {
    background-color: #c8102e;
    color: #fff;
}

.hazardstatement--warning {
    background-color: #ff8200;
}

.hazardstatement--attention,
.hazardstatement--fastpath,
.hazardstatement--important,
.hazardstatement--note,
.hazardstatement--notice,
.hazardstatement--other,
.hazardstatement--remember,
.hazardstatement--restriction,
.hazardstatement--tip {
    background-color: #0072ce;
    color: #fff;
    font-style: italic;
}
/* Simple lists do not get a bullet */
ul.simple {
    list-style-type: none;
    padding-right: 0;
}
/* Used on the first column of a table, when rowheader="firstcol" is used */
.firstcol {
    font-weight: bold;
}
/* Various basic phrase styles */
.bold {
    font-weight: bold;
}

.boldItalic {
    font-weight: bold;
    font-style: italic;
}

.italic {
    font-style: italic;
}

.underlined {
    text-decoration: underline;
}

.uicontrol {
    font-weight: bold;
}

.wintitle {
    font-weight: bold;
}

.parmname {
    font-weight: bold;
}

.kwd {
    font-weight: bold;
}

.defkwd {
    font-weight: bold;
    text-decoration: underline;
}

.var {
    font-style: italic;
}

.shortcut {
    text-decoration: underline;
}

.menucascade > abbr {
    text-decoration: none;
}
/* Default of bold for definition list terms */
.dlterm {
    font-weight: bold;
}
/* Use CSS to expand lists with @compact="no" */
.dltermexpand {
    font-weight: bold;
    margin-top: 1em;
}
/* Compact lists use attributes up to DITA-OT 4.1.2 */
*[compact='yes'] > li {
    margin-top: 0;
}

*[compact='no'] > li {
    margin-top: 0.53em;
}
/* Compact lists use classes starting in DITA-OT 4.1.3 */
.compact > li {
    margin-top: 0;
}

.liexpand {
    margin-top: 1em;
    margin-bottom: 1em;
}

.sliexpand {
    margin-top: 1em;
    margin-bottom: 1em;
}

.dlexpand {
    margin-top: 1em;
    margin-bottom: 1em;
}

.ddexpand {
    margin-top: 1em;
    margin-bottom: 1em;
}

.stepexpand {
    margin-top: 1em;
    margin-bottom: 1em;
}

.substepexpand {
    margin-top: 1em;
    margin-bottom: 1em;
}
/* Align images based on @align on topic/image */
div.imageleft {
    text-align: right;
}

div.imagecenter {
    text-align: center;
}

div.imageright {
    text-align: left;
}

div.imagejustify {
    text-align: justify;
}

.cellrowborder {
    border-left: none;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

.row-nocellborder {
    border-left: none;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

.cell-norowborder {
    border-top: none;
    border-left: none;
    border-bottom: none;
    border-right: none;
}

.nocellnorowborder {
    border: none;
    border-right: none;
    border-bottom: none;
}

pre.screen {
    padding: 5px 5px 5px 5px;
    border: outset;
    background-color: #cccccc;
    margin-top: 2px;
    margin-bottom: 2px;
    white-space: pre;
}

span.filepath,
samp.codeph,
pre.codeblock {
    font-family: monospace;
}

/* flagging styles */

.flag__style--italics {
    font-style: italic;
}

.flag__style--bold {
    font-weight: bold;
}

.flag__style--underline {
    text-decoration: underline;
}

.flag__style--double-underline {
    text-decoration: double-underline;
}

.flag__style--overline {
    text-decoration: overline;
}

/* custom MERIDA styles */
div.fig div.div p.p {
    margin-top: 2px;
    margin-bottom: 2px;
}

div.fig {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align content to the left */
}

.fig--title-label {
    display: block;
    margin-top: 5px;
    text-align: right;
    font-weight: bold;
}

/* Ensure images scale correctly and keep their aspect ratio */
.cmd img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    margin: 0;
}

.fig div.imagecenter, div.imagejustify, div.imageleft, div.imageright {
    width: 100%;
}

/* Figure images: midimage is the default size */
.fig img {
    width: 50% !important;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

    .fig img.wideimage {
        width: 100% !important;
    }

    .fig img.midimage {
        width: 50% !important;
    }

    .fig img.smallimage {
        width: 25% !important;
    }

/* Images outside figures: midimage is the default size */
.topic img.image {
    width: 50% !important;
    max-width: 100%;
    height: auto !important;
}

    .topic img.image.wideimage {
        width: 100% !important;
    }

    .topic img.image.midimage {
        width: 50% !important;
    }

    .topic img.image.smallimage {
        width: 25% !important;
    }

.topictitle1 {
    margin-top: 1em; /* General top margin */
    margin-bottom: 1em; /* General bottom margin */
}

.topictitle2 {
    margin-top: 1.3em; /* General top margin */
    margin-bottom: 0; /* General bottom margin */
}

.topictitle3 {
    margin-top: 1.5em; /* General top margin */
    margin-bottom: 0; /* General bottom margin */
}

/* General styles for heading spacing */
ol,
ul,
dl {
    margin-top: 1em;
}
/* nested <ul class="ul"> inside an li */
.li > .ul {
    margin-top: 0; /* or 0.25em */
}

/*     Preserve original spacing when directly following a higher-level heading*/
.nested2 .topictitle3 {
    margin-top: 1em; /* Override default 1.5em */
}

.table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    border: 1px solid black;
    table-layout: fixed;
    direction: rtl;
}

    .table .row:nth-child(even) {
        background-color: #f0f0f0;
    }

    .table .row:nth-child(odd) {
        background-color: #ffffff;
    }

.note {
    margin-top: 2em; /* Relative to current font size */
}

.nested1 .note,
.nested2 .note,
.nested3 .note {
    margin-top: 1em;
}

.no-zebra .row {
    background-color: transparent !important;
}

.table th {
    background-color: #90c300;
    color: #fff;
    font-weight: bold;
    text-align: right;
}

.tbody {
    display: table-row-group;
}

.row {
    display: table-row;
}

.entry,
.cell-norowborder,
.nocellnorowborder,
.cellrowborder,
.cell-norowborder,
.row-nocellborder {
    border: none !important;
}

/* hazardstatement */
.typeofhazard {
    font-weight: bold;
    font-size: 140%;
}

.consequence {
    font-weight: bold;
}

.howtoavoid {
    display: list-item;
    list-style-type: square;
    margin-right: 20px;
    margin-left: 0;
}

a {
    text-decoration: underline;
    color: #539301;
}

    a:hover {
        color: #90c300;
    }

h1 {
    color: silver;
}

/* make numbering part of the li box */
ol.steps {
    list-style-position: inside;
    padding-left: 0; /* optional: avoids double indent */
}

ol > li.step {
    list-style-position: inside;
}

ol {
    padding-left: 0;
}
/* Step list items: normal list styling with a thin grey separator */
li.step {
    border-bottom: 1px solid silver; /* thin grey line */
    padding-bottom: 0.75em; /* space between content and line */
    margin-bottom: 0.75em; /* space after the line */
}

/* Remove the separator after the last step ... */
ol > li.step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ... BUT keep it if the <ol> is immediately followed by a stepsection or hazardstatement */
ol:has(+ .stepsection) > li.step:last-child,
ol:has(+ .hazardstatement) > li.step:last-child,
ol:has(+ table.hazardstatement) > li.step:last-child {
    /* in case hazardstatement is on the table */
    border-bottom: 1px solid silver;
    padding-bottom: 0.75em;
    margin-bottom: 0.75em;
}

/* Remove margins for paragraphs in table entries as per customer request.*/
td p {
    margin-top: 0 !important;
}

    td p:last-child {
        margin-bottom: 0;
    }

/* Small-screen rules (phones / narrow viewports) */
@media (max-width: 640px) {
    /* Allow headings to break even inside words and scale them down */
    .topictitle1,
    .topictitle2,
    .topictitle3,
    .topictitle4,
    .topictitle5,
    .topictitle6 {
        white-space: normal !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
        hyphens: none !important;
        font-size: clamp(1.1rem, 5.5vw, 2.2rem) !important;
        line-height: 1.08;
        margin-top: 1.2em !important;
    }

    /* Figure image sizes on small screens */
    .fig img,
    .fig img.wideimage,
    .fig img.midimage {
        width: 100% !important;
    }

        .fig img.smallimage {
            width: 50% !important;
        }

    /* Images outside figures on small screens */
    .topic img.image,
    .topic img.image.wideimage,
    .topic img.image.midimage {
        width: 100% !important;
    }

        .topic img.image.smallimage {
            width: 50% !important;
        }

    /* Make wide tables scroll horizontally, only the table scrolls */
    /* This changes display only on small screens so the desktop behavior is unchanged. */
    .table,
    table.hazardstatement {
        display: block !important; /* allow overflow-x on the table element */
        width: 100% !important;
        overflow-x: auto; /* horizontal scroll for the table only */
        -webkit-overflow-scrolling: touch; /* smoother scrolling on iOS */
        box-sizing: border-box;
    }

        /* Prevent columns from being squished to zero width;
     allow table to grow horizontally while page remains stable. */
        .table > .tbody,
        .table > .row,
        .table th,
        .table td,
        table.hazardstatement th,
        table.hazardstatement td {
            white-space: nowrap; /* keep cell content from wrapping into tiny stacks */
            min-width: 8ch; /* let cells expand reasonably (adjust as needed) */
            box-sizing: border-box;
        }
}
