/*
  Generally, we use a 27px grid as a guideline for measures, 27px is the line-height at the defaulkt font size of 18px,
  and widths are specified as multiples of 27px. Vertical measurements are given in em, thereby they all derive from the
  general font-size set for html>body and will stay coherent as the font-size changes. Where the font is larger (e. g.
  in h* tags), care is taken to keep the line-height unchanged. Top and bottom margins, borders and paddings are generally
  designed to keep the complete box height at multiples of the line-height.
*/

body {
    font-size: 120%;
}
html>body {
    font-size: 18px;
    line-height: 1.5em;
}

input, button, select {
    font-size: 1em;
    height: 1.5em; /* this assumes box-sizing: border-box (CSS3) works */
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

input[type="checkbox"] {
    height: auto;
}

legend {
    margin-left: 0.25em;
    padding-left: 0.25em;
    padding-right: 0.25em;
}

p { /* the line height is 27px */
    font-size: 1em;
    line-height: 1.5em;
    margin: 1.5em 0.5em;
}

h1 { /* 27px, line-height stays at 27px */
    font-size: 1.5em;
    line-height: 1em;
    margin: 0.666667em 0.3333333em 0.3333333em 0.3333333em;
}

h2 { /* 21px, line-height stays at 27px */
    font-size: 1.16667em;
    line-height: 1.285714em;
    margin: 1.928571em 0.4285714em 0.642857em 0.4285714em;
}

dd, dt {
    display: inline-block;
}

dd {
    margin-left: 1em;
}

table {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

#session-status {
    font-size: 0.833333em;
    line-height: 1.8em;
    margin-top: 0.6em;
    margin-bottom: 1.2em;
    position: absolute;
    right: 0;
    top: 0;
    text-align: right;
}
#frame {
    font-size: 1em;
    position: absolute;
    top: 3em;
    bottom: 0;
    right: 0;
    left: 0;
}

.zt-c-menu__item--level-1 {
    display: inline-block;
    position: relative;
    vertical-align: top;
    font-size: 1em;
    line-height: 1.5em;
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

.zt-l-menu-root {
    position: absolute;
    top: 0;
    left: 0;
}

.zt-l-content-box {
    font-size: 1em;
    background-color: #FFFFFF;
    position: absolute;
    left: 0;
    right: 0;
    top: 3em;
    padding: 1em;
}
#footer {
    background-color: #868686;
}

.zt-l-content-box--narrow {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1em;
    margin-top: 1.5em;
}

.ui-menu-item {
    width: 180px;
}

.button-row-parent {
    position: relative;
    padding-bottom: 3em;
}

button.default {
    position: absolute;
    right: 0;
}

.button-row {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 3em;
    overflow: visible;
    margin-left: 0.5em;
    padding-left: 0.5em;
    margin-right: 0.5em;
    padding-right: 0.5em;
    margin-top: 0;
    min-height: 1.5em;
}

.row-button {
    display: block;
    float: right;
    margin-top: 0.75em;
    margin-right: 1em;
}

.zt-c-form-row {
    position: relative;
    font-size: 1em;
    /**
     * Because the child elements use position: absolute and thereby escape the flow,
     * we need to inflate the parent with a line-high padding.
     */
    padding-bottom: 1.5em;
    margin-left: 0.5em;
    padding-left: 0.5em;
    margin-right: 0.5em;
    padding-right: 0.5em;
    margin-top: 0;
    min-height: 1.5em;
}

.zt-c-form-row--stacked {
    /* Two lines, because the label goes on top of the input */
    padding-bottom: 3em;
}

.zt-c-form-row--deflated {
    /* Two lines, because the label goes on top of the input */
    padding-bottom: 0;
}

.zt-c-form__label {
    position: absolute;
    left: 1em;
    right: 50%;
}

.zt-c-form__label--stacked {
    top: 0;
}

.zt-c-form__input {
    position: absolute;
    left: 50%;
    right: 1em;
}

.zt-c-form__input--stacked {
    left: 0;
    right: 25%;
    top: 1.5em;
}

.form-row>input, .form-row>select, .form-row>.field-wrapper  {
    position: absolute;
    left: 50%;
    right: 1em;
}

.form-row-top-label input, .form-row-top-label select {
    position: absolute;
    left: 0;
    right: 25%;
    top: 1.5em;
}
.zt-c-form-row__error-list {
    color: red;
    font-size: 0.75em;
    line-height: 0.75em;
    position: absolute;
    top: 4.5em;
}

.zt-c-form-field--small-caption {
    display: inline-block;
    margin-right: 0.16666666em;
}

.zt-c-form-field__label--small-caption {
    font-size: 0.666666667em;
    font-style: italic;
    display: block;
}

.primary {

}

.secondary {

}

.button {
    display: inline-block;
    position: absolute;
}

.bottom {
    bottom: 0.75em;
}

.left {
    left: 1em;
}

.right {
    right: 1em;
}

td.col, th.col {
    padding-left: 3px;
}

/* one column is two grid cells (of 27px) wide, and 3px padding are discounted */
td.one, th.one { width: 51px; }
td.two, th.two { width: 105px; }
td.three, th.three { width: 159px; }
td.four, th.four { width: 213px; }
td.five, th.five { width: 267px; }
td.six, th.six { width: 321px; }
td.seven, th.seven { width: 375px; }
td.eight, th.eight { width: 429px; }
td.nine, th.nine { width: 483px; }
td.ten, th.ten { width: 537px; }
td.eleven, th.eleven { width: 591px; }
td.twelve, th.twelve { width: 645px; }
td.thirteen, th.thirteen { width: 699px; }
td.fourteen, th.fourteen { width: 753px; }
td.fifteen, th.fifteen { width: 807px; }

td, th {
    text-align: left;
    padding-left: 3px;
}

/* the above rule somehow messes up table rendering in some forms without even achieving the fixed pixel width. */
table.two-third td, table.two-third th {
    width: auto;
}

td.small, th.small {
    width: 24px;
}

td.large, th.large {
    width: 267px;
}

.two-third {
    width: 66.66667%;
}

.zt-c-logo__img {
    height: 60px;
    margin-top: 3px;
    margin-left: 3px;
}
.zt-c-logo__img, .zt-c-logo__text {
    display: inline-block;
    vertical-align: top;
}

.zt-c-activity-select {
    width: 321px;
}

.zt-dialog {
    /* hidden by default, visibility is then managed by JS */
    display: none;
}
