/* Envelop additions on top of the Paces theme. */

.envelop-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.01em;
    color: var(--bs-primary);
    white-space: nowrap;
}

/* Sign-in page: the form is written as an SMTP AUTH LOGIN exchange.
   Reply colours match the mail log viewer (.envelop-log). */
.envelop-auth {
    --wire-bg: #0d1420;
    --wire-panel: #121b29;
    --wire-rule: #26334a;
    --wire-text: #d5dbe1;
    --wire-dim: #8793a5;
    --wire-ok: #7bd88f;
    --wire-wait: #f0c674;
    --wire-bad: #ff8f8f;
    min-height: 100vh;
    margin: 0;
    padding: 1.5rem;
    display: grid;
    place-items: center;
    background: var(--wire-bg);
    color: var(--wire-text);
}

.envelop-session {
    width: 100%;
    max-width: 29rem;
    background: var(--wire-panel);
    border: 1px solid var(--wire-rule);
    border-radius: 0.5rem;
}

.envelop-session-head {
    padding: 1.5rem 1.75rem 1.25rem;
    border-bottom: 1px solid var(--wire-rule);
}

.envelop-session-brand {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.envelop-session-brand i {
    color: var(--wire-ok);
}

.envelop-session-lead {
    margin: 0.375rem 0 0;
    color: var(--wire-dim);
}

.envelop-wire {
    padding: 1.25rem 1.75rem 1.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--wire-dim);
}

.envelop-wire-line {
    display: grid;
    grid-template-columns: 2ch minmax(0, 1fr);
    column-gap: 1ch;
    align-items: baseline;
}

.envelop-wire-who {
    color: #56637a;
    user-select: none;
}

.envelop-wire-client {
    color: var(--wire-text);
}

.envelop-wire-ok,
.envelop-wire-wait {
    font-weight: 400;
}

.envelop-wire-ok {
    color: var(--wire-ok);
}

.envelop-wire-wait {
    color: var(--wire-wait);
}

.envelop-wire-bad {
    margin: 0.5rem 0;
    color: var(--wire-bad);
}

.envelop-wire-intro {
    margin-bottom: 0.5rem;
}

.envelop-wire-intro .envelop-wire-line {
    animation: envelop-wire-in 0.18s ease-out both;
}

.envelop-wire-intro .envelop-wire-line:nth-child(2) { animation-delay: 0.09s; }
.envelop-wire-intro .envelop-wire-line:nth-child(3) { animation-delay: 0.18s; }
.envelop-wire-intro .envelop-wire-line:nth-child(4) { animation-delay: 0.27s; }
.envelop-wire-intro .envelop-wire-line:nth-child(5) { animation-delay: 0.36s; }

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

@media (prefers-reduced-motion: reduce) {
    .envelop-wire-intro .envelop-wire-line {
        animation: none;
    }
}

.envelop-wire label {
    margin: 0;
    color: var(--wire-text);
}

.envelop-wire-input {
    width: 100%;
    margin-bottom: 0.625rem;
    padding: 0.375rem 0;
    font: inherit;
    color: #fff;
    caret-color: var(--wire-wait);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--wire-rule);
    border-radius: 0;
    outline: 0;
}

.envelop-wire-input:focus {
    border-bottom-color: var(--wire-wait);
    box-shadow: 0 1px 0 var(--wire-wait);
}

.envelop-wire-input:-webkit-autofill {
    -webkit-text-fill-color: #fff;
    box-shadow: 0 0 0 100px var(--wire-panel) inset;
    caret-color: var(--wire-wait);
}

.envelop-wire-input:-webkit-autofill:focus {
    box-shadow: 0 0 0 100px var(--wire-panel) inset, 0 1px 0 var(--wire-wait);
}

.envelop-wire-send {
    margin-top: 0.875rem;
}

.envelop-wire-button {
    justify-self: start;
    padding: 0.5rem 1.25rem;
    font: inherit;
    font-weight: 600;
    color: var(--wire-bg);
    background: var(--wire-ok);
    border: 0;
    border-radius: 0.375rem;
    cursor: pointer;
}

.envelop-wire-button:hover {
    background: #96e3a6;
}

.envelop-wire-button:focus-visible {
    outline: 2px solid var(--wire-text);
    outline-offset: 2px;
}

@media (max-width: 30rem) {
    .envelop-auth {
        padding: 0.75rem;
    }

    .envelop-session-head,
    .envelop-wire {
        padding-left: 1.125rem;
        padding-right: 1.125rem;
    }
}

.envelop-break {
    word-break: break-all;
    white-space: normal;
}

.envelop-dns td {
    vertical-align: top;
}

.envelop-dns td:nth-child(4) {
    min-width: 18rem;
    max-width: 34rem;
}

.envelop-log-filter {
    width: 20rem;
    max-width: 100%;
}

.envelop-log {
    height: calc(100vh - 19rem);
    min-height: 18rem;
    overflow: auto;
    padding: 0.75rem 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    background: #101418;
    color: #d5dbe1;
    border-radius: 0 0 var(--bs-card-inner-border-radius, 0.375rem) var(--bs-card-inner-border-radius, 0.375rem);
}

.envelop-log .l-sent {
    color: #7bd88f;
}

.envelop-log .l-deferred {
    color: #f0c674;
}

.envelop-log .l-bad {
    color: #ff8f8f;
}

.envelop-log .l-hidden {
    display: none;
}

/* Bootstrap's display utilities use !important and would otherwise show
   an element that carries the hidden attribute. */
[hidden] {
    display: none !important;
}
