/* ---------------------------
 * Edit bars definitions
 * ---------------------------
 */

/*
 * This class should be added to all injected div elements, instead of tweaking each element individually.
 * Makes it easier to maintain and all subsequent classes should only declare styles they actually use.
 */
.mgnlEditor, .mgnlEditor div {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent none no-repeat !important;
  outline: 0 !important;
}

a.disabled:hover {
  cursor: default !important;
}

/*
 * General appearance of edit bar.
 */
div.mgnlEditorBar {
  /* Change the box model to include borders and paddings in the width and height set. */
  /* Allows here for a more intuitive handling of place holder heights and widths. */
  -webkit-box-sizing: border-box !important; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box !important;    /* Firefox, other Gecko */
  box-sizing: border-box !important;         /* IE 8+ */
  height: 24px !important;
  /* vertical paddings minus borders -1. "-1" to make sure that FF properly align labels in all cases; for other */
  /* browsers, this has no effect. This only works with single-line labels. */
  border-top: 1px solid #96b158 !important;
  border-left: 1px solid #96b158 !important;
  border-bottom: 1px solid #355500 !important;
  border-right: 1px solid #355500 !important;
  background: transparent url("../img/bars/mgnl-bar.png") repeat !important;
  color: #f0f2e6 !important;
}

/*
 * Page edit bar.
 */
.mgnlEditorMainbar {
  position: fixed !important;
  z-index: 900 !important;
  padding: 2px !important;
  font: 62.5% arial, helvetica, sans-serif;
  width: 100% !important;
}

/**
* This is used to push down the content so that the fixed-position main bar does not cover the top of the page.
*/
.mgnlEditorMainbarWrapper {
  padding-bottom: 24px; /*must have the same height as div.mgnlEditorBar*/
}

#mgnlEditorMainbarPlaceholder {
  margin-left: 45% !important;
  line-height: 18px !important;
  position: absolute !important;
}

/*
 * Page edit bar in preview mode.
 */
.mgnlEditorMainbarPreview {
  position: absolute !important;
  z-index: 900 !important;
  top: 0pt !important;
  left: 0pt !important;
  padding: 2px 3px 0 3px !important;
  height: 20px !important;
}

/*
 * Area edit bar.
 */
div.mgnlEditorBar.area {
  border-radius: 5px 5px 0 0 !important;
  clear: both !important;
  margin: 0 0 5px 0 !important;
}

div.mgnlEditorBar.area.end {
  height: 7px !important;
  border-radius: 0 0 5px 5px !important;
  margin: 5px 0 !important;
  background-image: url("../img/bars/mgnl-bar.area.end.png") !important;
}

/*
 * Component edit bar.
 */
div.mgnlEditorBar.component, .mgnlEditorBar.placeholder {
  height: 23px !important;
    /* Component edit bars are one pixel less high than other bars. */
  line-height: 20px !important;
    /* See .mgnlEditorBar for an explanation of this */
  border-top: 1px solid #bcd56f !important;
  border-left: 1px solid #bcd56f !important;
  border-bottom: 1px solid #678b0f !important;
  border-right: 1px solid #678b0f !important;
  background: url("../img/bars/mgnl-bar.component.png") repeat !important;
  color: #2f491b !important;
  clear: both;
}


/*
 * Div carrying buttons.
 */
 div.mgnlEditorBarButtons {
  float: right !important;
}

div.mgnlEditorBarSecondaryButtons, .mgnlEditorBarPrimaryButtons {
  float: left !important;
}

div.mgnlEditorBarPrimaryButtons {
  margin: 0 0 0 4px !important;
  float: left !important;
}
div.mgnlEditorPreviewButton {
  width: auto !important;
  height: 24px !important;
  float: left !important;
}

/*
 * IconButtons on edit bars.
 */

div.mgnlEditorPushButton {
  float: left !important;
  margin: 0 3px 0 0 !important;
  height: 21px !important;
  width: 21px !important;
  cursor: pointer !important;
}


/*
 * Buttons on area edit bars.
 */

/* edit */
.mgnlEditorBar.area .mgnlEditorPushButton.edit {
  background: transparent no-repeat url("../img/bars/area.buttons/edit.png") !important;
}

.mgnlEditorBar.area .mgnlEditorPushButton.mgnlEditorPushButton-up-hovering.edit {
  background: transparent no-repeat url("../img/bars/area.buttons/edit_hover.png") !important;
}

