body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: AtlasGroteskWeb,"Helvetica","Arial","Source Sans Pro",sans-serif;
    background-color: #fafafa;
    color: #333f48;
}

header {
    display: flex;
    align-items: center;
}

.header-title {
    font-size: 37px;
    font-weight: bold;
    padding: 10px;
    display: flex;
    align-items: self-end;
    padding-top: 25px;
    flex: 1;
}

.header-title .logo {
    max-height: 30px;
    margin-right: 16px;
}

#settings-button {
    margin: 10px;
    font-size: 1.5em;
    vertical-align: middle;
    cursor: pointer;
}

#settings-form {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 0;
    background-color: #fff;
    padding: 32px;
    border-radius: 4px;
    border: 1px solid rgba(51, 63, 72, 0.5);
    box-shadow: 0 3px 15px 0px rgba(0,0,0,0.05);
    z-index: 10;
    height: 550px;
    overflow-y: scroll;
}

#settings-form > * {
    margin: 6px 0;
    padding: 6px;
}

#version {
    flex-grow: 1;
    font-size: 0.75em;
    color: gray;
}

#save {
    width: 68px;
}

.primary-button {
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #FFBE3C;
    background: #FFBE3C;
    color: #333f48;
    text-transform: uppercase;
    box-shadow: 0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12);
    border-radius: 4px;
    padding: 6px 16px;
    cursor: pointer;
    height: 34px;
}

.secondary-button {
    font-weight: 600;
    border: 1px solid rgba(51, 63, 72, 0.5);
    background: transparent;
    color: #333f48;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 6px 16px;
    cursor: pointer;
    height: 34px;
}

.secondary-button-black {
    font-weight: 600;
    border: 1px solid rgba(51, 63, 72, 0.5);
    background-color: #333f48;
    color: #fff;
    text-transform: uppercase;
    box-shadow: 0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12);
    border-radius: 4px;
    padding: 6px 16px;
    cursor: pointer;
    height: 34px;
}

button:disabled {
    background: #e0e0e0;
    color: #333f48;
    box-shadow: none;
    border: 1px solid #e0e0e0;
}

#call-behavior-wrapper {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    box-shadow: 0 3px 15px 0px rgba(0,0,0,0.05);
    border-radius: 4px;
    height: calc(100% - 150px); /* Subtracting header and form bar heights */
    padding: 24px;
    margin: 12px;
}

#main-panel-header {
    display: flex;
    width: 100%;
    padding-bottom: 4px;
}

#main-panel-title {
    font-size: 20px;
    font-weight: bold;
    flex: 1;
}

#loading {
    margin-top: 8px;
    margin-right: 8px;
}

#buttons {
    margin-left: auto;
}

#main-panel {
    display: flex;
    width: 100%;
    height: 100%;
}

#chat-interface {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    justify-content: end;
}

#chat-bubble-area {
    overflow-y: scroll;
}

.chat-bubble {
    background-color: #FFBE3C;
    color: #242525;
    border-radius: 4px;
    padding: 12px 20px;
    margin: 10px;
    max-width: 80%;
    white-space: pre-wrap;
}

.chat-bubble.received {
    background-color: #F2F2F2;
}
.chat-bubble.error {
    background-color: #FFB8B8;
}

.chat-bubble img {
    width: 80%;
    max-width: 500px;
    max-height: 500px;
}

.loading-bubble {
    max-width: 10% !important;
    text-align: center;
    opacity: 1;
    animation: fade 2s infinite;
}

#image-preview {
    max-width: 100px;
    max-height: 100px;
}

#chat-input {
    min-height: 100px;
}

#send {
    width: 68px;
    margin-left: auto;
}

#current-model {
    color: gray;
    font-size: 0.75em;
    display: none;
}

#results {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#results-display {
    flex: 1;
    display: flex;
    max-height: calc(100% - 20px);
}

#editor, #diagram {
    flex: 1;
    background-color: #fff;
}

#results-tabs {
    text-align: center;
}

.mermaid {
    flex: 1;
    cursor: grab;
}

.mermaid svg {
    width: 100%;
    height: 100%;
}

#jsoncrackEmbed {
    width: 100%;
    height: 100%;
    border: none;
}

@keyframes fade {
    0%,100% { opacity: 0 }
    50% { opacity: 1 }
}