.pywebio {
    min-height: 100vh;
    padding-top: 20px;
    padding-bottom: 1px; /* if set 0, safari has min-height issue */
}

.markdown-body hr {
    height: 2px;
    padding: 0;
    margin: 24px 0;
    background-color: #eaecef;
    border: 0;
}

.container {
    margin-top: 0;
    max-width: 880px;
}

#input-cards{
    max-width: 880px;
}

#output-container {
    -webkit-font-smoothing: antialiased;
    margin-bottom: 20px;
}

#input-container h5.card-header {
    padding: .4rem 1.25rem;
}

#input-container {
    z-index: 100;
    background: white;

    position: static;
    height: fit-content;
    box-shadow: none;

    margin-top: 0;
    margin-bottom: 40px; /* must equal #input-container.fixed padding-bottom */
}

#input-container.fixed {
    position: fixed !important;
    overflow: visible;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    box-shadow: 0 0 12px 1px rgba(80, 80, 80, 0.2);
    margin-bottom: 0;
    padding: 40px 0; /* must equal #input-container margin-bottom */
}

#input-container .card {
    margin: 0 auto;
}

.footer {
    height: 50px;
    text-align: center;
    color: gray;
    background-color: #efefef;
    line-height: 50px; /*设置line-height与父级元素的height相等, 以实现垂直居中*/
    margin: 0 auto;
}

.footer hr {
    margin-bottom: 0.5rem;
}

.footer a:visited {
    color: #9B59B6;
}

.footer a {
    color: #2980B9;
    text-decoration: none;
    cursor: pointer;
}

#title {
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* Amend markdown style */
.markdown-body {
    font-family: inherit;
    color: inherit;
}
.markdown-body blockquote, .markdown-body dl, .markdown-body ol, .markdown-body p, .markdown-body pre, .markdown-body table, .markdown-body ul, .markdown-body details {
    margin-bottom: 10px;
}

.CodeMirror {
    font-size: 13px
}

h5.card-header:empty {
    padding: 0 !important;
    border-bottom: 0 !important;
}

button {
    margin-bottom: 8px;
}

td blockquote, td dl, td ol, td p, td pre, td table, td ul, td button, .form-group button, td pre {
    margin-bottom: 0 !important;
}

.form-group {
    margin-bottom: 0.4rem;
}

.form-group label {
    margin-bottom: 0px;
}

#input-container .card-body {
    padding: 0.8rem 1.25rem;
}

img {
    -webkit-animation-name: image-load-in;
    animation-name: image-load-in;
    -webkit-animation-duration: .6s;
    animation-duration: .6s
}

.no-animation img {
    -webkit-animation-name: none;
    animation-name: none
}

@-webkit-keyframes image-load-in {
    0% {
        -webkit-filter: blur(8px);
        filter: blur(8px);
        opacity: 0
    }
    100% {
        -webkit-filter: blur(0);
        filter: blur(0);
        opacity: 1
    }
}

@keyframes image-load-in {
    0% {
        -webkit-filter: blur(8px);
        filter: blur(8px);
        opacity: 0
    }
    100% {
        -webkit-filter: blur(0);
        filter: blur(0);
        opacity: 1
    }
}

.custom-file {
    margin-bottom: 8px;
}

summary:focus {
    outline: none;
}

details {
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 4px;
    padding: .5em .5em 0;
}

summary {
    /*font-weight: bold;*/
    margin: -.5em -.5em 0;
    padding: .5em;
    background-color: rgba(0,0,0,.03);
}

details[open] {
    padding: .5em;
}

details[open]>summary {
    border-bottom: 1px solid rgba(0,0,0,.125);
    margin-bottom: .5em;
}

.actions-result {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 8px;
}
.hide{
    display: none;
}
.single-input-action-btn{
    border-top-right-radius: 0.25rem!important;
    border-bottom-right-radius: 0.25rem!important;
}

.alert-success > a {
    color: #0b2e13;
}

.alert-danger > a {
    color: #491217;
}

.alert-warning > a {
    color: #533f03;
}

.alert-info > a {
    color: #062c33;
}

.alert > a {
    font-weight: 700;
}

/*Tabs widget style*/
/*Credit: https://themes.gohugo.io/theme/hugo-book/docs/shortcodes/tabs/   Licensed by MIT */
.webio-tabs {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    border-radius: .25rem;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
}

.webio-tabs > label {
    display: inline-block;
    padding: .5rem 1rem;
    border-bottom: 1px transparent;
    cursor: pointer;
    margin-bottom: 0!important;
}

