/* Wiking generic page content styles */

.message {
    border-style: solid;
    border-width: 1px 0;
    margin: .8em 0 .5em 0;
    padding: 3px 5px;
    position: relative;
}
.message .icon {
    position: absolute;
    top: 50%;
    left: 8px;
    margin-top: -10px;
}
.message .content {
    margin-left: 30px;
    padding: 2px 0;
}
.message.info {
    /* There's currently no color theme for this... */
    color: $color.foreground;
    border: dotted #dadac0 1px;
    background-color: #fafae8;
}
.message.success {
    color: $color.message-fg;
    border-color: $color.message-border;
    background-color: $color.message-bg;
}
.message.warning {
    color: $color.error-fg;
    border-color: $color.error-border;
    background-color: $color.error-bg;
}
.message.warning .icon {
    left: 7px;
}
.message.error {
    color: $color.error-fg;
    border-color: $color.error-border;
    background-color: $color.error-bg;
}

/* styles for exported LCG elements */

img { position: relative; } /* MSIE float workaround */
.hidden { display: none; }

hr {
    height: 1px;
    background-color: $color.border;
    border: 0;
}
hr.new-page {
    height: 4px;
    background-color: transparent;
    border: 1px dotted $color.border;
    border-width: 1px 0;
}
ul {
    margin-top: 0.1em;
    margin-bottom: 0.1em;
}
li {
    margin-top: 0;
    margin-bottom: 0;
}
a.backref, a:link.backref {
    color: $color.foreground !important; /* important needed for MSIE */
    text-decoration: none;
}

.lcg-citation, .lcg-quotation {
    font-style: italic;
}
.underline {
    text-decoration: underline;
}
dt .lcg-citation {
    font-style: normal;
}
dt em {
    font-weight: normal;
}
dl dt {
    font-weight: bold;
}

table.lcg-fieldset {
    padding: 0;
    margin: 0.5em 0;
}
table.lcg-fieldset tr {
    vertical-align: top;
    padding: 0;
}
table.lcg-fieldset td {
    text-align: left;
    vertical-align: top;
    padding: 0;
}
table.lcg-fieldset td.label {
    white-space: nowrap;
    padding-right: 0.5em;
    font-weight: bold;
}

table.lcg-table {
    border-collapse: collapse;
}
table.lcg-table {
    margin: 0.5em 0;
}
table.lcg-table td, table.lcg-table th {
    padding: 2pt;
    vertical-align: top;
    white-space: nowrap;
    border: solid $color.border 1px;
}
table.lcg-table td { background-color: $color.table-cell; }
table.lcg-table th { background-color: $color.heading-bg; }
table.lcg-table caption {
    font-weight: bold;
    font-size: 1.1em;
    text-align: left;
}
.lcg-preformatted-text {
    background-color: $color.frame-bg;
    border: solid $color.frame-border 1px;
    color: $color.foreground;
    margin: 1em 0;
    padding: 4px;
}
.lcg-preformatted-text pre {
    white-space: pre;
    margin: 0;
}

img.lcg-image {
    max-width: 100%;
    height: auto !important;
    box-sizing: border-box;
    margin: .5em 1em;
}
img.lcg-image.left-aligned {
    margin: .2em 1em .4em 0;
}
img.lcg-image.right-aligned {
    margin: .2em 0 .4em 1em;
}

figure {
  border: thin silver solid;
  margin: 1em;
  width: auto;
  display: table-cell;
}

figure a, figure img {
    display: table-cell;
    margin: auto;
}

figure.left-aligned {
    float: left;
}

figure.right-aligned {
    float: right;
}

figcaption {
    display: table-caption;
    caption-side: bottom;
    text-align: center;
    font-style: italic;
    font-size: smaller;
    text-indent: 0;
    min-width: 16em;
}

