/*
    Copyright (C) 2006 Orbeon, Inc.

    This program is free software; you can redistribute it and/or modify it under the terms of the
    GNU Lesser General Public License as published by the Free Software Foundation; either version
    2.1 of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
    without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    See the GNU Lesser General Public License for more details.

    The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
*/

.xforms-output {
    display: inline;
}

.xforms-initially-hidden {
    display: none;
}

.xforms-hint {
    display: none;
}

.xforms-alert-inactive, .xforms-alert-active {
    display: -moz-inline-box;
    display: inline-block;
    white-space: nowrap;
    width: 16px;
    height: 16px;
    overflow: hidden;
    /* This is needed to hide the text of the alert! */
    text-indent: 16px;
    /* text-indent doesn't work on Firefox 2 (but does in 3), but the following does the trick */
    font-size: 0;
    margin-left: .25em;
    vertical-align: middle;
}

.xforms-alert-active {
    background-image: url(../../ops/images/xforms/exclamation.png);
    background-repeat: no-repeat;
    background-position: left center;
}

.xforms-help-image {
    display: -moz-inline-box;
    display: inline-block;
    margin-left: .2em;
    vertical-align: middle;
    width: 16px;
    height: 16px;
    cursor: pointer;
    border: none;
}

.xforms-help {
    display: none;
}

.xforms-loading-loading {
    display: none;
    background-color: #c44;
    color: #fff;
    padding: 2px;
    position: absolute;
    right: 2em;
}