.webio-tabs > label:hover {
    background-color: #e9ecef;
}

.webio-tabs > .webio-tabs-content {
    order: 999;
    width: 100%;
    border-top: 1px solid #f5f5f5;
    padding: 1rem;
    display: none
}

.webio-tabs > input[type=radio]:checked + label {
    border-bottom: 2px solid #0055bb
}

.webio-tabs > input[type=radio]:checked + label + .webio-tabs-content {
    display: block
}

.webio-tabs > input.toggle {
    height: 0;
    width: 0;
    overflow: hidden;
    opacity: 0;
    position: absolute;
}

.webio-tabs > [type=radio] {
    box-sizing: border-box;
    padding: 0;
}
/*End of Tabs widget*/

.custom-file-label > span {
    overflow: hidden;
    width: calc(100% - 6ch - 0.75rem) !important; /* 6ch is for "Browse", 0.75rem is for the padding of "Browse" button */
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block !important;
}

.CodeMirror-fullscreen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  height: auto;
  z-index: 9;
}

.pywebio-clickable{
    cursor: pointer;
}

/* scrollable widget */
.webio-scrollable{
    overflow: auto;
    margin-bottom: 10px;
}

.webio-scrollable.scrollable-border{
    padding: 10px;
    border: 1px solid rgba(0,0,0,.125);
    box-shadow: inset 0 0 2px 0 rgba(0,0,0,.1);
}

/* dark theme */
.webio-theme-dark #input-container {
    background: #0d1117;
}

.webio-theme-dark #input-container.fixed {
    box-shadow: 0px 0px 8px 5px rgb(0 0 0);
}

.webio-theme-dark .footer {
    background-color: #0d1117;
    border-top: 1px solid #30363d;
}

.webio-theme-dark .webio-tabs {
    border: 1px solid #343a40;
}
.webio-theme-dark .webio-tabs > .webio-tabs-content {
    border-top: 1px solid #343a40;
}
.webio-theme-dark .webio-tabs > label:hover {
    background-color: #000;
}
.webio-theme-dark .webio-tabs > input[type=radio]:checked + label {
    border-bottom: 2px solid #0040a1;
}

.webio-theme-dark .scrollable-border{
    border: 1px solid #343a40;
}

.webio-theme-dark details{
    border: 1px solid #343a40;
}
.webio-theme-dark details>summary{
    background-color: #191d21;
}
.webio-theme-dark details[open]>summary{
    border-bottom: 1px solid #343a40;
}
/* dark theme end */

/* For range input */
.form-control-range {
    display:inline;
    width:calc(100% - 40px);
}
.form-control-range-value{
    display: inline-block;
    max-width: 35px;
    white-space: nowrap;
    color: #6c757d;
    line-height: 14px;
    vertical-align: text-top;
}

/* ag-grid datatable */
.webio-datatable{
    margin-bottom: 10px;
}
.ag-grid-cell-bar, .ag-grid-tools {
    border-left: solid 1px #bdc3c7;
    border-right: solid 1px #bdc3c7;
    border-bottom: solid 1px #bdc3c7;
    font-size: 13px;
    line-height: 16px;
}

.ag-grid-cell-bar {
    display: none;
    padding: 4px 12px;
    word-break: break-word;
    min-height: 24px;
}

.ag-grid-tools {
    display: -webkit-flex; /* Safari */
    display: flex;
    align-items: center;
    min-height: 23px;
    font-weight: 600;
    font-size: 12px;
    opacity: 0;
}

.ag-grid-tools > .grid-status {
    display: -webkit-flex; /* Safari */
    display: flex;
    align-items: center;
    flex-shrink: 0;; /* don't compress me when there no more space */
    margin: 0 12px;
    color: rgba(0, 0, 0, 0.38);
    min-width: 170px;
}

.ag-grid-tools .select-count {
    padding-right: 8px;
}

.ag-grid-tools > .grid-actions {
    flex-grow: 1; /* use left space */
    display: -webkit-flex; /* Safari */
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.ag-grid-tools .sep {
    background-color: rgba(189, 195, 199, 0.5);
    width: 1px;
    height: 14px;
}

.ag-grid-tools .act-btn {
    font-weight: 600;
    font-size: 12px;
    box-shadow: none;
    color: #0000008a;
    cursor: pointer;
    padding: 3px 8px;
    border: none;
    border-radius: 0;
}

.ag-grid-tools .act-btn:hover {
    background-color: #f1f3f4;
}

.ag-grid-tools .act-btn:active {
    background-color: #dadada;
}