.mgnlEditorBar.area .mgnlEditorPushButton.mgnlEditorPushButton-down-hovering.edit {
  background: transparent no-repeat url("../img/bars/area.buttons/edit_click.png") !important;
}

/* add */
.mgnlEditorBar.area .mgnlEditorPushButton.add {
  background: transparent no-repeat url("../img/bars/area.buttons/add.png") !important;
}

.mgnlEditorBar.area .mgnlEditorPushButton.mgnlEditorPushButton-up-hovering.add {
  background: transparent no-repeat url("../img/bars/area.buttons/add_hover.png") !important;
}

.mgnlEditorBar.area .mgnlEditorPushButton.mgnlEditorPushButton-down-hovering.add {
  background: transparent no-repeat url("../img/bars/area.buttons/add_click.png") !important;
}

/* remove */
.mgnlEditorBar.area .mgnlEditorPushButton.remove {
  background: transparent no-repeat url("../img/bars/area.buttons/delete.png") !important;
}

.mgnlEditorBar.area .mgnlEditorPushButton.mgnlEditorPushButton-up-hovering.remove {
  background: transparent no-repeat url("../img/bars/area.buttons/delete_hover.png") !important;
}

.mgnlEditorBar.area .mgnlEditorPushButton.mgnlEditorPushButton-down-hovering.remove {
  background: transparent no-repeat url("../img/bars/area.buttons/delete_click.png") !important;
}

/*
 * Buttons on component edit bars.
 */

/* edit */
.mgnlEditorBar.component .mgnlEditorPushButton.edit {
  background: transparent no-repeat url("../img/bars/component.buttons/edit.png") !important;
}

.mgnlEditorBar.component .mgnlEditorPushButton.mgnlEditorPushButton-up-hovering.edit {
  background: transparent no-repeat url("../img/bars/component.buttons/edit_hover.png") !important;
}

.mgnlEditorBar.component .mgnlEditorPushButton.mgnlEditorPushButton-down-hovering.edit {
  background: transparent no-repeat url("../img/bars/component.buttons/edit_click.png") !important;
}

/* move (fallback on old browsers) */
.mgnlEditorBar.component .mgnlEditorPushButton.move {
  background: transparent no-repeat url("../img/bars/component.buttons/move.png") !important;
}

.mgnlEditorBar.component .mgnlEditorPushButton.mgnlEditorPushButton-up-hovering.move {
  background: transparent no-repeat url("../img/bars/component.buttons/move_hover.png") !important;
}

.mgnlEditorBar.component .mgnlEditorPushButton.mgnlEditorPushButton-down-hovering.move {
  background: transparent no-repeat url("../img/bars/component.buttons/move_click.png") !important;
}

/* remove */
.mgnlEditorBar.component .mgnlEditorPushButton.remove {
  background: transparent no-repeat url("../img/bars/component.buttons/delete.png") !important;
}

.mgnlEditorBar.component .mgnlEditorPushButton.mgnlEditorPushButton-up-hovering.remove {
  background: transparent no-repeat url("../img/bars/component.buttons/delete_hover.png") !important;
}

.mgnlEditorBar.component .mgnlEditorPushButton.mgnlEditorPushButton-down-hovering.remove {
  background: transparent no-repeat url("../img/bars/component.buttons/delete_click.png") !important;
}


/*
 * Buttons on component placeholders.
 */
/* add */
.mgnlEditorPlaceholder.component .mgnlEditorPushButton.add {
    background: transparent no-repeat url("../img/bars/component.buttons/add.png") !important;
}

.mgnlEditorPlaceholder.component .mgnlEditorPushButton.mgnlEditorPushButton-up-hovering.add {
    background: transparent no-repeat url("../img/bars/component.buttons/add_hover.png") !important;
}

.mgnlEditorPlaceholder.component .mgnlEditorPushButton.mgnlEditorPushButton-down-hovering.add {
    background: transparent no-repeat url("../img/bars/component.buttons/add_click.png") !important;
}


/*
 * Text buttons on page edit bar.
 */
