/*
 * Basic style
 */

.man-page-content div.manual-text {
    text-align: justify;
    margin-left: 5ex;
}

/* don't align nested elements */
.man-page-content div.manual-text table table,
.man-page-content div.manual-text table dl,
.man-page-content div.manual-text dl table,
.man-page-content div.manual-text dl dl {
    text-align: initial;
}

/* fix top margin */
.man-page-content > :first-child,
.package-info > :first-child {
    margin-top: 0;
}
.man-page-content table.head,
.man-page-content table.foot {
    border-spacing: 0px;  /* chromium sets it to 2px by default */
}
.man-page-content table.head td,
.man-page-content table.foot td {
    padding: 0px;
}

/* Override top margin for paragraphs (needs to be the same as bottom margin,
 * because mandoc creates elements with text of the first paragraph outside <p>.
 * The value 0.6em is consistent with the margins assigned to markup elements
 * such as ".Bl-tag > dd".
 */
.man-page-content p {
    margin-top: 0.6em;
    margin-bottom: 0.6em;
}
/* Override top margin of first children in elements for which mandoc sets zero
 * margin (cannot be done everywhere because of the note above).
 */
.Bl-compact > li > :first-child,
.Bl-tag > dt > :first-child,
.Bl-tag > dd > :first-child,
.Bl-compact > dd > :first-child,
.Bl-compact > dt > :first-child,
.Bl-compact > tbody > tr > td > :first-child
{
    margin-top: 0em;
}
/* Override bottom margin of all last children except headers.
 * (mandoc creates some sections where <h1> or <h2> is the only element and
 * the text is not inside <p>
 */
.man-page-content :last-child:not(h1.Sh):not(h2.Ss) {
    margin-bottom: 0em;
}


/*
 * Custom styles for mandoc elements.
 * (upstream styles are overridden with the .man-page-content selector)
 */

/* font sizes */
.man-page-content h1.Sh {
    font-size: 1.25em;
    margin-left: -4ex;
    border-bottom: none;
}
.man-page-content h2.Ss {
    font-size: 1.1em;
    margin-left: -2ex;
    border-bottom: none;
}

/* fancy anchor links */
.man-page-content a.permalink {
    color: inherit;
    text-decoration: inherit;
    border-bottom: thin dotted;
}
.man-page-content a.permalink:only-child:hover:after {
    /* :only-child is necessary, otherwise the following text would be shifted */
    /* (alternatively we could match only links inside <h1> etc. */
    content: " ¶";
}

/* Arch-styled tables
 * style copied from base.css and changed:
 * - applied to the "tbl" class
 * - removed "white-space: nowrap"
 * - "th" style applied also to "td" in the first row
 * - top and bottom margins set to 1em for consistency with other markup elements
 *   (they have to be the same because mandoc creates elements with text of the
 *   first paragraph outside <p>)
 */
.man-page-content table.tbl {
    background: #ecf2f5 none repeat scroll 0 0;
    border: 1px solid #bcd;
    margin-top: 0.6em;
    margin-bottom: 0.6em;
    padding: 0.65em;
    font-size: 1.00em;
    border-collapse: collapse;
}

.man-page-content table.tbl tr td,
.man-page-content table.tbl th {
    padding: 0.35em 0.90em;
    text-align: left;
}

.man-page-content table.tbl th,
.man-page-content table.tbl tr:first-child td:not(:only-child) {
    background: rgb(217, 230, 236) none repeat scroll 0 0;
    border-bottom: 1px solid #bcd;
    font-weight: bold;
    word-break: initial;
}

.man-page-content table.tbl tr:hover {
    background-color: rgb(228, 237, 241)
}

.man-page-content table.tbl tr td {
    border-top: 1px dotted #bcd;
    border-bottom: 1px dotted #bcd;
}

/*
 * these were copied from mandoc.css and limited only to the children of our
 * man-page-content wrapper
 */
