/* Toolbar */
.toolbar {
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    background: #3331;
    transition: background 0.3s ease;
}

#top-toolbar {
    position: absolute;
    top: 10px;
    left: 10px;
}

#right-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;

    display: inline-block;
}

#anim-control {
    display: inline-block;
}

#pane-toolbar {
    position: absolute;
    top: 10px;
    left: 200px;
}

#text-anim-count {
    padding: 25px;
    font-family: monospace;
    font-size: 28px;
    color: gray;
}

#node-info-box {
    position: absolute;
    top: 100px;
    right: 25px;
    display: none;
}

#node-info-text {
    overflow: scroll;
    max-height: 600px;
    max-width: 1200px;
    padding: 48px;
}

#dark-theme-button {
    color: #fff;
}

.toolbar select,
.toolbar button,
.toolbar label {
    font-size: 14px;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    outline: none;
    transition:
        background 0.3s ease,
        color 0.3s ease;
}

#morphbase-toolbar,
#search-toolbar {
    position: absolute;
    top: 0;
}

.reload {
    font-family: Lucida Sans Unicode;
}

body.light textarea {
    background-color: #8883;
}

body.dark textarea {
    background-color: #3333;
    color: #9f9;
}

.toolbar select {
    background-color: #444;
    color: #fff;
}

#themeToggle {
    background: #333;
}

body.dark {
    color: whitesmoke;
}

#morph-input {
    display: inline-block;
}
.suggestions {
    display: inline;
    font-size: 16px;
    padding: 10px;
}
.examples {
    list-style: none;
    display: inline;
}
.examples li {
    display: inline;
}

/* Slider */

.slidecontainer {
    width: 100%; /* Width of the outside container */
}

/* The slider itself */
.slider {
    -webkit-appearance: none; /* Override default CSS styles */
    appearance: none;
    width: 100%; /* Full-width */
    height: 25px; /* Specified height */
    background: #d3d3d3; /* Grey background */
    outline: none; /* Remove outline */
    opacity: 0.7; /* Set transparency (for mouse-over effects on hover) */
    -webkit-transition: 0.2s; /* 0.2 seconds transition on hover */
    transition: opacity 0.2s;
}

/* Mouse-over effects */
.slider:hover {
    opacity: 1; /* Fully shown on mouse-over */
}

/* The slider handle (use -webkit- (Chrome, Opera, Safari, Edge) and -moz- (Firefox) to override default look) */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none; /* Override default look */
    appearance: none;
    width: 25px; /* Set a specific slider handle width */
    height: 25px; /* Slider handle height */
    background: #04aa6d; /* Green background */
    cursor: pointer; /* Cursor on hover */
}

.slider::-moz-range-thumb {
    width: 25px; /* Set a specific slider handle width */
    height: 25px; /* Slider handle height */
    background: #04aa6d; /* Green background */
    cursor: pointer; /* Cursor on hover */
}

form {
    display: block;
    position: relative;
}

form textarea {
    display: inline;
}

button.custom-submit-button {
    background-color: #4caf50;
    color: white;
    padding: 12px 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;

    font-size: 48px;
    display: inline;

    position: absolute;
    top: 50%;
    right: 22px;

    margin-top: -60px;
}

button.custom-submit-button:hover {
    background-color: #3e8e41;
}

#right-toolbar button {
    background-color: grey;
    font-size: 28px;
}
#right-toolbar button.clicked {
    background-color: lightblue;
    color: #000;
}
#right-toolbar button:hover {
    background-color: lightslategray;
    transition: 100ms;
}
#right-toolbar button.clicked:hover {
    background-color: lightsteelblue;
    transition: 100ms;
}

button {
    background-color: goldenrod;
    color: white;
}

button:hover {
    background-color: darkgoldenrod;
    cursor: pointer; /* Cursor on hover */
}

.suggestions button {
    padding: 3px 15px 3px 15px;
    background-color: #5d9bc5;
    border-radius: 15px;
}

.suggestions button:hover {
    background-color: #056db2;
    transition: 100ms;
}

.loader {
    display: inline-block;
    border: 8px solid #888;
    border-top: 8px solid #bbb;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    -webkit-animation: spin 2s linear infinite; /* Safari */
    animation: spin 2s linear infinite;
    margin: -8px 15px;
}
@-webkit-keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader::before,
.loader::after {
    content: "";
    position: absolute;
    top: -8px;
    left: -10px;
}

.checkmark {
    font-size: 24px;
    color: #2ecc71; /* Green */
    display: inline;
}

.aborted {
    color: #e74c3c; /* Red */
    display: inline;
}

#morphdecl {
    display: inline-block;
}

#code-gen {
    display: block;
    float: right;
}

#text-search-result {
    display: inline-block;
    margin: auto;
}
#text-search-result button {
    background-color: #555;
}
#text-search-result button:hover {
    background-color: #777;
}

body.light #text-search-result {
    color: #333;
}
body.dark #text-search-result {
    color: #eee;
}

body.light .suggestions,
body.light .suggestion {
    font-style: italic;
    color: #888;
}
body.dark .suggestions,
body.dark .suggestion {
    font-style: italic;
    color: #bbb;
}

#code-gen span,
#code-gen form {
    display: block;
    width: 100px;
}

#result-bar {
    display: block;
    padding: 5px;
    margin-top: 20px;
}

div.greyed-out {
    opacity: 0.5;
}
