/*
Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
                   Vincent Pelletier <vincent@nexedi.com>
                   Christophe Dumez <christophe@nexedi.com>

This program is Free Software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
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 General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

input, textarea, select, button, body, div, span, fieldset {
  font-family: <dtml-var font_family>;
  font-size: <dtml-var font_size>;
  margin: 0;
  padding: 0;
}

div.pre div {
 background: #FFF;
}

span.pre {
 font-family: monospace;
 color: black;
 white-space: pre-wrap;       /* css-3 */
 white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
 white-space: -pre-wrap;      /* Opera 4-6 */
 white-space: -o-pre-wrap;    /* Opera 7 */
 word-wrap: break-word;       /* Internet Explorer 5.5+ */
}

button, select, input {
  vertical-align: middle;
}

button span {
  background-color: inherit;
  color: #000;
}

img {
  border: 0;
}

body, div, span, fieldset {
  color: <dtml-var font_color>;
}

div, span, fieldset {
  background-color: inherit;
}

body {
  background-color: <dtml-var background_color>;
}

#main_form {
  background-color: inherit;
  color: inherit;
}

input#hidden_button {
  width: 0;
  height: 0;
  display: inline;
  border-width: 0;
  float: left;
}

a, a:visited, a:focus {
  background-color: inherit;
  color: <dtml-var link_color>;
  text-decoration: none;
}

a:hover {
  background-color: inherit;
  color: <dtml-var link_hover_color>;
  text-decoration: underline;
}

p.clear {
  height: 0;
  margin: 0;
  padding: 0;
  clear: both;
}

div.index_html {
  text-align: center;
}

div.index_html table {
  margin: 0 auto;
  text-align: left;
}

#main_bar button .description,
#context_bar button .description,
.content .field .description,
.document .actions button.save .description,
#context_bar .tool_buttons a .description {
  display: none;
}

/* Main bar */

#main_bar {
  color: inherit;
  background-color: <dtml-var navigation_bar_background_color>;
  padding-top: 2px;
  padding-bottom: 2px;
  vertical-align: middle;
}

#main_bar .first,
#context_bar .first {
  float: left;
  vertical-align: middle;
}

#context_bar #jump,
#main_bar .first{
  margin-left: 10px;
}

#listbox_title_line select,
#context_bar select,
#main_bar select {
  color: <dtml-var alternate_font_color>;
}

#main_bar .second,
#context_bar .second {
  float: right;
  vertical-align: middle;
}

#main_bar button,
#context_bar button,
.dialog_selector button,
.document .actions button.save {
  border: 0;
  margin-top: 1px;
  margin-left: 2px;
  margin-right: 2px;
  padding: 0;
  position: relative;
  cursor: pointer;
  background-color: inherit;
  color: inherit;
}

#context_bar .tool_buttons {
  vertical-align: middle;
}

#context_bar .tool_buttons a {
  margin-top: 2px;
  margin-left: 2px;
  margin-right: 2px;
  padding: 0;
  position: relative;
}

#context_bar .tool_buttons button {
 float: left;
}

#main_bar button .image,
#context_bar button .image,
.dialog_selector button .image,
.document .actions button.save .image {
  display: block;
  width: 16px;
  height: 16px;
}

/* XXX: Bug fix when not logged
   by <christophe@nexedi.com> */
.document .actions {
  min-height: 2.5em;
}

.content .field {
  position: relative;
  clear: left;
  font-style: italic;
}

.content .field .input {
  font-style: normal;
}

.content .input .figure {
  text-align: right;
}

.group_title {
  display: none;
}

div.top_group,
fieldset.left,
fieldset.center,
fieldset.bottom {
  clear: both;
}

div.top_group,
fieldset.left,
fieldset.right,
fieldset.center,
fieldset.bottom {
  margin-bottom: 5px;
}

div.top_group,
fieldset.left,
fieldset.right,
fieldset.center {
  border-style: solid;
  border-width: 1px;
  border-color: <dtml-var group_border_color>;
  padding-top: 5px;
  padding-left: 5px;
  padding-right: 5px;
}

fieldset.center {
  padding-bottom: 5px;
}

fieldset.left {
  width: 50%;
  float: left;
  margin-right: -12px; /* 5px margin *2 + 2px for left & right border width */
}

fieldset.right {
  width: 50%;
  float: left;
  margin-left: -12px; /* 5px margin *2 + 2px for left & right border width */
}

div.top_group fieldset.left,
div.top_group fieldset.right {
  border-width: 0;
  padding: 0;
  width: 50%;
}

fieldset.center,
fieldset.bottom {
  clear: both;
}

fieldset.bottom {
  border-width: 0;
}

fieldset.bottom .field label {
  display: none;
}

