body {
    background-color: black;
}

html, body {
    margin: 0;
    padding: 0;
}

/* Center whole table */
table {
    width: 100%;
    height: 100%;
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
}

/* Sytle prompt */
.prompt td {
    color: #ebdbb2;
    vertical-align: bottom;
}

.prompt td.username {
    color: #fabd2f;
}

.prompt td.hostname {
    /* The banner is 44 characters wide; scale it with the viewport so it
       still fits once a real viewport width is honoured on phones. */
    font-size: min(200%, 2.5vw);
    color: #98971a;
}

.prompt td.dir {
    color: #7ba46d;
}

/* Style social media links */
tr.links {
    text-align: center;
}

.links a {
    padding: 1%;
}

/* Style the PGP key dialog */
#pgp-dialog {
    box-sizing: border-box;
    max-width: min(46rem, 92vw);
    padding: 1.5rem;
    border: 1px solid #504945;
    border-radius: 4px;
    background-color: #1d2021;
    color: #ebdbb2;
    font-family: monospace;
}

#pgp-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

#pgp-dialog dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    margin: 0 0 1rem;
}

#pgp-dialog dt {
    color: #fabd2f;
}

#pgp-dialog dd {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    margin: 0;
    min-width: 0;
}

#pgp-dialog dd pre {
    margin: 0;
    color: #98971a;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#pgp-armor-wrap .bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.3rem;
}

#pgp-armor {
    max-height: 40vh;
    margin: 0;
    padding: 0.75rem;
    overflow: auto;
    border: 1px solid #504945;
    background-color: black;
    color: #7ba46d;
    font-size: 0.8rem;
}

#pgp-error:empty {
    display: none;
}

#pgp-error {
    margin: 0 0 1rem;
    color: #fb4934;
}

#pgp-dialog .actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 1rem 0 0;
}

#pgp-dialog button,
#pgp-dialog .actions a {
    padding: 0.35rem 0.9rem;
    border: 1px solid #504945;
    border-radius: 3px;
    background-color: #282828;
    color: #ebdbb2;
    font-family: inherit;
    font-size: inherit;
    text-decoration: none;
    cursor: pointer;
}

#pgp-dialog button:hover,
#pgp-dialog .actions a:hover {
    border-color: #fabd2f;
    color: #fabd2f;
}

#pgp-close {
    float: right;
    margin: -0.5rem -0.5rem 0 1rem;
    padding: 0.1rem 0.5rem;
    line-height: 1;
}

/* The icon sprite defines symbols only and must never take up space.
 * width/height carry the fix on their own: the page's CSP forbids inline
 * style attributes, so display:none has to live here rather than on the tag. */
#icon-sprite {
    display: none;
}

/* Copy buttons */
#pgp-dialog button.copy {
    flex: none;
    padding: 0.2rem;
    border: 1px solid transparent;
    border-radius: 3px;
    background: none;
    color: #928374;
    line-height: 0;
    cursor: pointer;
}

#pgp-dialog button.copy svg {
    width: 1rem;
    height: 1rem;
}

#pgp-dialog button.copy:hover {
    border-color: #504945;
    color: #fabd2f;
}

#pgp-dialog button.copy:has(use[href="#icon-check"]) {
    color: #98971a;
}

#pgp-dialog button.copy.failed {
    color: #fb4934;
}