.man-page-content * { clear: both }
.man-page-content td { vertical-align: top; }
.man-page-content ul,
.man-page-content ol,
.man-page-content table,
.man-page-content dl {
    margin-top: 1ex;
    margin-bottom: 1ex;
}
/* unlike upstream, only nested dl's have zero margins */
.man-page-content table table,
.man-page-content table dl,
.man-page-content dl table,
.man-page-content dl dl {
    margin-top: 0ex;
    margin-bottom: 0ex;
}
.man-page-content li,
.man-page-content dt {
    margin-top: 1em;
}

/* override overflow:auto -> overflow:initial (a scrollbar sometimes appeared with auto) */
.man-page-content dd.It-tag { overflow:initial; }

/* hide <br> tags immediately following a block tag (pre or div) */
.man-page-content pre + br,
.man-page-content div + br {
    display: none;
}
/* hide <br> tags which are the first or the last child node */
.man-page-content br:first-child,
.man-page-content br:last-child {
    display: none;
}


/*
 * The following rules were copied from the upstream mandoc.css file and modified:
 * - Margins of ".Bl-hang > dd", ".Bl-tag" and ".Bl-tag > dt" were changed from
 *   5.5em to 3.8em to match ".Bd-indent".
 * - "font-family" was removed from all rules. The font family should be assigned
 *   to tags, not to tag classes.
 * - ".Nd" is styled with "display: inline;"
 * - ".HP" is removed/disabled (deprecated macro, cannot be represented in HTML)
 * - added ".Bd-indent > pre:only-child" to cancel useless indentation of pre tags
 */

/* Header and footer lines. */

table.head {    width: 100%;
                border-bottom: 1px dotted #808080;
                margin-bottom: 1em;
                font-size: smaller; }
td.head-vol {   text-align: center; }
td.head-rtitle {
                text-align: right; }

table.foot {    width: 100%;
                border-top: 1px dotted #808080;
                margin-top: 1em;
                font-size: smaller; }
td.foot-os {    text-align: right; }

/* Sections and paragraphs. */

.manual-text {
                margin-left: 3.8em; }
.Nd {           display: inline; }
section.Sh { }
h1.Sh {         margin-top: 1.2em;
                margin-bottom: 0.6em;
                margin-left: -3.2em;
                font-size: 110%; }
section.Ss { }
h2.Ss {         margin-top: 1.2em;
                margin-bottom: 0.6em;
                margin-left: -1.2em;
                font-size: 105%; }
.Pp {           margin: 0.6em 0em; }
.Sx { }
.Xr { }

/* Displays and lists. */

.Bd { }
.Bd-indent {    margin-left: 3.8em; }
/* cancel useless indentation of pre tags (leave visual left margin of 1em) */
.Bd-indent > pre:only-child {
                margin-left: -2.8em;
                margin-top: 0em; }
/* cancel useless double-indent */
.Bd-indent > .Bd-indent:only-child {
                margin-left: 0em; }

.Bl-bullet {    list-style-type: disc;
                padding-left: 1em; }
.Bl-bullet > li { }
.Bl-dash {      list-style-type: none;
                padding-left: 0em; }
.Bl-dash > li:before {
                content: "\2014  "; }
.Bl-item {      list-style-type: none;
                padding-left: 0em; }
.Bl-item > li { }
.Bl-compact > li {
                margin-top: 0em; }

.Bl-enum {      padding-left: 2em; }
.Bl-enum > li { }
.Bl-compact > li {
                margin-top: 0em; }

.Bl-diag { }
.Bl-diag > dt {
                font-style: normal;
                font-weight: bold; }
.Bl-diag > dd {
                margin-left: 0em; }
.Bl-hang { }
.Bl-hang > dt { }
.Bl-hang > dd {
                margin-left: 3.8em; }
.Bl-inset { }
.Bl-inset > dt { }
.Bl-inset > dd {
                margin-left: 0em; }
.Bl-ohang { }
.Bl-ohang > dt { }
.Bl-ohang > dd {
                margin-left: 0em; }
.Bl-tag {       margin-top: 0.6em;
                margin-left: 3.8em; }