.xforms-error-panel .bd { overflow: auto; background-color: white }
/*.xforms-error-panel .bd p { margin-bottom: 0 }*/
.xforms-error-panel .hd { background-color: #FF6600; }
.xforms-error-panel-details-hidden, .xforms-error-panel-details-shown { vertical-align: middle; }
.xforms-error-panel-show-details, .xforms-error-panel-hide-details { cursor: pointer; }
.xforms-error-panel-close { cursor: pointer; }
.xforms-error-panel-reload { cursor: pointer; }

.xforms-help-panel { width: 300px; }
.xforms-help-panel-close { text-align: right; }

.xforms-noscript-panel {
    display: block;
    border: 4px solid #FF6600;
    width: auto;
    margin: 1em;
    padding: .5em;
}

.xforms-loading-none {
    display: block;
    height: 0;
}

.xforms-input {
    cursor: pointer;
}

.xforms-trigger-appearance-minimal img, .xforms-submit-appearance-minimal img { border: 0 }

.xforms-trigger-appearance-xxforms-minimal, .xforms-submit-appearance-xxforms-minimal {
    border: none;
    background: transparent;
    cursor: hand;
}

/* Hide the label inside the checkbox used for a boolean, as it is there just because we used the same template
   for this checkbox as the template we use for the xforms:select appearance="full". This label is always
   empty for inputs of type boolean and creates a ghost on IE6 in certain cases where the checkbox has the
   focus. */
.xforms-type-boolean label { display: none; }

.xforms-input input.xforms-type-date {
    width: 8em;
    padding-right: 16px;
    background-image: url(../../ops/images/xforms/calendar.png);
    background-position: right center;
    background-repeat: no-repeat;
}

.xforms-type-date img { vertical-align: middle; padding-left: .2em; }
.xforms-readonly img.xforms-type-date { display: none; }

.xforms-input input.xforms-type-time {
    width: 8em;
    padding-right: 16px;
    background-image: url(../../ops/images/xforms/clock.png);
    background-position: right center;
    background-repeat: no-repeat;
}
.xforms-type-dateTime input.xforms-type-date { margin-right: 1em }


.xforms-input input {
    -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}

.xforms-textarea {
    -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
    font-family: Arial,Helvetica,Geneva,sans-serif
}

.xforms-secret {
    -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}

.xforms-textarea-appearance-xxforms-autosize {
    width: 100%;
    overflow: hidden;
}

/* Highlight of invalid input/textarea */
/*
.xforms-invalid .xforms-input-input, textarea.xforms-invalid,
    .xforms-required-empty .xforms-input-input, textarea.xforms-required-empty
        { border-color: orange }
*/

/* Default size for YUI RTE (seems to work!) */
textarea.xforms-mediatype-text-html { width: 550px; height: 300px }

.xforms-select1-appearance-minimal {
    font-family: Arial,Helvetica,Geneva,sans-serif
}

/* Prevent display of border when static read-only */
.xforms-static { border: none }

.xforms-select1-appearance-full input { vertical-align: middle }
.xforms-select1-appearance-full label { vertical-align: middle; margin-right: .5em }
fieldset.xforms-select1-appearance-full { margin: 0; border: none } /* when fieldset is used for full selection controls */

.xforms-select-appearance-full input { vertical-align: middle }
.xforms-select-appearance-full label { vertical-align: middle; margin-right: .5em  }
fieldset.xforms-select-appearance-full { margin: 0; border: none } /* when fieldset is used for full selection controls */

.xforms-group-appearance-xxforms-fieldset {
    padding-left: 1em;
    padding-right: 1em;
    padding-top: 0;
    padding-bottom: 0
}

.xforms-range-background {
    position: relative;
    background: url(../../ops/images/xforms/slider-horizontal-background.png) no-repeat;
    height: 26px;
    width: 218px;
    z-index: 5;
}

.xforms-range-thumb {
    position:absolute;
    left: 0;
    top: 8px;
    cursor: default;
    width: 18px;
    height: 20px;
    background: url(../../ops/images/xforms/slider-horizontal-thumb.png) no-repeat;
}

/* For backward compatibility, new code uses xforms-template */
.xforms-select-template {
    display: none;
}

.xforms-select1-open-select {
    display: none;
}

/* Try to give more precedence to this rule as top-level template elements may have other display: properties */
html body .xforms-form .xforms-repeat-template, html body .xforms-form .xforms-template {
    display: none;
}

.xforms-repeat-delimiter {
    display: none;
}

.xforms-repeat-begin-end {
    display: none;
}

.xforms-repeat-selected-item-1 {
    background-color: #ffc;
}

.xforms-repeat-selected-item-2 {
    background-color: #ff9;
}

.xforms-repeat-selected-item-3 {
    background-color: #ff6;
}

.xforms-repeat-selected-item-4 {
    background-color: #ff3;
}

.xforms-group-begin-end {
    display: none;
}

.xforms-debug {
    background-color: #fc9;
    position: absolute;
    -moz-opacity: 0.5;
    opacity: 0.5;
    *filter: alpha(opacity=50);
    border: 1px solid red;
    font-size: 11px;
}

.xforms-disabled {
    top: -10000px;
    left: -10000px;
    visibility: hidden;
    position: absolute;
}

tr.xforms-disabled, .xforms-disabled tr,
        th.xforms-disabled, .xforms-disabled th,
        td.xforms-disabled, .xforms-disabled td {
    border-style: none ! important;
}

/**
 * XForms Switch / Case
 * http://wiki.orbeon.com/forms/doc/contributor-guide/xforms-switch-case
 */

.xforms-case-selected {
    visibility: visible;
    position: static;
}

.xforms-case-deselected, .xforms-case-deselected .xforms-case-selected {
    top: -10000px;
    left: -10000px;
    visibility: hidden;
    position: absolute;
}

.xforms-case-begin-end {
    display: none;
}

.xforms-case-deselected-subsequent {
    display: none;
}


.xforms-upload-state-empty .xforms-upload-info { display: none; }
.xforms-upload-state-file .xforms-upload-select { display: none; }
.xforms-upload-mediatype { padding-left: .5em; font-style: italic; }
.xforms-upload-size { padding-left: .5em; }
.xforms-upload-remove { vertical-align: -20%; padding-left: .5em; cursor: pointer; }
.xforms-readonly .xforms-upload-remove { display: none }

.xforms-dialog-appearance-minimal { visibility:hidden; border: 1px outset #eef; }
.xforms-dialog-appearance-minimal .bd1 { border: 0; padding: 5px; background-color: #dde; margin: 0; }
.xforms-dialog-appearance-minimal .bd2 { padding: 3px; background-color: #fff }

/* Reasonable defaults for alignment of button content */
button.xforms-trigger img { vertical-align: middle }
button.xforms-trigger span { vertical-align: middle }
button.xforms-submit img { vertical-align: middle }
button.xforms-submit span { vertical-align: middle }

/* Reasonable defaults for alignment of anchor content */
a.xforms-trigger img { vertical-align: middle; cursor: pointer }
a.xforms-readonly img { cursor: default }
a.xforms-trigger span { vertical-align: middle }

a.xforms-readonly { color: gray; cursor: default }

.xforms-message {
    list-style: disc;
    display: list-item;
    margin-left: 2em;
}

.xforms-tree-label-selected {
    background-color: #ffc;
}

#xforms-repeat-tree {
    display: none;
}

#xforms-repeat-indexes {
    display: none;
}

#wait .bd { background-color: white }

/* In the tree, because we don't have an href, we use this CSS so the cursor is a pointer when over the link */
a.ygtvlabel { cursor: pointer; }
