html, body {
    margin: 0;
    color: #000;
    min-height: 100%;
}

body {
    overflow: auto;
    background-color: #FAFAFA;
}

body a:visited {
    color: #007cbb;
}

header {
    background-color: #224477;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 100;
}

header img {
    width: 30px;
    height: 30px;
    transition: all 0.3s;
    margin-right: 5px;
    margin-top: 14px;
}

header.smaller:not(:hover) img {
    margin-top: 4px;
}

header,
header > *,
header .branding .title,
header .header-nav .nav-link.nav-text,
header .header-actions>.dropdown>.dropdown-toggle {
    transition: all 0.3s;
}

header.smaller:not(:hover),
header.smaller:not(:hover) > *,
header.smaller:not(:hover) .branding .title,
header.smaller:not(:hover) .header-nav .nav-link.nav-text,
header.smaller:not(:hover) .header-nav .nav-link .fa,
header.smaller:not(:hover) .header-actions>.dropdown>.dropdown-toggle {
    height: 40px;
    line-height: 40px;
}

header.smaller:not(:hover) .header-nav .nav-link:first-of-type::before,
header.smaller:not(:hover) .header-nav .nav-link:last-of-type::after {
    top: 0;
}

header .header-nav.collapse-toggle {
    display: none;
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    vertical-align: middle;
    border-top: 4px dashed;
    border-top: 4px solid\9;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

body > .alert {
    position: absolute;
    top: 70px;
    left: 20px;
    right: 20px;
    z-index: 20;
}

.app-container {
    padding: 80px 20px 80px 20px;
}

.app-container .row {
    margin-left: 0;
    margin-right: 0;
}

.command-pair {
    position: relative;
}

.app-container.main ad {
    display: block;
    overflow: hidden;
}

.app-container.main ad .subtitle {
    font-size: 10px;
    text-align: right;
}

.app-container.main ad iframe {
    width: 100%;
    border: 0;
}

.command-pair textarea {
    resize: none;
}

.title.row, .command-pair .row {
    margin-right: 40px;
}

.command-pair .toolbar {
    position: absolute;
    right: 0;
    top: 0;
}

.command-pair .toolbar .btn {
    margin: 0 0 5px 0;
    min-width: 20px;
    display: block;
    font-size: 20px;
    height: 32px;
    line-height: 32px;
    padding: 0 0 0 2px;
    width: 34px;
}

.command-pair .toolbar .dropdown-menu .fa {
    width: 20px;
    text-align: center;
}

.command-pair .toolbar .dropdown-menu img {
    height: 24px;
    margin-left: -13px;
}

.command-pair .toolbar .dropdown-menu .add-text2speech-button img {
    height: 18px;
    margin-left: -1px;
}

.command-pair-value .show-response {
    display: none;
}

.command-pair-value .show-response.checked {
    display: block;
}

.command-pair-value .command-pair-audio {
    display: none;
    padding-left: 2px;
    word-break: break-all;
}

.command-pair-value .command-pair-audio.checked {
    display: block;
}

.command-pair-value .command-pair-audio .tag {
    margin-left: 10px;
}


.command-pair-value .command-pair-audio .remove-button-audio {
    min-width: 14px;
    width: 18px;
    padding: 0 0 0 1px;
    height: 16px;
    line-height: 16px;
    margin: 0 0 3px -16px;
    border: none;
    background-color: #FAFAFA;
    color: #e62700;
}

label input[type="checkbox"] {
    margin-right: 10px;
}

footer {
    z-index: 10;
    height: 75px;
    background-color: rgba(250, 250, 250, .9);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

footer .add-command-holder,  footer .save-button{
    position: fixed;
    transition: all 0.3s;
    bottom: 20px
}

footer .add-command-holder .btn {
    transition: all 0.3s;
}

footer .add-command-holder {
    left: 20px;
    width: 0;
    text-align: center;
}

footer .add-command-holder div {
    display: none;
}

footer .save-button {
    right: 20px;
}

footer .add-command-holder.center {
    left: 0;
    width: 100%;
    bottom: 50%;
    font-size: 18px;
}

footer .add-command-holder.center div {
    display: block;
}

footer .add-command-holder.center .btn {
    height: 50px;
    font-size: 24px;
}

.buttons-group .save-button {
    float: right;
}

.loading-shown {
    display: none;
}

.loading .loading-shown {
    display: block;
}

.loading .loading-hidden {
    display: none;
}

.loading-completed {
    display: none;
}

.loading.completed .loading-shown {
    display: none;
}

.loading.completed .loading-completed {
    display: block;
}

.btn.loading {
    opacity: .7;
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
}

button:focus {
    outline: none;
}

.save-button {
    opacity: 1
}
.save-button.invisible {
    opacity: 0;
    pointer-events: none;
}

.command-pair-key .hint-holder, .command-pair-value .hint-holder {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s;
    margin: 10px
}

.command-pair-value {
    position: relative;;
}

.command-pair-key.active .hint,
.command-pair-key.validation .hint,
.command-pair-value.active .hint,
.command-pair-value.validation .hint {
}

.command-pair-key.validation .hint,
.command-pair-value.validation .hint {
    color: #CA3C3C;
}

.command-pair-key.validation textarea,
.command-pair-value.validation textarea {
    border-color: #CA3C3C;
}

.command-pair-value .devaccess {
    display: none;
    position: absolute;
    top: 1px;
    right: 1px;
    background-color: rgba(241, 241, 241, 0.8);
    padding: 0 6px;
}

.command-pair.devaccessible .command-pair-value .devaccess {
    display: block;
}

.commands-holder .command-pair .toolbar .add-devaccess-button,
.commands-holder .command-pair .toolbar .add-devaccess-button-draft {
    display: none;
}

button[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.commands-holder.has-access-token
.command-pair[data-commandid] .toolbar .add-devaccess-button,
.commands-holder.has-access-token
.command-pair[data-draft] .toolbar .add-devaccess-button-draft {
    display: initial;
}

.commands-holder .command-pair .toolbar .add-audio-button,
.commands-holder .command-pair.has-audio .toolbar .add-audio-button-disabled {
    display: initial;
}

.commands-holder .command-pair.has-audio .toolbar .add-audio-button,
.commands-holder .command-pair .toolbar .add-audio-button-disabled {
    display: none;
}

.hint {
    font-size: 14px;
    line-height: 16px;
    display: block;
    color: #565656;
}

.hint .tag-example {
    white-space: nowrap;
}

.hint .btn {
    min-width: 14px;
    padding: 0;
    margin: 0;
    font-size: 14px;
    height: 16px;
    line-height: 16px;
}



.audio-options input[type="file"] {
    display: none;
}
.audio-options .custom-file-select {
    border: 1px solid #ccc;
    display: inline-block;
    padding: 6px 12px;
    cursor: pointer;
    margin: 5px;
}

.audio-options span {
    line-height: 36px;
}

.btn.record, .btn.play-pause, .btn.reset {
    font-size: 30px;
    line-height: 56px;
    width: 60px;
    min-width: 0;
    border-radius: 50%;
    height: auto;
    max-height: 100px;
    padding: 0;
    margin: 0;
}

 .btn.reset {
    line-height: 26px;
    width: 28px;
    font-size: 24px;
    display: block;
    margin-left: 17px;
    margin-top: 5px;
    padding-left: 2px;
}

.btn.record .fa {
    padding-left: 3px;
}

.btn.record.recording {
    background-color: #e62700;
    border-color: #e62700;
    color: #FFFFFF;
}

.btn.play-pause .fa-play {
    padding-left: 10px;
}

.btn.play-pause .fa-pause {
    padding-left: 5px;
}

.btn.play-pause .play, .btn.play-pause.playing .pause {
    display: inline-block;
}

.btn.play-pause.playing .play, .btn.play-pause .pause {
    display: none;
}

.audio-upload .controls {
    display: none;
}

.audio-upload.audio-loaded .controls, .audio-upload.audio-record .controls {
    display: block;
}

.audio-upload.audio-loaded .controls .btn.record {
    display: none;
}

.audio-upload.audio-record .controls .btn.play-pause, .audio-upload.audio-record .controls .btn.reset {
    display: none;
}

.audio-upload.audio-record .controls .btn.record {
    display: block;
}

.audio-upload.audio-loaded .audio-options,
.audio-upload.link-edit .audio-options,
.audio-upload .waveform-hint,
.audio-upload .link-editor {
    display: none;
}

.audio-upload.audio-loaded .waveform-hint {
    display: block;
}

.audio-upload.link-edit .link-editor {
    display: block;
}

.audio-upload .modal-body .audio-edit {
    padding-right: 30px;
    display: flex;
}

.audio-upload .controls {
    margin-top: 35px;
    margin-right: 10px;
}

.audio-upload .audio-edit-from-mic {
    display: none;
}

.audio-upload.from-mic .audio-edit-from-mic {
    display: block;
}

.waveform-holder {
    border: 1px solid gray;
    position: relative;
    overflow: visible;
    flex: 1;
    display: none;
    margin-bottom: 50px;
}

.audio-upload.audio-loaded .waveform-holder {
    display: block;
}

.waveform-holder .start-label,
.waveform-holder .end-label,
.waveform-holder .progress-label {
    position: absolute;
    bottom: -30px;
    cursor: pointer;
}

.audio-upload.audio-record .waveform-holder .start-label,
.audio-upload.audio-record .waveform-holder .end-label,
.audio-upload.audio-record .waveform-holder .progress-label,
.audio-upload.audio-record .waveform-holder .wavesurfer-region {
    display: none;
}

.waveform-holder .label {
    left: -50%;
    margin: 0;
    position: relative;
    border-radius: 0;
    background-color: #007cbb;
    border: 1px solid #007cbb;
    color: white;
    user-select: none;
    font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New;
}


.waveform-holder .start-label:after,
.waveform-holder .end-label:after,
.waveform-holder .progress-label:after {
    content: "";
    position: absolute;
    top: -6px;
    left: -10px;
    border-width: 0 10px 10px;
    border-color: #007cbb transparent;
    border-style: solid;
    display: block;
    width: 0;
}

.waveform-holder .progress-label:after {
    border-color: #62a420 transparent;
}

.waveform-holder .progress-label .label {
    background-color: #62a420;
    border: 1px solid #62a420;
}
.waveform-holder .progress-label:after {
    border-color: #62a420 transparent;
}

.waveform-holder .wavesurfer-region {
    overflow: hidden;
}

.btn.outline-danger {
    border-color: #e62700;
    color: #e62700;
}

.btn.outline-danger:hover {
    background-color: #ffeaea;
}


.audio-upload.audio-uploaded .audio-edit,
.audio-upload.audio-uploaded .audio-options,
.audio-upload.audio-uploaded .modal-footer .upload-button,
.audio-upload.audio-uploaded .modal-footer .cancel-button,
.audio-upload .modal-footer .ok-button {
    display: none;
}

.audio-upload.audio-uploaded .modal-footer .ok-button {
    display: inline-block;
}

.audio-upload .audio-tag,
.speechcon-select .sample-tag,
.text2speech-select .sample-tag,
.devaccess .sample-tag {
    background-color: #e5f2ff;
}

.devaccess .sample-tag {
    height: 50px;
    resize: none;
    overflow: hidden;
}

.speechcon-select table {
    max-width: 500px;
    margin-top: 20px;
}

.text2speech-select input, .link-editor input {
    width: 100%;
}

.link-editor-examples {
    font-size: 12px;
    line-height: 18px;
}

.text2speech-select .text-contents {
    border: 1px solid #9a9a9a;
    margin-top: 20px;
}

.text2speech-select .text-contents:empty {
    border: none;
    margin-top: 0;
}

.modal {
    transition: all 0.3s;
    opacity: 1;
}

.title.row {
    font-size: 24px;
    margin-bottom: 20px;
}

.image-button img {
    width: 200px;
    cursor: pointer;
}

.command-pair hr, ad hr {
    opacity: 0.5;
    margin-bottom: 30px;
}

.hide {
    display: none;
}

.central-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  animation: fadein 0.4s;
  text-align: center;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.7);
}

.central-loading > .spinner {
    width: 100px;
    height: 100px;
    top: 50%;
    margin-top: -50px;
    position: absolute;
}

.app-container.samples .title.row,
.app-container.samples .command-pair .row {
    margin-right: 0;
}

.app-container.samples .command-pair .row > .hint,
.app-container.samples .samples-title {
    padding-right: 15px;
    padding-left: 15px;
    margin-bottom: 15px;
}
.app-container.samples .command-pair .row > .hint {
    width: 100%;
}

.app-container.samples .command-pair p {
    margin-top: 0;
}

.app-container.samples .command-pair .hint-holder {
    display: none;
}

.ads {
    float: right;
}

.dev-sample {
    padding: 10px;
    background-color: #eee;
}

@keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* md */
@media (max-width: 768px) {
    .title.row {
        display: none;
    }

    .command-pair .row {
        margin-right: 0;
    }

    .command-pair .row > :first-child {
        margin-right: 40px;
    }

    .command-pair .toolbar {
        top: 25px;
    }

    .audio-upload .modal-body .audio-edit {
        display: block;
        padding-left: 30px;
    }

    .audio-upload .modal-body .audio-edit .controls {
        margin-top: 0;
        margin-right: 0;
    }

    .audio-upload .modal-body .audio-edit .controls button {
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }

    header .header-nav.collapse-toggle {
        display: block;
    }

    header .header-nav:not(.collapse-toggle) {
        display: block;
        position: absolute;
        top: -200px;
        left: 0;
        right: 0;
        height: auto;
    }

    header.expanded .header-nav:not(.collapse-toggle) {
        top: 60px;
    }

    header.expanded.smaller:not(:hover) .header-nav:not(.collapse-toggle) {
        top: 40px;
    }

    header .header-nav:not(.collapse-toggle) .nav-link {
        background-color: #455875;
        display: block;
        opacity: 0.90;
    }

    header .header-nav:not(.collapse-toggle) .nav-link:hover {
        opacity: 1;
    }
}

@media (min-width: 768px) {
    .command-pair label.title {
        display: none;
    }
    .command-pair .toolbar {
        display: none;
    }
    .command-pair:hover .toolbar {
        display: block;
    }

    .command-pair .remove-button-audio {
        display: none;
    }

    .command-pair:hover .remove-button-audio {
        display: inline;
    }
}