.external-video {
    margin: 1.6em auto .8em auto;
}
.external-video .wrapper {
    /* Responsive iframe according to:
     * https://www.smashingmagazine.com/2014/02/making-embedded-content-work-in-responsive-design/
     * https://alistapart.com/article/creating-intrinsic-ratios-for-video/
     */
    position: relative;
    text-align: center;
    padding-bottom: 75%; /* Actually overridden by the real aspect ratio in the HTML style attr. */
    height: 0;
    overflow: hidden;
}
.external-video iframe {
    position: absolute;
    top:0;
    left: 0;
    width: 100%;
    height: 100%;
}
div.table-of-contents {
    border: solid $color.frame-border;
    border-width: 1px 0;
    background-color: $color.frame-bg;
    margin: 1em 0;
    padding: 3pt;
}
div.table-of-contents ul {
    margin-top: 3pt;
    margin-bottom: 0;
}

button, input, select, textarea {
    /* Avoid dual application of 0.8em defined above in some elements */
    font-size: 1em;
    border: 1px solid $color.border;
    border-radius: 3px;
    margin: 2px 0;
}
input[type="search"] {
  -webkit-appearance: textfield;
}
button, input, select {
    height: 2em;
    box-sizing: border-box;
}

button {
    width: auto; /* fix MSIE size */
    overflow: visible; /* fix MSIE size */
    color: inherit;
    font: inherit;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
    background-image: linear-gradient(#fff, #e0e0e0);
    background-color: #fafafa;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: .125em .7em;
    white-space: nowrap;
    line-height: 1.5em;
    -webkit-appearance: button;
    vertical-align: top;
    height: 2em;
}
button::-moz-focus-inner {
    padding: 0;
    border: 0;
}
button:hover:enabled {
    background-image: linear-gradient(#fff, #f0f0f0);
}

a:focus-visible,
td:focus-visible,
span:focus-visible,
input:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 3px 2px cornflowerblue;
}
h1:focus-visible {
    /* Avoid visible focus on the main heading as it is focused
     * programatically on each page load in order to get AT users
     * to the main content directly. */
    outline: none;
    box-shadow: none;
}

button[disabled] span {
    opacity: 0.5;
    color: #000;
}
button .label {
    display: inline-block;
    vertical-align: middle;
}
button .icon {
    margin-right: 4px;
}
input {
    line-height: 1.5em;
    padding: 0.25em;
}
.checkbox-group input[type=checkbox], input[type=radio] {
    height: 1em;
    margin-right: .1em;
}
input[type=checkbox] + .help {
    margin-top: -.4em;
}

textarea {
    padding: 4px;
    line-height: 1.2em;
}
select {
    padding: 2px 0;
    line-height: 1.5em;
}

/* Wiking icons sprite */
.user-larger-icon, .gear-larger-icon, .gear-larger-red-icon, .maximize-icon, .unmaximize-icon,
.cart-larger-icon, .info-icon, .success-icon, .error-icon, .warning-icon, .user-icon, .gear-icon,
.ok-icon, .remove-icon, .refresh-icon, .undo-icon, .search-icon, .cart-icon, .key-icon, .list-icon,
.key-larger-icon, .menu-icon, .arrow-left-icon, .arrow-right-icon, .arrow-down-icon,
.arrow-up-icon, .plus-icon, .ellipsis-icon, .users-icon, .new-user-icon, .attachment-icon,
.feed-icon, .thumb-up-icon, .thumb-down-icon, .view-icon, .edit-icon, .create-icon,
.circle-in-icon, .circle-out-icon, .circle-down-icon, .circle-up-icon, .circle-in-down-icon,
.circle-in-up-icon, .reply-icon, .quote-icon, .tag-icon, .disable-icon, .mail-icon, .copy-icon,
.pytis-form button.submit .default-submit-icon,
.pytis-form button.cancel .icon,
.pytis-form button.reset .icon,
.list-form-controls button.cancel-search .icon,
.list-form-controls button.search .icon,
.list-form-controls button.prev-page .icon,
.list-form-controls button.next-page .icon,
.pytis-form.query-fields-form button.apply-filters .icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url(wiking-icons.png);
    background-repeat: no-repeat;
    vertical-align: middle;
}
.user-larger-icon     { background-position: 0 0; width: 20px; height: 20px; }
.gear-larger-icon     { background-position: -20px 0; width: 20px; height: 20px; }
.gear-larger-red-icon { background-position: -40px 0; width: 20px; height: 20px; }
.maximize-icon        { background-position: -60px 0; width: 20px; height: 20px; }
.unmaximize-icon      { background-position: -80px 0; width: 20px; height: 20px; }
.cart-larger-icon     { background-position: -100px 0; width: 20px; height: 20px; }
.info-icon            { background-position: -120px 0; width: 20px; height: 20px; }
.success-icon         { background-position: -140px 0; width: 20px; height: 20px; }
.error-icon           { background-position: -160px 0; width: 20px; height: 20px; }
.warning-icon         { background-position: -157px -20px; width: 23px; height: 20px; }
.menu-icon            { background-position: -158px -41px; width: 23px; height: 25px; }
.key-larger-icon      { background-position: -160px -66px; width: 18px; height: 18px; }
.user-icon            { background-position: -0 -20px; }
.gear-icon            { background-position: -16px -20px; }
.pytis-form button.submit .default-submit-icon,
.ok-icon              { background-position: -32px -20px; }
.pytis-form button.cancel .icon,
.list-form-controls button.cancel-search .icon,
.remove-icon          { background-position: -48px -20px; }
.pytis-form.query-fields-form button.apply-filters .icon,
.refresh-icon         { background-position: -64px -20px; }
.pytis-form button.reset .icon,
.undo-icon            { background-position: -80px -20px; }
.list-form-controls button.search .icon,
.search-icon          { background-position: -96px -20px; }
.cart-icon            { background-position: -112px -20px; position: relative; left: -1px; }
.reply-icon           { background-position: -128px -20px; }
.list-form-controls button.prev-page .icon,
.arrow-left-icon      { background-position: -2px -36px; width: 13px; }
.list-form-controls button.next-page .icon,
.arrow-right-icon     { background-position: -16px -36px; width: 13px; }
.arrow-up-icon        { background-position: -32px -36px; }
.arrow-down-icon      { background-position: -48px -36px; }
.plus-icon            { background-position: -64px -36px; }
.ellipsis-icon        { background-position: -80px -36px; }
.key-icon             { background-position: -96px -36px; }
.list-icon            { background-position: -112px -36px; }
.quote-icon           { background-position: -128px -36px; }
.attachment-icon      { background-position: -0 -52px; }
.feed-icon            { background-position: -16px -52px; }
.thumb-up-icon        { background-position: -32px -52px; }
.thumb-down-icon      { background-position: -48px -52px; }
.view-icon            { background-position: -64px -52px; }
.edit-icon            { background-position: -81px -52px; width: 17px; }
.create-icon          { background-position: -99px -52px; width: 17px; }
.users-icon           { background-position: -117px -52px; width: 18px; }
.new-user-icon        { background-position: -135px -52px; width: 18px; }
.circle-in-icon       { background-position: 0 -69px; height: 14px; }
.circle-out-icon      { background-position: -16px -69px; height: 14px; }
.circle-down-icon     { background-position: -33px -68px; width: 14px; }
.circle-up-icon       { background-position: -49px -68px; width: 14px; }
.circle-in-down-icon  { background-position: -65px -68px; width: 14px; }
.circle-in-up-icon    { background-position: -81px -68px; width: 14px; }
.tag-icon             { background-position: -96px -68px; }
.disable-icon         { background-position: -112px -68px; }
.mail-icon            { background-position: -128px -68px; }
.copy-icon            { background-position: -144px -68px; }

