/*
  Extra CSS for the Content Placeholder admin interface customisations
 */

html.cp-jsenabled .inline-contentitem-group {
  /*
    hide all ContentItem inlines, they are moved
    to a separate DIV, where the items can be sorted.
  */
  display: none;
}

/* ---- Clearfix ---- */

.cp-clearfix:after {
  content: ".";
  font-size: 0;
  line-height: 0;
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}

/* ---- Editor items ---- */

.cp-item-controls {
  float: right;
  margin-right: 5px;
  font-size: 0;
  line-height: 0;
}

.cp-item-delete input {
  display: none; /* needed for server side, but has special handling in admin.js */
}

.cp-item-icons {
  float: left;
}

.cp-item-delete {
  float: left;
}

.cp-item-icons a {
  float: left;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  background-repeat: no-repeat;
  outline: 0;
}

.cp-item-up {
  background-image: url(img/admin/arrow_up.gif);
}
.cp-item-down {
  background-image: url(img/admin/arrow_down.gif);
}
.cp-item-move {
  background-image: url(img/admin/arrow-move.png);
}

#cp-tabmain .cp-item-move {
  background-image: url(img/admin/arrow-move-we.png);
}
/* .cp-placeholderfield .cp-item-move { background-image: url(img/admin/arrow-move-ns.png); } */
body.cp-single-placeholder .cp-item-move {
  display: none;
}
body.cp-single-placeholder #tab-orphaned .cp-item-move {
  display: inline;
} /* always show in orphaned tab */

.inline-related:first-child .cp-item-up {
  display: none;
}
.inline-related:last-child .cp-item-down {
  display: none;
}

.cp-item-delete a {
  float: left;
  width: 10px;
  height: 10px;
  padding: 3px; /* to become 16x16 */
  background: url(img/admin/icon_deletelink.gif) no-repeat 50% 50%;
  outline: 0;
}

#cp-move-popup {
  position: absolute;
  display: none;
  line-height: 20px;
  font-size: 12px;
  border: 1px solid #ccc;
}

#cp-move-popup p {
  margin: 0;
  padding: 3px 6px;
  background-image: url("img/admin/default-bg.gif");
  color: #fff;
  font-weight: bold;
  font-size: 11px;
}

#cp-move-popup ul {
  margin: 0;
  padding: 0;
  list-style-position: outside;
}

#cp-move-popup li {
  list-style: none;
  background: url(img/admin/nav-bg-reverse.gif) left bottom;
}

#cp-move-popup li a {
  display: block;
  white-space: nowrap;
  padding: 3px 6px;
}

* html #cp-move-popup li a {
  height: 1%;
}
* + html #cp-move-popup li a {
  min-height: 0;
}

.cp-empty {
  margin: 0.5em 0;
}

#cp-tabmain .cp-empty,
#cp-tabs-empty {
  margin: 10px 5px;
}

/* ---- Fieldset fixes ---- */

.form-row.cp-has-hidden-field {
  display: none;
}

form .form-row.no-labels p.help {
  padding-left: 0;
  margin-left: 0;
}

/* ---- CheckboxSelectMultiple fixes ---- */

.aligned .form-row ul li {
  list-style-type: none;
}

/* ---- Inline header fixes ---- */

h2.cp-formset-item-title {
  cursor: pointer;
  cursor: grab;
}

.sortable-chosen h2.cp-formset-item-title {
  cursor: grabbing;
}

.cp-content .inline-related h2.cp-formset-item-title {
  /* Give fieldsets inside inline a different title
     Otherwise there will be 2 levels of the same color already.
  */
  background-image: url("img/admin/nav-bg.gif");
  background-position: left bottom;
  background-repeat: repeat-x;
  background-color: #fff; /* for django-flat-theme */
  color: #999999;
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
}

.cp-content .inline-related fieldset h2 {
  background-image: url("img/admin/nav-bg-reverse.gif");
  background-repeat: repeat-x;
  background-position: left bottom;
  background-color: #e2e2e2; /* for django-flat-theme */
  color: #999999;
}

/* ---- Tabbar interface ---- */

.inline-placeholder-group {
  border: 0;
  position: relative;

  /* enforce new rendering context, avoid jumpy animations with cp_tabs.hide() / show() */
  overflow: auto;
  margin-top: 0;
}

#cp-tabnav {
  margin: 0;
  padding: 5px 0 0 0; /* the extra top space for .inline-placeholder-group */
}

#cp-tabnav li {
  float: left;
  display: inline;
  list-style: none inside;
  margin: 0;
  min-width: 100px;
  font-weight: bold;
}

#cp-tabnav a {
  outline: 0;
  display: block;
  cursor: pointer;
}

* html #cp-tabnav li.active a {
  height: 1%;
} /* IE 6 */
* + html #cp-tabnav li.active a {
  min-height: 0;
} /* IE 7 */

#cp-tabnav li.active a {
  color: #fff;
}

/* tab content */

#cp-tabmain {
  padding: 10px;
  margin: 0; /* no bottom margin, .inline-placeholder-group already takes care of this */
}

#cp-tabmain .cp-placeholder-delete {
  display: none;
}

.cp-content .form-row:last-child {
  border-bottom: 0;
  margin-bottom: 15px;
}

/* default tabbar appearance */

.cp-tab {
  display: none;
}
#cp-tabmain .cp-tab-active {
  display: block;
}

/* ---- PlaceholderField ---- */

.cp-placeholderfield {
  /* this combination gives the same space as the label */
  font-size: 12px;
  margin-left: 8em;
  position: relative;

  /* establish block context, fix jumping effect when adding first item.
     Also moves the item to the right of the label (9em+10px) */
  overflow-x: hidden;
}

.wide .cp-placeholderfield {
  margin-left: 15em;
}

fieldset.plugin-holder label {
  display: none;
}

fieldset.plugin-holder .cp-placeholderfield label {
  display: inline;
}

fieldset.plugin-holder .cp-placeholderfield {
  margin: 0;
  padding: 0;
}

/* ---- Placeholder pane ---- */

.cp-controls {
  margin-top: 15px;
}

.cp-copy-language-controls {
  margin-left: 10px;
  border-left: 1px solid #ccc;
  padding-left: 10px;
}

/* ---- Rich editor (quick fixes) ---- */

.inline-TextItem .cp-wysiwyg-widget {
  display: none; /* avoid flashing a textarea which is to become a WYSIWYG editor */
}

body.yui-skin-sam .inline-TextItem .yui-editor-container {
  border-color: #ccc;
}

body.yui-skin-sam .inline-TextItem .yui-editor-container .yui-toolbar-subcont {
  border-color: #ccc;
  padding-left: 0.5em;
}

body.yui-skin-sam .inline-TextItem .yui-toolbar-container {
  background-color: #eee;
}

body.yui-skin-sam .inline-TextItem .yui-toolbar-container .yui-toolbar-group h3 {
  font-weight: normal;
  margin-top: 0.35em;
  border: 0;
}