button.mgnlEditorButton {
  height: 19px !important; /* have to give the height for all browsers to properly calculate dimensions. */
  padding: 1px 10px !important;
  border-top: 1px solid #9dc114 !important;
  border-left: 1px solid #9dc114 !important;
  border-bottom: 1px solid #284f04 !important;
  border-right: 1px solid #284f04 !important;
  color: #f0f2e6 !important;
  background-color: #538d0b !important;
  font-family: Verdana, sans-serif !important;
  font-size: 11px !important;
}

button.mgnlEditorButton:hover {
  cursor: pointer !important;
}

button.mgnlEditorButton:active {
  border-top: 1px solid #284f04 !important;
  border-left: 1px solid #284f04 !important;
  border-bottom: 1px solid #9dc114 !important;
  border-right: 1px solid #9dc114 !important;
}

div.mgnlEditorMainbar div.mgnlEditorBarButtons {
  float: none !important;
}
div.mgnlEditorMainbar button.mgnlEditorButton-previewMenuButton {
  padding: 1px 8px !important;
}

div.mgnlEditorMainbarPreview div.mgnlEditorBarButtons {
  float: left !important;
}

div.mgnlEditorMainbarPreview div.mgnlEditorButton {
  float: left !important;
}

div.mgnlEditorMainbarPreview button.mgnlEditorButton {
  padding: 1px 10px !important;
  position: fixed;
}

/*
 * Label on bars showing name of component or area.
 */
div.mgnlEditorBarLabel {
  margin: 0 0 0 5px !important;
  font-family: Verdana, sans-serif !important;
  font-size: 11px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 21px !important;
}

/* --- End of edit bars definitions --- */


/* ----------------------------------
 * Definitions for edit place holders
 * ----------------------------------
 */

 /* General place holder definitions */
div.mgnlEditorPlaceholder {
  /* Change the box model to include borders and paddings in the width and height set. */
  /* Allows here for a more intuitive handling of place holder heights and widths. */
  -webkit-box-sizing: border-box !important; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box !important;    /* Firefox, other Gecko */
  box-sizing: border-box !important;         /* IE 8+ */
  clear: both !important;
  color: #487000 !important;
  font-family: Verdana, sans-serif !important;
  font-size: 12px !important;
}

/* Area place holder, not in focus. */
div.mgnlEditorPlaceholder.area {
  margin: 10px 0 !important;
  padding: 25px 15px !important;
  border-radius: 5px !important;
  background-color: #eeeeee !important;
  color: #aaaaaa !important;
  text-align: center !important;
}

/* Area place holder, in focus. */
div.mgnlEditorPlaceholder.area.active {
    display: none !important;
}

/* Component place holder */
div.mgnlEditorPlaceholder.component {
}

div.mgnlEditorPlaceholder.component .mgnlEditorPlaceholderElements {
  height: 45px !important;
  border: 2px dotted #8fbb12 !important;
  border-top: none !important;
  /* Change the box model to include borders and paddings in the width and height set. */
  /* Allows here for a more intuitive handling of place holder heights and widths. */
  -webkit-box-sizing: border-box !important; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box !important;    /* Firefox, other Gecko */
  box-sizing: border-box !important;         /* IE 8+ */
  background-color: white !important;
}

.mgnlEditorLocaleSelector {
  margin-top: 1px !important;
  margin-right: 4px !important;
}

/* --- End of edit place holder definitions --- */


/* -------------------------------------
 *  Drag and drop of component edit bar
 * -------------------------------------
 */

/* drag source */
.mgnlEditorBar.component.moveSource {
  border-top: 1px solid #deeab7 !important;
  border-left: 1px solid #deeab7 !important;
  border-bottom: 1px solid #b3c587 !important;
  border-right: 1px solid #b3c587 !important;
  background-image: url("../img/bars/mgnl-bar.component.deemphasized.png") !important;
}

/* possible drop targets */
.mgnlEditorBar.component.moveTarget {
  border: 1px solid #d0234b !important;
}

/* selected drop target */
.mgnlEditorBar.component.moveOver {
  line-height: 16px !important;
  border: 3px solid #d0234b !important;
}

.mgnlEditorBar.component.moveOver .mgnlEditorBarLabel {
  margin: 0 0 0 3px !important;
}

/* make component placeholder slightly less strong */
.mgnlEditorPlaceholder.component.moveOngoing .mgnlEditorBar {
  border-top: 1px solid #deeab7 !important;
  border-left: 1px solid #deeab7 !important;
  border-bottom: 1px solid #b3c587 !important;
  border-right: 1px solid #b3c587 !important;
  background-image: url("../img/bars/mgnl-bar.component.deemphasized.png") !important;
}