body .collapsible-section-widget .collapsible-section-heading .icon {
    width: 16px;
    height: 16px;
    background: url(wiking-icons.png) -16px -36px no-repeat;
}
body .collapsible-section-widget.expanded > div > div > div > .collapsible-section-heading .icon {
    background-position: -48px -36px;
}

/* Wiking CMS specific styles */

.cms-page-actions {
    margin: 1em 0 0 0;
    position: relative;
    top: 0.2em;
    padding-top: 0.2em;
    border-top: 1px solid $color.border;
}
.cms-page-actions.cms-publication-actions {
    margin-top: 0;
    border-top: none;
}
div.wiking-image-gallery {
    margin: 0 -1em;
}

form.activation-form {
    float: left;
    margin-right: 0.5em;
}

div.item span.panel-field-date {
    font-weight: bold;
}
.panel .feed-link {
    float: right;
}
.panel .feed-link .feed-icon {
    position: relative;
    top: -1px;
}
.pytis-form.itemized-view.user-roles div.summary,
.pytis-form.itemized-view.role-members div.summary,
.pytis-form.itemized-view.contained-roles div.summary,
.pytis-form.itemized-view.containing-roles div.summary {
    display: none;
}

/* Links to unpublished pages */
.unpublished { text-decoration: line-through; }

