
/*
 * Note about width variable:
 * Don't forget that we are using same "width" value in layout editor (.encp-layout-editor-note-content)
 * This also concerned body's medium and large zoom level classes
 */
body {
  font-family: "Gotham";
  width: 76%;   /* Also reflect the change of width to "div.encp-layout-editor-note-content" style */
  margin: auto;
  font-size: 0.76rem; /* 1rem = 16px (maybe, depends on browser), after our applied scale percentage we have to
                         divide desired font size by 30 to get correct rem */
  line-height: 1.25rem;
  color: rgb(67, 67, 67);
  background-color: transparent;
  overflow-x: hidden;
  word-wrap: break-word;
}

body.encp-medium-zoom {
  /* Also reflect the change of width to "body.encp-medium-zoom div.encp-layout-editor-note-content" style */
  width: 80%;
}

body.encp-large-zoom {
  /* Also reflect the change of width to "body.encp-large-zoom div.encp-layout-editor-note-content" style */
  width: 84%;
}

div.encp-note-title > div.encp-title-container {
  max-width: 100%;
  padding: 0 3.95%; /* padding = (100% / longestParentWidth% * paddingInDesign% / 2) 
                       e.g. used for 15% in 15%/70%/15% title when body width is 76% */
}

body.encp-medium-zoom div.encp-note-title > div.encp-title-container {
  padding: 0 6.25%;
}

body.encp-large-zoom div.encp-note-title > div.encp-title-container {
  padding: 0;
}

li {
  line-height: 1.4rem;
  vertical-align: text-top;
}

hr {
  height: 1px;
  border: 0;
  padding: 0;
  margin: 1.2rem auto;
  width: 100%;
  background-color: rgb(191, 191, 191);
}

.small-font {
  font-size: 0.62rem;
}

.medium-font {
  font-size: 0.85rem;
}

.large-font {
  font-size: 1.16rem;
}

p + p {
  margin-top: 0.6rem;
}

li, div {
  margin-top: 0;
}

b, strong {
  font-weight: bold;
}

/*
 * Highlight
 */
.encp-note-highlight {
  color: black !important;
  background-color: rgb(255, 250, 165) !important;
}

.encp-note-highlight * {
  color: black !important;
}

/*
 * Monospace
 */
.encp-note-monospace {
  font-family: "Menlo",monospace;
  font-size: 0.6rem;
  line-height: 1.0rem;
  margin: 0 2rem;
}

.encp-note-monospace > div {
  margin-top: 0;
}

font.encp-note-monospace,
span.encp-note-monospace,
em.encp-note-monospace,
strong.encp-note-monospace {
  display: inline-block;
}

.encp-monospace-inline {
  font-family: "Menlo",monospace;
}

.encp-note-monospace .small-font {
  font-size: 0.44rem;
}

.encp-note-monospace .medium-font {
  font-size: 0.6rem;
}

.encp-note-monospace .large-font {
  font-size: 0.81rem;
}

/*
 * Checkboxes
 */
/* Invalid markup, but we have it in our 'This special one' test note */
ol > div > .encp-checkbox {
  margin-top: 0;
}

.encp-checkbox.encp-inside-text {
  margin-left: 0.3rem;
}