.mgnlEditorPlaceholder.component.moveOngoing .mgnlEditorPlaceholderElements {
  border: 2px dotted #b3c587 !important;
  border-top: none;
}

.mgnlEditorPlaceholder.component.moveOngoing .mgnlEditorBarLabel {
  display: none !important;
}

.mgnlEditorPlaceholder.component.moveOngoing .mgnlEditorPushButton {
  display: none !important;
}

div.mgnlEditorMoveDiv {
  position: absolute !important;
  background-image: url("../img/bars/mgnl-bar.component.deemphasized.png") !important;
  z-index: 1000 !important;
}

/* --- End of DnD definitions --- */


/* -------------------------------
 *  Definitions for Mobile Preview
 * ------------------------------- */
/*
 * Preview menu button on page edit bar.
 */
.mgnlPreviewMenuDropdown { } /* not used now currently */

.mgnlPreviewMenuDropdown table {
  width: 95px !important; /* FIXME Pseudo-align dropdown with buttons above - this is inflexible and should be changed. */
  margin: -5px 0 0 0 !important;
  padding: 0 !important;
  border-collapse: collapse !important;
  border-top: 0 !important;
  border-left: 1px solid #91BA26 !important;
  border-right: 1px solid #305000 !important;
}

.mgnlPreviewMenuPanel {
  z-index: 900 !important;
}

.mgnlPreviewMenuItem {
  height: 14px !important;
  line-height: 11px !important;
  border-bottom: 1px solid #305000 !important;
  background-color: #538d0b !important;
  color: #f0f2e6 !important;
  text-align: right !important;
  font-family: Verdana, sans-serif !important;
  font-size: 11px !important;
  cursor: pointer !important;
  padding: 5px !important;
}

.mgnlPreviewMenuItem-selected {
  background: #a1bf39 !important;
  color: #2f491b !important;
}

.mgnlEditorButton-previewMenuButton {
  margin-right: 4px !important;
  border-left: 0px !important;

  background: center no-repeat url(../img/preview/down-arrow-white.gif) !important;
  background-color: #538D0B !important;
  text-indent: -1000px !important; /* Ensure that the text on the button we need for aligning the button, is invisible. */
}

/*
 * Smartphone and tablet previews.
 */
.mgnlEditorPreviewBackground {
  background-color: black !important;
  opacity: 0.3 !important;
  filter: alpha(opacity = 30) !important;
  z-index: 900 !important;
}

.mobilePreview {
  z-index: 901 !important;
  cursor: pointer !important;
}

.mobilePreview.tabletLandscape {
  background: url(../img/preview/mobile/tablet/landscape.png) no-repeat !important;
  width: 1300px !important;
  height: 1025px !important;
}

.mobilePreview.tabletLandscape .popupContent {
  position: absolute !important;
  top: 211px !important;
  left: 128px !important;
  width: 1024px !important;
  height: 672px !important;
}

.mobilePreview.tabletPortrait {
  background: url(../img/preview/mobile/tablet/portrait.png) no-repeat !important;
  width: 1020px !important;
  height: 1300px !important;
}

.mobilePreview.tabletPortrait .popupContent {
  position: absolute !important;
  top: 224px !important;
  left: 118px !important;
  width: 768px !important;
  height: 928px !important;
}

.mobilePreview.smartphoneLandscape {
  background: url(../img/preview/mobile/smartphone/landscape.png) no-repeat !important;
  width: 752px !important;
  height: 461px !important;
}

.mobilePreview.smartphoneLandscape .popupContent {
  position: absolute !important;
  top: 112px !important;
  left: 130px !important;
  width: 480px !important;
  height: 210px !important;
}

.mobilePreview.smartphonePortrait {
  background: url(../img/preview/mobile/smartphone/portrait.png) no-repeat !important;
  width: 393px !important;
  height: 756px !important;
}

.mobilePreview.smartphonePortrait .popupContent {
  position: absolute !important;
  top: 213px !important;
  left: 32px !important;
  width: 320px !important;
  height: 356px !important;
}

.mobilePreviewIframe {
  border: none !important;
  width: 100% !important;
  height: 100% !important;
  background: center no-repeat url(../img/preview/mobile/loading.gif) !important;
}

/* --- End of mobile preview definitions --- */