.page-navigation {
    background-color: $color.frame-bg;
    border: 1px solid $color.frame-border;
    border-width: 1px 0;
    text-align: right;
    padding: 0.1em;
}
.page-navigation.top {
    position: relative;
    top: -0.4em;
    margin-bottom: .5em;
}
.page-navigation.bottom {
    margin-top: 1.2em;
}
.page-navigation .navigation-ctrl .icon {
    margin-right: 2px;
    position: relative;
    top: -1px;
}
.page-navigation .navigation-ctrl .icon.arrow-right-icon {
    margin-left: 1px;
    margin-right: 1px;
}
.page-navigation .navigation-ctrl.dead {
    opacity: 0.6;
}

table.diff { border: 1px solid $color.border; margin-top: 0.4em; margin-bottom: 0.2em; }
table.diff td, table.diff th { padding: 0.2em; }
td.diff_header { text-align: right; }
th.diff_header, th.diff_next { background-color: $color.heading-bg; }
td.diff_header, td.diff_next { background-color: $color.frame-bg; }
span.diff_add, span.field.id-diff_add { background-color: #aaffaa; }
span.diff_chg, span.field.id-diff_chg { background-color: #ffff77; }
span.diff_sub, span.field.id-diff_sub { background-color: #ffaaaa; }

.pytis-form.publication-export-form .group,
.pytis-form.publication-export-form .submit-buttons,
.pytis-form.excerpt-export-form .group,
.pytis-form.excerpt-export-form .submit-buttons {
    margin: 2px;
    padding: 0;
    border: none;
    background: transparent !important;
    text-align: left;
}
.pytis-form.publication-export-form th.label {
    width: 1%; /* Prevent label spanning too wide in Safari */
}
.pytis-form.publication-export-form .submit-buttons button,
.pytis-form.excerpt-export-form .submit-buttons button {
    margin: 0 6px 0 0;
}
.pytis-form.publication-export-form .radio-group label {
    margin: 0 10px 0 2px;
}

.export-progress-log {
    min-height: 2em;
    max-height: 10em;
    max-width: 66em;
    overflow: scroll;
    border: solid $color.border 1px;
    color: $color.foreground;
    padding: 0.1em;
    white-space: pre;

}
.export-progress-log .error-msg .label {
    color: #c00;
    font-weight: bold;
}
.export-progress-log .warning-msg .label {
    font-weight: bold;
}
.export-progress-summary {
    margin-top: 0.3em;
    margin-left: 0.1em;
    white-space: nowrap;
}
.export-progress-summary .label {
    font-weight: bold;
}

.cms-text-not-found p {
    padding-left: 32px;
}
.cms-text-not-found .error-icon {
    float: left;
    margin: 5px;
}
.cms-text-empty-value {
    color: #666;
}

body {
    font-family: arial, helvetica, sans-serif;
    color: $color.top-fg;
    background-color: $color.top-bg;
    font-size: 16px;
    padding: 0;
    margin: 0;
    -webkit-text-size-adjust: none;
}
p {
    margin: 0.4em 0;
}
h1, h2, h3 {
    color: $color.heading-fg;
    font-weight: bold;
    text-align: left;
}
h2 {
    border: solid $color.heading-line 0px;
    border-bottom-width: 1px;
}
h1 { font-size: 2.2em; line-height: 1em; }
h2 { font-size: 1.8em; }
h3 { font-size: 1.6em; }
h4 { font-size: 1.4em; }
h5,h6,h7,h8,h9 { font-size: 1.2em; }

a:link    { color: $color.link; }
a:visited { color: $color.link-visited; }
a:link:hover, a:visited:hover { color: $color.link-hover; }

h1 a { outline: none; }

#top-bar {
    white-space: nowrap;
}
#top-bar:after {
  content: "";
  display: table;
  clear: both;
}
#top {
    /* The rules below fix MSIE 8 popup menu z-index */
    position: relative;
}
#top-content, #top-controls {
    padding: 6px 0;
}
#top-content {
    float: left;
    color: #222;
    line-height: 26px;
}
#site-title {
    font-size: 1.2em;
    float: left;
}
#site-title a {
    text-decoration : none;
    color: #222;
}
#top-content .top-text {
    float: right;
    margin: 0 26px;
}
#top-content .top-text p {
    margin: 3px 0;
}