.Bl-tag > dt {
                float: left;
                width: 100%;
                margin-top: 0em;
                margin-left: -3.8em;
                padding-right: 0.5em;
                vertical-align: top; }
.Bl-tag > dd {
                clear: right;
                width: 100%;
                margin-top: 0em;
                margin-left: 0em;
                margin-bottom: 0.6em;
                vertical-align: top;
                overflow: auto; }
.Bl-compact {   margin-top: 0em; }
.Bl-compact > dd {
                margin-bottom: 0em; }
.Bl-compact > dt {
                margin-top: 0em; }

.Bl-column { }
.Bl-column > tbody > tr { }
.Bl-column > tbody > tr > td {
                margin-top: 1em; }
.Bl-compact > tbody > tr > td {
                margin-top: 0em; }

.Rs {           font-style: normal;
                font-weight: normal; }
.RsA { }
.RsB {          font-style: italic;
                font-weight: normal; }
.RsC { }
.RsD { }
.RsI {          font-style: italic;
                font-weight: normal; }
.RsJ {          font-style: italic;
                font-weight: normal; }
.RsN { }
.RsO { }
.RsP { }
.RsQ { }
.RsR { }
.RsT {          text-decoration: underline; }
.RsU { }
.RsV { }

.eqn { }
.tbl td {       vertical-align: middle; }

/* NOTE: .HP is only placed on <p> tags, this selector conflicts with ".man-page-content p"
   and the .HP macro is deprecated anyway (its meaning cannot be represented exactly in HTML)
.HP {           margin-left: 3.8em;
                text-indent: -3.8em; }
*/

/* Semantic markup for command line utilities. */

table.Nm { }
code.Nm {       font-style: normal;
                font-weight: bold; }
.Fl {           font-style: normal;
                font-weight: bold; }
.Cm {           font-style: normal;
                font-weight: bold; }
.Ar {           font-style: italic;
                font-weight: normal; }
.Op {           display: inline; }
.Ic {           font-style: normal;
                font-weight: bold; }
.Ev {           font-style: normal;
                font-weight: normal; }
.Pa {           font-style: italic;
                font-weight: normal; }

/* Semantic markup for function libraries. */

.Lb { }
code.In {       font-style: normal;
                font-weight: bold; }
a.In { }
.Fd {           font-style: normal;
                font-weight: bold; }
.Ft {           font-style: italic;
                font-weight: normal; }
.Fn {           font-style: normal;
                font-weight: bold; }
.Fa {           font-style: italic;
                font-weight: normal; }
.Vt {           font-style: italic;
                font-weight: normal; }
.Va {           font-style: italic;
                font-weight: normal; }
.Dv {           font-style: normal;
                font-weight: normal; }
.Er {           font-style: normal;
                font-weight: normal; }

/* Various semantic markup. */

.An { }
.Lk { }
.Mt { }
.Cd {           font-style: normal;
                font-weight: bold; }
.Ad {           font-style: italic;
                font-weight: normal; }
.Ms {           font-style: normal;
                font-weight: bold; }
.St { }
.Ux { }

/* Physical markup. */

.Bf {           display: inline; }
.No {           font-style: normal;
                font-weight: normal; }
.Em {           font-style: italic;
                font-weight: normal; }
.Sy {           font-style: normal;
                font-weight: bold; }
.Li {           font-style: normal;
                font-weight: normal; }

/* Responsive overrides to avoid excessive margins on small devices. */

@media (max-width: 33em) {
.man-page-content div.manual-text {
    margin-left: 0em;
}
.man-page-content h1.Sh,
.man-page-content h2.Ss {
    margin-left: 0em;
}
/* the following rules are copied from mandoc.css */
.Bd-indent {    margin-left: 2em; }
.Bl-hang > dd {
                margin-left: 2em; }
.Bl-tag {       margin-left: 2em; }
.Bl-tag > dt {
                margin-left: -2em; }
.HP {           margin-left: 2em;
                text-indent: -2em; }
}

pre br {
    white-space: pre-wrap; /* Preserves newlines and wraps long lines */
    display: none; /* Hides the <br> tags within <pre> */
}
