/* dependencies
- articles/editor.css
- format/format.js

/ theme supported

note that when defining .markdown-autoformat 
widgets, must avoid two elements otherwise would
conflict with comments.css
    - ul.comments-list
    - ul.comments-list h6

editor_m.css: is used in template pack editor.html
editor.css: common lib that is impl everywhere
if use directly, add class to format target wrapper
.md-auto-format
*/
form#textarea-form textarea{
    background-color: #ccc;
    border: none;
    outline: none;
}

/* CSS Pre Code */
pre {
    background: #333;
    white-space: pre;
    word-wrap: break-word;
    overflow: auto;
    z-index: 20000;
}

pre.code {
    margin: 20px 25px;
    border-radius: 4px;
    border: 1px solid #292929;
    position: relative;
}

pre.code label {
    font-family: sans-serif;
    font-weight: bold;
    font-size: 13px;
    color: #ddd;
    position: absolute;
    left: 1px;
    top: 15px;
    text-align: center;
    width: 60px;
    user-select: none;
    pointer-events: none;
}

pre.code code {
    font-family: "Inconsolata","Monaco","Consolas","Andale Mono","Bitstream Vera Sans Mono","Courier New",Courier,monospace;
    display: block;
    margin: 0 0 0 60px;
    padding: 15px 16px 14px;
    border-left: 1px solid #555;
    overflow-x: auto;
    font-size: 13px;
    line-height: 19px;
    color: #ddd;
}

pre.code code::-webkit-scrollbar{
    display: none;
}

.copiable{
    position: relative;
    z-index: 2000;
}

pre div.widget,
.copiable .widget{
    z-index: 200000;
    text-indent: 0;
    /* end of unsetters */
    position: absolute;
    /* right: 18px; */
    top: 10px;
    /* content: "double click to selection"; */
    padding: 0;
    width: auto;
    height: auto;
    position: absolute;
    font-size: 12px;
    color: #333;
    line-height: 20px;
    overflow: hidden;
    backface-visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fff;
    transition: all 400ms ease-in;
    padding: 5px;
    border-radius: 5px;
    font-weight: bold;
    display: none;
}

pre div.widget:hover{
    opacity: 0.75;
}

pre.code-css code {
    color: #91a7ff;
}

pre.code-html code {
    color: #aed581;
}

pre.code-javascript code {
    color: #ffa726;
}

pre.code-jquery code {
    color: #4dd0e1;
}

pre.code-python code {
    color: #9fb3f5;
}

pre.code-java code {
    color: #f1e3bc;
}

/* end of pre code */

.md-auto-format iframe{
    margin-left: calc(50% - 300px);
    margin-top: 20px;
    margin-bottom: 20px;
}

/* table styles */
.md-auto-format table {
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    font-family: Garamond;
    /* width: 400px; */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
}

.md-auto-format td, 
.md-auto-format th{
    text-align: center;
    background-color: #aaa;
    color: #000;
}

.md-auto-format th:first-child{
    border-radius: 5px 0 0 0 ;
}

.md-auto-format th:last-child{
    border-radius: 0 5px 0 0 ;
}

.md-auto-format tr:last-child td:last-child{
    border-radius: 0 0 5px 0 ;
}

.md-auto-format tr:last-child td:first-child{
    border-radius: 0 0 0 5px;
}

.md-auto-format table thead tr th{
    background-color: #888;
    color: #ffffff;
    text-align: center;
}

.md-auto-format table tbody td:nth-of-type(even){
    color: #fff;
    background-color: #999 !important;
}

.md-auto-format table thead th{
    padding: 4px 8px;
}

.md-auto-format table tbody td{
    padding: 4px 8px;
}

/* blackquoat */
blockquote {
  background: var(--bg-table-row-odd, #f9f9f9);

  border-left: 10px solid var(--i-odd, #ccc);
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  quotes: "\201C""\201D""\2018""\2019";
}

blockquote:before {
  color: var(--i-odd, #ccc);
  content: open-quote;
  font-size: 4em;
  line-height: 0.1em;
  margin-right: 0.25em;
  vertical-align: -0.4em;
}

blockquote p {
  display: inline;
}

.md-auto-format .right {
    text-align: right;
}

/* codeInput */
.md-auto-format .what, 
.md-auto-format input.code-input{
    /* round the corners */
    font-size: 1.2em;
    padding: 5px 8px;
    margin: 0.1em;
    letter-spacing: 0.25px;
    width: 100px;
    background-color: transparent;
    color: #CCC;
    border-radius: 4px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;    
    outline:none;
    border: 1px solid #4195fc; 
    box-shadow: 0px 0px 5px #4195fc; 
    -moz-box-shadow: 0px 0px 5px #4195fc;
    -webkit-box-shadow: 0px 0px 5px #4195fc;  
}

.md-auto-format .what:focus, 
.md-auto-format input.code-input:focus{
    box-shadow: 0px 0px 15px #4195fc; 
  -moz-box-shadow: 0px 0px 15px #4195fc;
  -webkit-box-shadow: 0px 0px 15px #4195fc;  
}

.md-auto-format .what.right,
.md-auto-format input.code-input.right{
    box-shadow: 0px 0px 15px #41fc51; 
    -moz-box-shadow: 0px 0px 15px #41fc51;
    -webkit-box-shadow: 0px 0px 15px #41fc51;  
}

.md-auto-format .what.wrong,
.md-auto-format input.code-input.wrong{
    box-shadow: 0px 0px 15px #fc4141; 
    -moz-box-shadow: 0px 0px 15px #fc4141;
    -webkit-box-shadow: 0px 0px 15px #fc4141;  
}


/*
official built-in md-auto-format widget styling
*/
.md-auto-format{
    font-family: 'FangSong', '仿宋', serif;
    /* border: 1px solid red; */
    font-size: 18px;
}

.md-auto-format > p{
    padding: 20px 40px;
}

.md-auto-format > img, 
.md-auto-format > image, 
.md-auto-format > p > img,
.md-auto-format > p > image{
    margin: 15px auto;
    display: block;
    object-fit: cover;
    min-width: 600px;
    min-width: 350px;
    border-radius: 5px;
    box-shadow: 0 0 10px var(--i-odd, #ccc);
}

.md-auto-format hr{
    margin: 30px 0;
    box-shadow: 0 0 10px var(--border-header, #ccc);
    border-bottom: 1px solid var(--border-header-hover, #eee);
}

.md-auto-format ol,
.md-auto-format ul{
    padding-left: 50px;
    margin: 20px 0;
}

.md-auto-format ul:not(.comments-list) li{
    text-indent: 15px;
}

.md-auto-format li input[type=checkbox]{
    transform: scale(1.25);
    margin-right: 5px;
}