#top-controls {
    float: right;
}
#top-controls > span {
    display: inline-block;
    margin-left: 17px;
    line-height: 26px;
}
#top-controls .ctrl-icon {
    margin-right: 0.2em;
}
#top-controls .ctrl-content .ctrl-icon {
    margin-bottom: 3px;
}
#top-controls .ctrl-label {
    line-height: 26px;
    margin-right: 3px;
}
#top-controls .invoke-content {
    position: relative;
}
#top-controls .invoke-menu {
    cursor: pointer;
}
#top-controls .invoke-menu.labeled {
    padding-left: 6px;
}

#top-controls .invoke-menu,
.login-control .login-button,
.maximized-mode-control {
    display: inline-block;
    border-radius: 3px;
    margin-right: 4px;
    background: #ddd;
    box-sizing: border-box;
    height: 26px;
}
.maximized-mode-control a {
    display: inline-block;
    padding: 3px;
    position: relative;
    top: -1px;
    line-height: 20px;
}
.login-control .ctrl-content {
    position: relative;
}
.login-control .password-expiration-warning {
    display: inline-block;
    position: absolute;
    top: -.7rem;
    left: -2rem;
}
.login-control .password-expiration-warning .badge {
    display: inline-block;
    width: .9rem;
    height: .9rem;
    border-radius: .45rem;
    background-color: #f00;
    color: #fff;
    line-height: .9rem;
    font-weight: bold;
    font-size: .7rem;
    text-align: center;
}
.login-control .password-expiration-warning .info {
    display: inline-block;
    position: absolute;
    top: 1.5rem;
    left: .2rem;
    z-index: 3;
    padding: .2em .5rem .4rem .5rem;
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
    line-height: 2rem;
    background-color: $color.background;
}
.login-control .password-expiration-warning .warning-icon {
    margin: 0 .4rem .2rem 0;
}
.login-control .login-button {
    color: $color.foreground;
    text-decoration: none;
    padding: 0 5px;
}
.login-control .login-button:hover {
    color: $color.foreground;
}
.login-control li.user-profile .user-label {
    font-size: .8em;
    color: $color.help;
    line-height: 1.2em;
}
.login-control li.user-profile .icon {
    float: left;
    margin-top: 1em;
}

.admin-control {
    margin-right: -10px;
    margin-left: 5px !important;
}
.admin-control:last-child {
    margin-right: 2px;
}

.language-selection {
}
.language-selection .language-abbr { display: none; }

#root-wrap {
    background-color: $color.background;
    min-height: 100vh;
}
body.non-maximized #root-wrap {
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}
#top, #main, #bottom {
    padding: 0 18px;
}
#top {
    border-bottom: solid 5px #eee;
}
#main {
    padding-top: 18px;
}

#menu {
    font-size: 1.2em;
    font-weight: bold;
}
#menu a {
    color: #222;
}

