html {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.overflow-auto {
    overflow: auto;
}

.page-header {
    flex: 0 0 auto;
}

/* logs */
.logs {
    flex: 1;
    display: flex;
    overflow: auto;
    box-sizing: border-box;
    height: inherit;
    position: relative;
}

.log {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.log > .logs {
    flex-direction: column;
}

.border-log {
    border-color: #007bff !important;
}

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

.log-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
    overflow-y: scroll;
}

.log-event {
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem;
    overflow: hidden;
}

.log-event:hover,
.log-event:hover:first-child,
.log-event:hover:last-child {
    border-color: rgba(0, 0, 0, 0.375);
}

.log-event-archive {
    border-radius: 0;
    border-bottom: 1px solid transparent;
    border-left-width: 2px;
    border-right-width: 2px;
}

.log-event-archive:not(:first-child) {
    background-color: #f8f9fa;
}

.log-event-archive:first-child {
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    border-top: 2px solid rgba(0,0,0,0.125);
}

.log-event-archive:last-child {
    border-bottom-left-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    border-bottom: 2px solid rgba(0,0,0,0.125);
}

.log-event-header {
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    align-items: center;
}

.event-actions > div:not(:last-child) {
    margin-bottom: 0.25rem;
}

.log-event-footer {
    display: flex;
}

.log-event-header div,
.log-event-footer div {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
}

.log-event-header > div > div:not(:last-child),
.log-event-footer > div > div:not(:last-child) {
    padding-right: 0.2rem;
}

.log-event-header > div:not(:last-child):after,
.log-event-footer > div:not(:last-child):after {
    content: "·";
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

.log-event-text-secondary {
    color: #6c757d;
}

.log-event-text {
    white-space: pre;
    font-family: "Lucida Console", monospace;
    font-size: 11pt;
    overflow-x: auto;
    line-height: 1;
}

.log-event-text-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
}

.log-event-tools {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: absolute;
    top: 1px;
    right: 1px;
    background: rgb(255, 255, 255);
    background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,1) 20%, rgba(255,255,255,1) 100%);
    padding: 0.125rem 0.25rem;
    white-space: nowrap;
}

.log-show {
    transform: scale(1, 1);
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.2s ease-out,
        max-width 0.2s ease-out,
        max-height 0.2s ease-out,
        border 0.2s ease-out,
        padding 0.2s ease-out;
}

.log-hide {
    transform: scale(0, 0);
    max-width: 0;
    max-height: 0;
    border: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    transition: transform 0.2s ease-in,
        max-width 0.2s ease-in,
        max-height 0.2s ease-in,
        border 0.2s ease-in,
        padding 0.2s ease-in;
}

.log-spinner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    flex: 1;
    overflow-y: scroll;
    opacity: 0;
    transition: opacity 1.2s;
}

.log-spinner.show {
    opacity: 1;
    transition: opacity 0.2s;
}

/* monospace input */
.form-control.monospace {
    font-family: 'Lucida Console', monospace;
    font-size: 11pt;
    white-space: pre;
    overflow-x: auto;
    line-height: 1;
    height: 100%;
}

/* overlay */
.overlay {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    background-color: rgba(0, 0, 0, 0.75);
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 500;
    overflow-x: auto;
}

.overlay.show {
    display: flex;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    width: auto;
    height: 56vh;
    min-width: 50vw;
    max-width: calc(100vw - 1rem);
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow-y: auto;
}

.overlay-content-fullpage {
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    max-width: 100vw;
    margin: 0;
    background: #ffffff;
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #dee2e6;
    width: 100%;
    line-height: 1.4;
    font-size: 1.2rem;
}

.overlay-title {
    display: flex;
    align-items: baseline;
    padding-right: 0.5rem;
}

.overlay-close {
    display: flex;
    align-items: flex-start;
}

.overlay-close > div {
    cursor: pointer;
}

.overlay-body {
    display: flex;
    width: 100%;
    flex: 1;
    overflow-y: auto;
}

.overlay-col {
    padding: 0 0.5rem;
    flex: 1 1 100%;
    overflow-y: scroll;
}

.overlay-label {
    font-size: 1.05rem;
    font-weight: 600;
}

.overlay-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse;
    padding: 0.5rem;
    border-top: 1px solid #dee2e6;
    width: 100%;
}
