:root {
    --text-color: white;
    --accent-color: #de0bcf;
    --primary-color: #1a1a1a;
    --lighter-primary-color: #272727;
    --secondary-color: #4f1d83;
}

body {
    color: var(--text-color);
    background-color: var(--primary-color);
    font-family: Iosevka Web;
    min-height: 100vh;
    margin: 0;
}

.toggleable-section { /* section that can be popped in/out */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none; /* prevent from accidentally clicking while hidden */

    transition: opacity 1s ease, max-height 1s ease;
}

.toggleable-section.active {
    max-height: 150vh; /* can't just set to none if want transition to play */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#start-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;

    h1 {
        color: var(--accent-color);
        font-size: 4.5rem;
        margin: 10px 10px;
    }

    h4 {
        margin: 5px 0px 2rem;
    }
}

.title-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5rem;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
    padding: 5px;
}

#image-form {
    min-height: 5rem;
    width: 20rem;
}

#image-preview {
    max-width: 50vh;
    max-height: 50vh;
    margin: 8px;
}

.reduced-margin {
    margin: 4px;
}

#annotate-form {
    overflow: auto;

    h4 {
        margin: 10px 0px 0px;
    }

    button {
        margin: 10px;
    }
}

.large-button {
    margin: 5px;
    padding: 10px 20px;
}

button, input, select, textarea {
  font: inherit;   
  color: inherit;  
  background: none;
  border: none;
}

.interactive-el {
    background-color: var(--lighter-primary-color); 
    border: 3px solid var(--secondary-color);
    border-radius: 8px;
}

.num-input {
    transition: box-shadow 0.5s ease;
    /* remove stepper arrows */
    appearance: textfield;
    -moz-appearance: textfield; /* for Firefox */
}

/* remove stepper arrows for webkit browsers */
.num-input::-webkit-inner-spin-button,
.num-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.num-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-color);
}

button {
    cursor: pointer;
    transition: background-color 0.7s ease;
}

button:hover {
    background-color: var(--accent-color);
}

#image-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

input[type="file"]::file-selector-button {
    color: var(--text-color);
    background-color: var(--lighter-primary-color); /* Example background color */
    font-family: Iosevka Web;
    border: 3px solid var(--secondary-color);
    border-radius: 8px;
    padding: 8px 20px;
    margin: 0.5rem;
    transition: background-color 0.7s ease;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--accent-color); 
}

.centered-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}

.dot-load-wrapper {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
}

.dot-load-indicator {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
}

.dot-load-indicator span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    opacity: 0.1;
    background: var(--accent-color);
    animation: pulse 1.5s infinite;
}

.dot-load-indicator span:nth-child(2) {
  animation-delay: 0.3s;
}

.dot-load-indicator span:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes pulse {
  0%, 80%, 100% { opacity: 0.1; }
  40% { opacity: 1; }
}

.small-side-pad {
    padding: 0rem 0.75rem;
}

#encoding-progress-view {
    margin: 0px 0px 15px;
}

#token-stream-view {
    margin: 15px 0px;

    h3 {
        margin-top: 0.3em;
        margin-bottom: 0.3em;
    }
}

#stream-output {
    min-height: 25vh;
    border: 4px solid transparent;
    border-radius: 12px;
    padding: 10px;
    background: 
        linear-gradient(var(--lighter-primary-color), var(--lighter-primary-color)) padding-box, 
        linear-gradient(var(--angle), #230f2e, var(--accent-color)) border-box;
    animation: 6s rotate linear infinite;
    display: flex;
    align-items: center;   
}

/* Container containing the actual tokens, each wrapped by a span (so they can be individually animated) which are inline
with other spans. Parent container will center this container */
#output-window {
    min-height: 0.5em;
    display: inline-block; 
    text-align: left;
    white-space: pre-wrap;
}

.space-text {
    line-height: 1.5;
}

@keyframes rotate {
    to {
        --angle: 360deg;
    }
}

@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.slide-in {
    animation: 0.5s forwards slide-in ease;
}

@keyframes slide-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#result-view {
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.simple-box {
    border: 3px solid var(--accent-color);
    border-radius: 8px;
    background-color: var(--lighter-primary-color);
    padding: 0.75rem;
}

#final-images-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 1rem;

    img {
        max-height: 75vh;
        max-width: 75vw;
    }
}