/* Style top level menu items as a horizontal menu bar (wide screens only). */
@media only screen and (min-width: 601px) {

#menu .menu-button {
    display: none;
}
#menu {
    /* The rules below fix MSIE 8 dropdown menu z-index */
    position: relative;
    z-index: 2;
}
#menu ul.level-1 {
    margin: 0 -18px -5px -18px;
    padding: 0;
}
#menu ul.level-1:after { /* Avoid floated elements outside container (clearfix). */
    clear: both;
    content: "";
    display: block;
    height: 0;
    visibility: hidden;
}
#menu ul.level-1 > li {
    display: inline-block;
    float: left; /* MSIE 8 hack */
    white-space: nowrap;
    position: relative;
    width: auto;
    line-height: inherit;
}
#menu ul.level-1 > li > .item {
    padding: 0.2em 18px;
    text-decoration: none;
    border-bottom: 5px solid transparent;
    margin: 0;
}
#menu ul.level-1 > li > .item:hover {
    border-bottom-color: $color.heading-bg;
}
#menu ul.level-1 > li.in-path > .item {
    border-bottom-color: #626262;
}
#menu ul.level-1 > li.foldable > .item {
    padding-right: 24px;
}
#menu ul.level-1 > li.script-expanded > .item:hover,
#menu ul.level-1 > li.in-path.script-expanded > .item,
#menu ul.level-1 > li.script-expanded > .item {
    z-index: 3;
    position: relative;
    background-image: linear-gradient(#eee, $color.background);
    border-bottom-color: $color.background;
    border-radius: 5px 5px 0 0;
}
#menu ul.level-1 > li.foldable > .item:after {
    content: "";
    display: inline-block;
    position: absolute;
    width: 10px;
    height: 10px;
    z-index: 3;
    background: url(lcg-icons.png) -25px -30px no-repeat;
    margin: .7em 12px .3em 0;
    top: 0;
    right: 0;
}
#menu ul.level-1 > li > .item .label {
    background-color: transparent;
    padding: 0;
    margin: 0;
}
#menu ul.level-1 > li > .item .icon {
    display: none;
}

#menu ul.level-2 {
    display: none;
    position: absolute;
    top: 34px;
    left: 0;
    z-index: 2;
    padding: 6px;
    background-color: $color.background;
    box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.6);
    -moz-box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.6);
    -webkit-box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.6);
    border-radius: 0 3px 3px 3px;
}
#menu li.script-expanded ul.level-2 {
    display: block;
}

} /* End of menu bar styles for wide screens (min-width: 601px). */


/* Hierarchical submenu */

@media only screen and (min-width: 768px) {
    body.non-maximized #submenu {
        display: table-cell;
    }
}
#submenu {
    display: none;
    position: relative;
    z-index: 1;
    width: 220px;
    min-width: 220px;
    box-sizing: border-box;
    padding-right: 18px;
}
#submenu .menu-panel  {
    position: relative;
    border: 1px solid $color.top-border;
    border-radius: 5px;
    background-color: $color.background;
}
#submenu h3 {
    margin: 0;
    font-size: 1.2em;
    padding: 4px 6px;
    background-color: $color.heading-bg;
    border-bottom: 1px solid $color.top-border;
    border-radius: 5px 5px 0 0;
}
#submenu .foldable-tree-widget {
    line-height: 1.25em;
}
#submenu .foldable-tree-widget .item .label {
    padding: .15em 1px;
}
#submenu .foldable-tree-widget .item .icon {
    top: .35em;
}
#submenu button.toggle-menu-expansion {
    position: absolute;
    top: .6em;
    right: .4em;
}
* html #submenu button.toggle-menu-expansion { right: 10px; } /* MSIE hack */

/* This makes panels to skip in Firefox when page content is too wide...
#submenu li a:hover {
    outline: solid 1px $color.heading-line;
}*/

/* Panels */

@media only screen and (min-width: 992px) {
    body.non-maximized #panels {
        display: table-cell;
        vertical-align: top;
        z-index: 1;
        width: 220px;
        box-sizing: border-box;
        padding-left: 18px;
    }
    body.non-maximized #panels .panel {
        margin-right: 0;
    }
}
#panels .panel {
    display: inline-block;
    width: 202px; /* Set abs width to keep it unchanged when moved under content. */
    box-sizing: border-box;
    vertical-align: top;
    margin: 0 18px 18px 0;
    color: $color.foreground;
    border: 1px solid $color.top-border;
    border-radius: 5px;
    background-color: $color.background;
}
#panels .panel h3 {
    padding: 4px 6px;
    margin: 0;
    font-size: 1.2em;
    position: relative;
    background-color: $color.heading-bg;
    border-bottom: 1px solid $color.top-border;
    border-radius: 5px 5px 0 0;
}
#panels .panel-content {
    padding: 4px 6px;
}
#panels .panel-content ul, #panels .panel-content ol {
    padding-left: 1.5em;
    margin: 0;
}
#panels .panel-content form {
    margin: 5px 0;
}

