/*
** General visibility / frame layout adjustments
*/
html {
  height: auto !important;
  overflow: auto;
  /* visible == IE8 compatability view problems */
}

body,
#main {
  height: auto !important;
  overflow: visible;
}

#main {
  position: inherit;
  left: inherit;
  top: inherit;
  padding-top: 0;
  width: inherit;
}

#panel {
  margin-left: 0 !important;
  border-left: none;
  height: auto;
  position: inherit;
}

#panel-title-toolbar,
#status,
#sidebar {
  display: none !important;
}

#layout-type-report #panel-title,
#panel-title {
  background-color: #e8e8e8;
  color: white;
}

@media print {
  #layout-type-report #panel-title,
  #panel-title {
    background-color: white;
    color: black;
  }
  #layout-type-report #panel-title h1,
  #panel-title h1 {
    text-shadow: none;
  }

  a[href]:after {
    content: "";
  }
}
#panel-content,
#overflow {
  height: auto !important;
  overflow: visible;
  overflow-y: visible;
}

#panel-footer {
  bottom: inherit;
  position: inherit;
  width: auto;
}

a {
  text-decoration: none;
}

/*
** Page breaking adjustments
*/
.im-table,
.im-table tr,
.im-report-table,
.im-report-notes,
.im-chart,
.im-pf-report-table tr {
  page-break-inside: avoid;
}

.im-report h1 {
  page-break-after: avoid;
}

#MessageActivity-section,
#TrafficSources-section,
#carrierSourcePieChart,
#calendarDayMessageDataBarChart,
#calendarHourMessageDataBarChart,
#TrafficSummarySection-section,
#tagsBarChart,
#affiliateBarChart,
#MessageDeliveryWithGraphSection-section,
#SurveyResults-section,
#yearMonthBarChart,
.survey-response-section {
  page-break-before: always;
}

/*
** Page content adjustments
*/
#layout-type-report #detailsPanel_closed,
#layout-type-report #listFilter_opened,
#layout-type-report #panel-toolbar,
#layout-type-report .noprint,
#layout-type-report #page-container .tool,
#layout-type-report .im-chart-option,
.amExportButton {
  display: none !important;
}

#layout-type-report .alwaysprint {
  display: block !important;
}

#layout-type-report #listFilter_closed,
#layout-type-report #detailsPanel_open {
  display: block !important;
}

#layout-type-report .im-chart-option-selected {
  display: inline-block !important;
}

.im-toggle-ctrl,
.im-toggle-ctrl-right {
  background: none;
  padding-left: 0;
  padding-right: 0;
}

#layout-type-report .print-margin-top {
  margin-top: 1.5em;
}

/*
 * OpenFaces fixes, review if we remove OpenFaces...
 */
.im-tree-table tr {
  display: table-row !important;
}

.im-tree-table img.o_toggle_e,
.im-tree-table img.o_toggle_c {
  display: none;
}

/*
MEDIA-4562 : Black border around canvas in PDF report
There is a bug in Wkhtmltopdf which it can not display stroke opacity less than 1.
The solutions is change the print css and style the stroke color to match the opacity values for path and rectangle.
1. If the stroke opacity is 0 or close to 0 and the stroke color is not white, change the stroke color to white.
2. If the stroke opacity is less than 1 and the stroke color is not white, change the stroke color with calculated
RGB Hex value using the opacity percentage and the stroke color.
*/
path[stroke-opacity='0'][stroke='0'],
path[stroke-opacity='0'][stroke='#000'],
path[stroke-opacity='0'][stroke='#000000'],
path[stroke-opacity='0.001'][stroke='0'],
path[stroke-opacity='0.001'][stroke='#000'],
path[stroke-opacity='0.001'][stroke='#000000'],
path[stroke-opacity='0'][stroke='#888888'],
rect[stroke-opacity='0'][stroke='0'],
rect[stroke-opacity='0'][stroke='#000'],
rect[stroke-opacity='0'][stroke='#000000'],
rect[stroke-opacity='0.001'][stroke='0'],
rect[stroke-opacity='0.001'][stroke='#000'],
rect[stroke-opacity='0.001'][stroke='#000000'],
rect[stroke-opacity='0'][stroke='#888888'] {
  stroke: white;
}

path[stroke-opacity='0.15'][stroke='#000'],
path[stroke-opacity='0.15'][stroke='#000000'],
rect[stroke-opacity='0.15'][stroke='#000'],
rect[stroke-opacity='0.15'][stroke='#000000'] {
  stroke: #d9d9d9;
}

path[stroke-opacity='0.005'][stroke='#000'],
path[stroke-opacity='0.005'][stroke='#000000'],
rect[stroke-opacity='0.005'][stroke='#000'],
rect[stroke-opacity='0.005'][stroke='#000000'] {
  stroke: #FAFAFA;
}

path[stroke-opacity='0.2'][stroke='#000'],
path[stroke-opacity='0.2'][stroke='#000000'],
rect[stroke-opacity='0.2'][stroke='#000'],
rect[stroke-opacity='0.2'][stroke='#000000'] {
  stroke: #cccccc;
}

path[stroke-opacity='0.3'][stroke='#000'],
path[stroke-opacity='0.3'][stroke='#000000'],
rect[stroke-opacity='0.3'][stroke='#000'],
rect[stroke-opacity='0.3'][stroke='#000000'] {
  stroke: #636363;
}

@media print {
  a[href]:after {
    content: none;
  }
}