.login fieldset,
.dialog_box .left,
.dialog_box .right,
.dialog_box .center {
  border-width: 0;
}

.content .field {
  padding-bottom: 3px;
}

.content .field label {
  width: 30%;
}

.content .field label,
.content .field .input {
  float: left;
}

/* Exception case of the previous generic rule
   The CSS statement below fix bug #517: it doesn't make sense to have
   floating div in bottom field since label are hidden. */
fieldset.bottom .field .input {
  float: inherit;
}

.content .field .input a {
  vertical-align: middle;
}

.content .required label {
  font-weight: bold;
}

.content .field .error {
  background-color: inherit;
  color: #f00;
}

.content .error .input {
  border: 1px solid #F00;
}

.content .field .invisible label {
  display: None;
}

.login .submit {
  margin-left: 15%;
}

#jump,
#action,
#favourites,
#modules,
#language,
#search {
  float: left;
}

#favourites button .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/favourite.png');
}

#modules button .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/appearance.png');
}

#language button .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/language.png');
}

#search button .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/info.png');
}

#status,
#master {
  padding-left: .5em;
  padding-right: .5em;
}

#status {
  padding-top: .3em;
  padding-bottom: .4em;
}

/* Context bar */

#context_bar {
  padding-top: 2px;
  padding-bottom: 2px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: <dtml-var main_border_color>;
  background-color: <dtml-var context_bar_background_color>;
  color: inherit;
  vertical-align: middle;
}

#context_bar .tool_buttons a {
  float: left;
  margin-left: 2px;
  margin-right: 2px;
}

.separator {
  height: 24px;
  width: 2px;
  margin-left: 6px;
  margin-right: 6px;
  display: block;
  float: left;
}

#main_bar .separator {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/sepafon.png');
}

#context_bar .separator {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/sepacla.png');
}

#context_bar .tool_buttons a .image,
#context_bar .tool_buttons button .image,
#context_bar .tool_buttons a img {
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  display: block;
}

#context_bar #jump button .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/jump.png');
}

#context_bar #action button .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/exec16.png');
}

#context_bar .tool_buttons .list_mode .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/text_block.png');
}

#context_bar .tool_buttons .new .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/filenew.png');
}

#context_bar .tool_buttons .jump_first .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/2leftarrowb.png');
}

#context_bar .tool_buttons .jump_previous .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/1leftarrowb.png');
}

#context_bar .tool_buttons .jump_next .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/1rightarrowb.png');
}

#context_bar .tool_buttons .jump_last .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/2rightarrowb.png');
}

#context_bar .tool_buttons .import_export .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/imp-exp.png');
}

#context_bar .tool_buttons .jump_help .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/userhelp.png');
}

#context_bar .tool_buttons .find .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/find.png');
}

#context_bar .tool_buttons .print .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/print.png');
}

#context_bar .tool_buttons .report .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/report.png');
}

#context_bar .tool_buttons .cut .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/editcut.png');
}

#context_bar .tool_buttons .copy .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/editcopy.png');
}

#context_bar .tool_buttons .paste .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/editpaste.png');
}

#context_bar .tool_buttons .delete .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/editdelete.png');
}

#context_bar .tool_buttons .show_all .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/showall.png');
}

#context_bar .tool_buttons .filter .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/filter.png');
}

#context_bar .tool_buttons .filter_on .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/filter_on.png');
}

#context_bar .tool_buttons .sort .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/sort.png');
}

#context_bar .tool_buttons .configure .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/configure.png');
}

#context_bar .tool_buttons .activity_pending .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/activity_busy.png');
}

#context_bar .tool_buttons .inspect_object .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/inspect.png');
}

/* Status */

#breadcrumb {
  float: left;
/*   font-size: 90%; */
  margin-bottom: 5px;
}

#breadcrumb a {
  color: <dtml-var link_color>;
}

#logged_in_as {
  float: right;
}

#logged_in_as .logged_txt{
  color: <dtml-var link_color>;
/*   font-size: 90%; */
}

#transition_message {
  margin-left: 1em;
  color: #f00;
  background-color: inherit;
  font-weight: bold;
}

/* Content */

.dialog_box {
  color: inherit;
  background-color: <dtml-var dialog_background_color>;
  border-width: 1px;
  border-style: solid;
  border-color: <dtml-var dialog_border_color>;
  padding: .5em;
  margin-bottom: 1em;
}

.list_dialog {
  margin-bottom: .5em;
}

.dialog_selector button .description {
  display: none;
}

.dialog_selector button .image {
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/exec16.png');
}

.document .actions {
  position: relative;
  float: left;
  width: 100%;
  margin: 0;
  padding: 0;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: <dtml-var document_border_color>;
  color: <dtml-var link_color>;
}