/* The actual page content */

#page {
    display: table-cell;
    vertical-align: top;
    width: 100%;
    position: relative;
    color: $color.foreground;
    background-color: $color.background;
    margin-bottom: 16px;
}
#heading {
    position: relative;
}
@media only screen and (max-width: 767px) {
    #top-controls .maximized-mode-control {
        display: none;
    }
}
#heading h1 {
    margin-top: 0;
    margin-bottom: 12px;
    padding-right: 24px; /* Space for the maximize/minimize button. */
}
#content {
    position: relative; /* fix MSIE background painting */
}

/* Bottom part of the page */
#bottom {
    margin-top: 2em;
    clear: both;
    font-size: .9em;
    border-top: solid 5px #eee;
    padding-top: 0.1em;
}
#bottom-bar {
    text-align: right;
    margin-bottom: .8em;
}
#bottom-bar hr { display: none; }
#bottom-bar span.left { float: left; }
#bottom-bar div.left { text-align: left; }
#bottom-bar .right { color: #777; /* Applies to the dots between links. */ }

#footer {
    text-align: center;
    padding-bottom: 40px;
}
#footer p { margin: .1em 0 .5em 0; }
#footer img { margin: 5px; }

/* Special controls */

form.login-form {
    background-color: $color.frame-bg;
    border: 1px solid $color.frame-border;
    border-width: 1px 0;
    padding: 14px 30px;
    margin-bottom: 14px;
}
form.login-form input {
    margin: 2px 0 12px 0;
    padding: 3px;
}
form.login-form ul {
    margin-top: 14px;
}
form.login-form label {
    font-weight: bold;
}

/* Tablet screen layout */
@media only screen and (max-width: 991px) {

    #top-controls .ctrl-label {
        display: none;
    }

} /* End of tablet screen layout */

/* Bigger mobile phone screen layout */
@media only screen and (max-width: 767px) {

    #site-title .separator, #site-title .subtitle { display: none; }

    .list-form-controls button.prev-page .label,
    .list-form-controls button.next-page .label,
    .list-form-controls button.cancel-search .label,
    .list-form-controls button.search .label {
        width: 0;
        overflow: hidden;
    }
    .list-form-controls button.prev-page .icon,
    .list-form-controls button.next-page .icon,
    .list-form-controls button.cancel-search .icon,
    .list-form-controls button.search .icon {
        margin-right: 0;
        margin-left: 0;
    }

} /* End of bigger mobile phone screen layout */

/* Smaller mobile phone screen layout */
@media only screen and (max-width: 600px) {

    #menu .menu-button {
        position: absolute;
        display: inline-block;
        padding: 7px 10px;
        margin-right: -11px;
        margin-left: 4px;
        cursor: pointer;
        top: 0;
        right: 20px;
    }
    #menu .foldable-tree-widget {
        display: none;
        position: relative;
    }
    #menu .foldable-tree-widget.expanded {
        display: block;
    }

    .language-selection .language-name { display: none; }
    .language-selection .language-abbr { display: inline; }
    .login-control .displayed-user-name { display: none; }
    .login-control .popup-menu-ctrl-widget { background: none; }
    .login-control .login-button { display: none }
    #top-controls .login-control .invoke-menu.labeled { padding-left: 0; }
    #top-controls  { padding-right: 34px; }


} /* End of smaller mobile phone screen layout */

/* Print specific styles */
@media print {

body {
    color : #000;
    background : #fff;
    font-family : "Times New Roman", Times, serif;
    font-size : 10pt;
}
table td, table th, input { font-size: 10pt; }

a {
    text-decoration : underline;
    color : #00f;
}
a.backref, a:link.backref, h1 a {
    color: #000 !important; /* important needed for MSIE */
    text-decoration: none;
}
form.browse-form table td, form.browse-form table th {
    border-color: #000;
}

h1 { font-size: 1.6em; }
h2 { font-size: 1.4em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1.2em; }
h5 { font-size: 1.1em; }
h6 { font-size: 1.1em; }
h7 { font-size: 1.1em; }

#top, #menu, #submenu, #panels, #bottom,
form.list-form-controls .paging-controls {
    display: none;
}

#top-controls .maximized-mode-control {
    display: none;
}

} /* End of @media print. */