.encp-checkbox {
  margin-right: 0.26rem;
  text-align: center;
  margin-top: 0.15rem;
  height: 0.9rem;
  width: 0.9rem;
  vertical-align: top;
  display: inline-block;
  background-image: url(../Images/checkmarkUnchecked.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.encp-checkbox.encp-checked {
  background-image: url(../Images/checkmarkChecked.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

li .encp-checkbox {
  margin-top: 0.21rem;
}

/*
 * Table
 */
div.encp-table-container {
  text-align: center;
  padding: 0;
  margin: 0;
  /* Borders of row will be running over to make them edge-to-edge. We need to hide overflowed parts of them.  */
  overflow: hidden;
  /* 100% / 76% - 100% = 31.57% then / 2 = 15.8% */
  margin-right: -15.8%;
  margin-left: -15.8%;
}

div.encp-table-container.encp-media-with-padding {
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
}

body.encp-medium-zoom div.encp-table-container {
  /* 100% / 80% - 100% = 25% then / 2 = 12.5% */
  margin-right: -12.5%;
  margin-left: -12.5%;
}

body.encp-large-zoom div.encp-table-container {
  /* 100% / 86% - 100% = 16.27% then / 2 = 8.14% */
  margin-right: -8.14%;
  margin-left: -8.14%;
}

table {
  margin: 0 auto;
  border-collapse: collapse;
  /*max-width: 94%;*/
  max-width: 76%; /* match body max-width */
  border-width: 0;
  table-layout: fixed;
}

td, th {
  padding: 0.93%;
  border-color: rgb(191, 191, 191);
  border-width: 1px;
  border-style: solid;
  font-size: 0.65rem;
  vertical-align: top;
  word-wrap: break-word;
}

tr:first-child td, tr:first-child th {
  border-top-width: 0;
}

tr:last-child td, tr:last-child th {
  border-bottom-width: 0;
}

td:first-child, th:first-child {
  position: relative;
  border-left-width: 0;
}

td:last-child, th:last-child {
  position: relative;
  border-right-width: 0;
}

table[style*="width: 100%"] td:first-child:before,
table[style*="width: 100%"] th:first-child:before {
  content: " ";
  display: block;
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 9999px;
  border-bottom: 1px solid rgb(191, 191, 191);
}

tr:last-child td:first-child:before, tr:last-child th:first-child:before {
  border-bottom-width: 0;
}

table[style*="width: 100%"] td:last-child:after,
table[style*="width: 100%"] th:last-child:after {
  content: " ";
  display: block;
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 9999px;
  border-bottom: 1px solid rgb(191, 191, 191);
}

tr:last-child td:last-child:after,
tr:last-child th:last-child:after {
  border-bottom-width: 0;
}

td div:first-child,
table td ol:first-child,
table td ul:first-child,
table ol > li:first-child,
table ul > li:first-child,
body.encp-medium-zoom td div:first-child,
body.encp-medium-zoom table td ol:first-child,
body.encp-medium-zoom table td ul:first-child,
body.encp-medium-zoom table ol > li:first-child,
body.encp-medium-zoom table ul > li:first-child,
body.encp-large-zoom td div:first-child,
body.encp-large-zoom table td ol:first-child,
body.encp-large-zoom table td ul:first-child,
body.encp-large-zoom table ol > li:first-child,
body.encp-large-zoom table ul > li:first-child {
  margin-top: 0;
}

td > div > img {
  max-width: 100%;
}

table .encp-checkbox {
  height: 0.7rem;
  width: 0.7rem;
}

table ul {
  margin-left: 0.7rem;
}

table ol {
  margin-left: 1.2rem;
}

table ol > li,
table ul > li {
  line-height: 0.9rem;
  margin-top: 0.36rem;
  margin-bottom: 0;
  padding-left: 0;
}

table .encp-line-spacer {
  font-size: 0.65rem;
  line-height: 0.65rem;
  margin-top: 0;
}

table .small-font {
  font-size: 0.63rem;
}

table .medium-font {
  font-size: 0.65rem;
}

table .large-font {
  font-size: 0.87rem;
}

body.encp-medium-zoom td,
body.encp-medium-zoom th {
  padding: 1.07%;
  font-size: 0.52rem;
}

body.encp-large-zoom table .encp-line-spacer {
  font-size: 0.52rem;
  line-height: 0.52rem;
  margin-top: 0;
}

body.encp-medium-zoom table .small-font {
  font-size: 0.5rem;
}

body.encp-medium-zoom table .medium-font {
  font-size: 0.52rem;
}

body.encp-medium-zoom table .large-font {
  font-size: 0.69rem;
}

body.encp-medium-zoom table .encp-checkbox {
  height: 0.6rem;
  width: 0.6rem;
}

body.encp-medium-zoom table ol > li,
body.encp-medium-zoom table ul > li {
  line-height: 0.72rem;
  margin-top: 0.29rem;
}

body.encp-medium-zoom table ul {
  margin-left: 0.6rem;
}

body.encp-medium-zoom table ol {
  margin-left: 1.0rem;
}

body.encp-large-zoom td,
body.encp-large-zoom th {
  padding: 1.36%;
  font-size: 0.49rem;
}

body.encp-large-zoom table .encp-line-spacer {
  font-size: 0.49rem;
  line-height: 0.41rem;
  margin-top: 0;
}

body.encp-large-zoom table .small-font {
  font-size: 0.41rem;
}

body.encp-large-zoom table .medium-font {
  font-size: 0.49rem;
}

body.encp-large-zoom table .large-font {
  font-size: 0.57rem;
}

body.encp-large-zoom table .encp-checkbox {
  height: 0.55rem;
  width: 0.55rem;
}

body.encp-large-zoom table ol > li,
body.encp-large-zoom table ul > li {
  line-height: 0.67rem;
  margin-top: 0.27rem;
}

body.encp-large-zoom table ul {
  margin-left: 0.75rem;
}

body.encp-large-zoom table ol {
  margin-left: 1.0rem;
}

/*
 * Table inside table
 */
table div.encp-table-container {
  margin: 0;
}

table div.encp-table-container table td:last-child:after,
table div.encp-table-container table th:last-child:after,
table div.encp-table-container table td:first-child:before,
table div.encp-table-container table th:first-child:before {
  border-bottom-width: 0;
}

/*
 * Links
 */
a.encp-text-link,
a.encp-text-link:visited,
a.encp-text-link:active {
  background-color: inherit;
  color: rgb(0, 144, 244) !important;
  text-decoration: underline;
  cursor: pointer;
  padding-top: 0.1rem;
  -webkit-transition: background-color 250ms ease-in-out, color 250ms ease-in-out, text-decoration 250ms ease-in-out;
}

a.encp-text-link:hover,
a.encp-text-link:focus {
  color: white !important;
  background-color: rgb(0, 144, 244) !important;
  text-decoration: none;
  -webkit-transition: background-color 250ms ease-in-out, color 250ms ease-in-out, text-decoration 250ms ease-in-out;
}

a.encp-note-link.encp-text-link,
a.encp-note-link.encp-text-link:visited,
a.encp-note-link.encp-text-link:active {
  color: rgb(1, 159, 81) !important;
  text-decoration: underline;
}

a.encp-note-link.encp-text-link:hover,
a.encp-note-link.encp-text-link:focus {
  color: white !important;
  background-color: rgb(1, 159, 81) !important;
  text-decoration: none;
  -webkit-transition: background-color 250ms ease-in-out, color 250ms ease-in-out, text-decoration 250ms ease-in-out;
}

a.encp-broken-link,
a.encp-broken-link.encp-note-link.encp-text-link,
a.encp-broken-link:hover,
a.encp-broken-link.encp-note-link.encp-text-link:hover,
a.encp-broken-link:focus,
a.encp-broken-link.encp-note-link.encp-text-link:focus {
  cursor: default;
  text-decoration: inherit !important;
  background-color: transparent !important;
  color: rgb(47, 47, 47) !important;
  -webkit-transition: none;
}

a hr,
a:visited hr,
a:hover hr,
a:focus hr,
a:active hr {
  background-color: transparent !important;
  -webkit-transition: none !important;
}

/*
 * List styles (ul, ol)
 */
ul {
  margin-left: 2.22rem;
  padding: 0;
  list-style-type: disc;
  line-height: 1.1rem;
}

ul > li {
  padding-left: 0.2rem;
}

ol {
  margin-left: 2.22rem;
  font-weight: bold;
  padding: 0;
  line-height: 1.1rem;
}

ol > li {
  padding-left: 0.2rem;
  margin-left:0;
  margin-bottom: 0.454rem;
}

ol > li > span.content {
  font-weight: normal;
  display: block;
  -webkit-nbsp-mode: space;
  -webkit-line-break: after-white-space;
}

ol > li > span.content > ul {
  margin: 0 0 0 2.27rem;
  padding: 0;
}

body.encp-large-zoom ul,
body.encp-large-zoom ol {
  margin-left: 1rem;
}

/*
 * Media container
 */
div.encp-media-container {
  -webkit-transform: scale(1.0);
  -webkit-transition: -webkit-transform 0.2s linear;
  text-align: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin-top: 0;
  /* 100% / 76% - 100% = 31.57% then / 2 = 15.8% + 0.1% margin */
  margin-right: -15.9%;
  margin-left: -15.9%;
}

div.encp-media-container.encp-mouse-down {
  /* MUST ensure the scale matches CLICKED_CONTAINER_SCALE in ENCPMediaContents.js */
  -webkit-transform: scale(0.95);
}

li div.encp-media-container,
body.encp-medium-zoom li div.encp-media-container,
body.encp-large-zoom li div.encp-media-container {
  text-align: left;
}

body.encp-medium-zoom div.encp-media-container {
  /* 100% / 80% - 100% = 25% then / 2 = 12.5% */
  margin-left: -12.5%;
  margin-right: -12.5%;
}

body.encp-large-zoom div.encp-media-container {
  /* 100% / 86% - 100% = 16.27% then / 2 = 8.14% + 0.01% margin */
  margin-right: -8.15%;
  margin-left: -8.15%;
}

div.encp-media-container.encp-media-nonimage {
  margin-left: 0!important;
  margin-right: 0!important;
}

div.encp-media-container.encp-media-with-padding {
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
}

div.encp-media-container + div.encp-media-container {
  padding-bottom: 2rem;
}

div.encp-media-container + br {
  display: none;
}

div.encp-media-container > div.encp-media-preview {
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  margin-bottom: 0;
}

.encp-media-container img {
  margin-left: auto;
  margin-right: auto;
  max-height: none;
  max-width: 100%;
}

.encp-media-container .encp-portrait {
  max-height: 90%;
  max-width: none;
}

.encp-media-container-document > .encp-shadow {
  position: absolute;
  display: block;
  left: 0;
  right: 0;
  top: -0.5rem;
  bottom: 0;
}

.encp-media-container-document > .encp-shadow.encp-first-shadow {
  transform: rotate(2deg);
  -webkit-transform: rotate(2deg); /* a workaround to make sure enabling transform */
  background-color: rgb(219,219,219);
}

.encp-media-container-document > .encp-shadow.encp-second-shadow {
  transform: rotate(1deg);
  -webkit-transform: rotate(1deg); /* a workaround to make sure enabling transform */
  background-color: rgb(234,234,234);
}

.encp-media-container-document {
  position: relative;
}

.encp-media-container-document > .en-media.encp-document {
  position: relative;
  border-style: solid;
  border-width: 1px;
  border-color: rgb(234,234,234);
  opacity: 1.0;
  display: block;
  background-color: white;
}

/*
 * Inline images
 */
.encp-media-container-inline {
  display: inline-block;
  margin-top: 0;
  margin-bottom: 0.1rem;
  vertical-align: middle;
}

/*
 * Images in table
 */
.encp-table-image {
  height: auto !important;
  width: auto !important;
}

table div.encp-media-container,
table div.encp-media-container.encp-media-with-padding,
body.encp-medium-zoom table div.encp-media-container,
body.encp-large-zoom table div.encp-media-container {
  margin: 0 !important;
}

table div.encp-media-container img,
table div.encp-media-container .encp-portrait {
  max-width: 100%;
  max-height: none;
}

/*
 * Captions
 */
.encp-media-caption-header,
.encp-media-caption-footer {
  text-align: center;
}

.encp-media-caption-header {
  font-family: "Caecilia";
  font-size: 1.0666rem;
  line-height: 1.4666rem;
  padding: 1.6rem 15.13% 1.0rem;
}

.encp-media-caption-header b,
.encp-media-caption-header strong {
  font-weight: normal;
}

.encp-media-caption-header .large-font,
.encp-media-caption-header .medium-font,
.encp-media-caption-header .small-font {
  font-size: 1.55rem;
}

.encp-media-caption-footer {
  font-size: 0.5666rem;
  line-height: 0.8rem;
  padding: 1.2rem 15.13%;
}

.encp-media-caption-footer .large-font,
.encp-media-caption-footer .medium-font,
.encp-media-caption-footer .small-font {
  font-size: 0.86rem;
}

body.encp-medium-zoom .encp-media-caption-header {
  padding: 1.28rem 12.5% 0.8rem;
}

body.encp-medium-zoom .encp-media-caption-footer {
  padding: 0.96rem 12.5%;
}

body.encp-large-zoom .encp-media-caption-header {
  padding: 0.85rem 2.38% 0.6rem;
}

body.encp-large-zoom .encp-media-caption-footer {
  padding: 0.55rem 2.38%;
}

/*
 * Miscellaneous
 */
.encp-crypt {
  border-bottom: 2px solid rgb(180, 180, 180);
  display: inline-block;
  font-size: 0.85rem;
  border-radius: 0.6rem;
  padding: 0 0.5rem;
  margin: 0.25rem 0.3rem;
  line-height: 1.0rem;
}

.encp-crypt:after {
  content: "●●●●●●●●";
}

div > span.encp-crypt:first-of-type {
  margin-left: 0;
}

html[encp-content-class='evernote.penultimate.notebook'] hr {
  display: none;
}

body, html {
  -webkit-transition: background-color 250ms ease-in-out, color 250ms ease-in-out;
}

.encp-line-spacer {
  line-height: 1rem;
  margin-top: 0;
}

.encp-hidden-line-spacer {
  display: none;
}

::selection {
  background-color: Highlight;
  color: HighlightText;
}

/*
 * Layout editor content container
 */
div.encp-layout-editor-note-content-container {
  position: relative;
  background-color: #ffffff;
  border-radius: 30px;
  cursor: pointer;
}

div.encp-layout-editor-note-content {
  /* For default zoom level left and right margins are set to 12% */
  width: 76%;
  margin-left: auto;
  margin-right: auto;
}

body.encp-medium-zoom div.encp-layout-editor-note-content {
  /* For medium zoom level left and right margins are set to 10% */
  width: 80%;
}

body.encp-large-zoom div.encp-layout-editor-note-content {
  /* For large zoom level left and right margins are set to 8% */
  width: 84%;
}

div.encp-layout-editor-note-content .encp-media-container,
div.encp-layout-editor-note-content a {
  /* Disable all pointer events for the media view & links if inside the layout editor */
  pointer-events: none;
}


/*
 * Presented area indicator clipping
 */
div.encp-layout-editor-presented-area-container {
  position: absolute;
  top: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  pointer-events: none;
}

/*
 * Presented area indicator
 */
div.encp-layout-editor-presented-area {
  position: absolute;
  background-color: rgba(177, 177, 177, 0.4);
  pointer-events: none;
}

/*
 * Section break line
 */
div.encp-section-break-ui {
  position: relative;
  z-index: 1;
}

div.encp-section-disabled-break, div.encp-section-enabled-break {
  width: 100%;
  position: absolute;
}

div.encp-section-break-ui.encp-hovered-element {
  z-index: 10000;
}

div.encp-section-enabled-break div.encp-section-break-line {
  margin: -1.5px 0;
  border-top: 3px solid #3FB4DF;
  width: 100%;
}

div.encp-section-break-ui.encp-hovered-element div.encp-section-disabled-break div.encp-section-break-line {
  margin: -0.5px 0;
  border-top: 1px solid #3FB4DF;
  width: 100%;
}

/*
 * Section break button next to the section break line
 */
div.encp-section-break-button {
  position: relative;

  width: 18px;
  height: 18px;

  margin-left: auto;
  margin-right: -24px;
  margin-top: -9px;    /* half of the height */
  margin-bottom: -9px;

  float: right;
}
/*
 * Each button below need to be centered inside button panel.
 * To do this we shift it to the right using "marging-right".
 * To calculate "marging-right" we take into account width of the button's panel: 30px
 * margin-right = -(buttonWidth + (panelWidth - buttonWidth) / 2)
 */
div.encp-section-enabled-break div.encp-section-break-button {
  content: url(../Images/space-divider-remove-DayMode.svg);
}
div.encp-section-break-ui.encp-hovered-element div.encp-section-enabled-break div.encp-section-break-button {
  content: url(../Images/space-divider-remove-DayMode-HoverState.svg);
}
div.encp-section-disabled-break div.encp-section-break-button {
  content: url(../Images/space-divider-add.svg);
}
div.encp-section-break-ui.encp-hovered-element div.encp-section-disabled-break div.encp-section-break-button {
  content: url(../Images/space-divider-add-HoverState.svg);
}

/*
 * Section break. Enabled line
 */
div.encp-section-enabled-break div.encp-section-break-line.encp-draggable-element:after {
  content: url(../Images/space-divider-drag.svg);
  width: 18px;
  height: 18px;

  display: block;
  margin: -9px auto; /* half of the height */
}

/*
 * Drag and Drop
 */
.encp-draggable-element {
  position: relative;
}

/*
 * Section break animation
 */
.encp-section-break-animation {
  -webkit-transition-property: padding-top, padding-bottom;
  -webkit-transition-duration: 250ms, 250ms;
}
img.encp-section-break-animation {
  -webkit-transition-property: width, height, margin-top, margin-bottom;
  -webkit-transition-duration: 250ms, 250ms, 250ms, 250ms;
}