.document .actions button.save {
  float: right;
}

.document .actions button.save span.image {
  width: 34px;
  height: 34px;
  background-image: url('<dtml-var expr="portal_url.absolute_url_path()">/images/save2.png');
}

.document .actions ul {
  float: left;
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute;
  bottom: -1px;
}

.document .actions li {
  float: left;
  color: inherit;
  background: url('<dtml-var expr="portal_url.absolute_url_path()">/images/tab_left.png') top left no-repeat;
  margin: 0;
  padding: 0 0 0 10px;
}

.document .actions li a {
  display: block;
  padding: 5px 15px 4px 5px;
  color: inherit;
  background-color: inherit;
  background: url('<dtml-var expr="portal_url.absolute_url_path()">/images/tab_right.png') top right no-repeat;
/*   font-size: 90%; */
}

.document .actions li.selected a {
  font-weight: bold;
  padding-bottom: 5px;
}

.document .actions li a:hover {
  text-decoration: none;
}

.document .content {
  clear: both;
  border-width: 1px;
  border-style: solid;
  border-color: <dtml-var document_border_color>;
  border-top: 0 none;
  color: inherit;
  background-color: <dtml-var document_background_color>;
  padding: 5px;
}

/* LISTBOX */
/* FIXME:
  - listbox uses lots of IDs, but there can be more than one listbox in a page !
  - hardcoded images in html which are inly used for rendering style
  */
.ListSummary {
  background: url('<dtml-var expr="portal_url.absolute_url_path()">/images/tab_left.png') top left no-repeat;
  color: #000;
  background-color: <dtml-var document_background_color>;
  padding-left: 10px;
}

.ListSummary #listbox_title,
.ListSummary #listbox_record_number,
.ListSummary #listbox_item_number {
/*   font-size: 90%; */
}

.ListSummary table {
  width: 100%;
  border-color: <dtml-var document_border_color>;
  border-style: solid;
  border-top-width: 1px;
  border-right-width: 1px;
  border-bottom-width: 0;
  border-left-width: 0;
  padding-right: 5px;
  padding-bottom: 2px;
}

.ListSummary img {
  display: none;
}

.ListSummary #listbox_next_page,
.ListSummary #listbox_previous_page {
  display: block;
  font-size: 0;
  width: 22px;
  height: 22px;
}

.ListContent {
  color: #000;
  background-color: <dtml-var document_background_color>;
  padding-left: 1px;
}

.ListContent table {
  width: 100%;
  border-collapse: collapse;
  border-color: <dtml-var document_border_color>;
  border-style: solid;
  border-width: 1px;
}

.ListContent #listbox_label_line {
  color: <dtml-var font_color>;
  background-color: <dtml-var listbox_label_background_color>;
/*   font-size: 90%; */
}

.ListContent #listbox_stat_line {
  border-top-width: 1px;
  border-top-style: solid;
  border-color: <dtml-var document_border_color>;
  color: inherit;
  background-color: <dtml-var listbox_stat_background_color>;
}

.ListContent tr.DataA {
  color: inherit;
  background-color: <dtml-var listbox_odd_background_color>;
}

.ListContent tr.DataB {
  color: inherit;
  background-color: <dtml-var listbox_even_background_color>;
}

.ListSummary #listbox_title_line #listbox_title,
.ListSummary #listbox_title_line #listbox_item_number,
.ListSummary #listbox_title_line #listbox_record_number {
  vertical-align: middle;
}

.ListContent tr.DataA:hover,
.ListContent tr.DataB:hover {
  color: inherit;
  background-color: <dtml-var listbox_hover_background_color>;
}

.ListContent td {
  border-color: <dtml-var document_border_color>;
  border-style: solid;
  border-top-width: 0;
  border-bottom-width: 0;
  border-left-width: 1px;
  border-right-width: 1px;
}

/* Background colors for span and div to display non editable fields */

div.page,
span.page {
  background-color: white;
  border-color: black;
  border-width: 1px;
  padding: 1em;
}

div.page div {
  color: black;
}

/* Css style used to display python code block in web pages */
.python_code{
  background-color:#F3F5F7;
  border:1pt solid #AEBDCC;
  color:black;
  margin:0.5em 0;
  padding:0;
  font-family:sans-serif,Arial,Helvetica;
  font-size:11px;
  font-weight:normal;
  line-height:16px;
  font-family:courier,monospace;
  white-space:-moz-pre-wrap;
  font-size:11px;
  font-weight:normal;
  line-height:16px;
  text-align:left;
}

blockquote {
  background: #f9f9f9;
  border-left: 10px solid #ccc;
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  quotes: "\201C""\201D""\2018""\2019";
}