/* Override default LCG widget colors by Wiking color theme colors */
/* Original selectors must be duplicated here and prefixed by 'body' to get more specificity. */

body .foldable-tree-widget .current .label {
    background-color: $color.heading-bg
}
body .notebook-widget ul.notebook-switcher {
    border-bottom-color: $color.top-border;
}
body .notebook-widget li.notebook-tab a {
    border-color: $color.top-border;
    background-color: $color.inactive-folder;
    color: $color.foreground;
}
@media print {
    body .notebook-widget ul.notebook-switcher {
	border-bottom-color: #aaa;
    }
    body .notebook-widget li.notebook-tab a {
	border-color: #aaa;
    }
}
body .notebook-widget li.notebook-tab a.current {
    background-color: $color.background;
    border-bottom-color: $color.background;
}
body .dropdown-selection-widget .dropdown-selection {
    background-color: $color.background;
    border-color: $color.top-border;
}
body .dropdown-selection-widget .dropdown-selection li.active a {
    color: $color.foreground;
}

/* Override default Pytis form colors by current Wiking color theme colors. */

body .pytis-form.edit-form .errors,
body .pytis-form.query-fields-form .errors {
    color: $color.error-fg;
    background-color: $color.error-bg;
    border-color: $color.error-border;
}

body .pytis-form .group,
body .pytis-form .submit-buttons,
body .pytis-form .paging-controls {
    background-color: $color.frame-bg;
    border-color: $color.frame-border;
}
body .pytis-form.query-fields-form .submit-buttons {
    background: none;
}
body .pytis-form.query-fields-form .group {
    background: none;
    border: none;
}
* html body .pytis-form fieldset.group legend {
    color: $color.foreground;
}
body .pytis-form.browse-form table.data-table tr.data-row td,
body .pytis-form.browse-form table.data-table tr.row-expansion td,
body .pytis-form.browse-form table.data-table tr.column-headings th,
body .pytis-form.browse-form table.data-table tr.group-heading th {
    border-color: $color.border;
}
@media print {
    body .pytis-form.browse-form table.data-table,
    body .pytis-form.browse-form table.data-table tr.data-row td,
    body .pytis-form.browse-form table.data-table tr.row-expansion td,
    body .pytis-form.browse-form table.data-table tr.column-headings th,
    body .pytis-form.browse-form table.data-table tr.group-heading th {
	border-color: #ddd;
    }
}
body .pytis-form.browse-form table.data-table tr.column-headings th.column-heading,
body .pytis-form.browse-form table.data-table tr.group-heading th {
    background-color: $color.heading-bg;
}
body .pytis-form.browse-form table.data-table tr.data-row,
body .pytis-form.browse-form table.data-table tr.row-expansion {
    background-color: $color.table-cell;
}
body .pytis-form.browse-form table.data-table tr.data-row.even,
body .pytis-form.browse-form table.data-table tr.row-expansion.even {
    background-color: $color.table-cell2;
}

body .pytis-form.browse-form table.data-table tfoot td {
    background-color: $color.frame-bg;
    border-color: $color.frame-border;
}
body .pytis-form.browse-form #found-record {
    outline: $color.highlight-bg solid 1px;
}
body .pytis-form.list-view .tree-indent {
    border-left-color: $color.frame-border
}
body .pytis-form.list-view .list-item .meta {
    color: $color.meta-fg;
    background-color: $color.meta-bg;
}
body .pytis-form .field-label.disabled {
    color: $color.help;
}
body .pytis-form .group span.color-display {
    border-color: $color.border;
}
body .pytis-form.edit-form .help {
    color: $color.help;
}
body .pytis-form input.text-search-field,
body .pytis-form.edit-form input.text-field,
body .pytis-form.edit-form textarea,
body .pytis-form.edit-form select {
    border-color: $color.border;
}
body .pytis-form.list-view .summary {
    border-top-color: $color.frame-border;
}
/*.pytis-form .invalid {
    background-color: $color.error-bg;
}*/
