@import url(/static/profile/default.css);

:root {
    --color-alert: #ee0000;
    --color-background-secondary: #eee;
    --color-border: #bbb;
    --color-border-secondary: #ddd;
    --color-success: #080;
    --size-border-radius: 2px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-background-secondary: #333;
        --color-border: #555;
        --color-border-secondary: #333;
        --color-success: #af2;
    }
}

p {
    text-wrap: pretty;
}

.wrapper {
    max-width: 25em;
}

.wrapper.error p {
    text-align: center;
}

h2 {
    font-size: 1.3em;
    font-weight: 500;
}

.link-item.static {
    flex-grow: 1;
    box-shadow: none;
}

.link-item.static:hover {
    transform: none;
}

.alert {
    color: var(--color-alert);
}

.caption {
    font-size: 0.8em;
}

.faded {
    color: var(--color-text-secondary);
}

button,
input {
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--size-border-radius);
    box-sizing: border-box;
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
    padding: 0.5em;
    width: 100%;
}

button,
input[type="submit"] {
    font-weight: 600;
    padding: 0.25em;
}

button.submit:last-of-type,
input[type="submit"]:last-of-type {
    margin-top: 1em;
}

.login .authservers {
    margin-top: 2em;
}

.login .authservers .caption {
    display: block;
    text-align: center;
}

.login .authservers form {
    display: grid;
    gap: 0.25em;
    grid-template-columns: 1fr 1fr;
    margin-top: 0.75em;
}

.login .authservers button {
    font-weight: unset;
}

actor-typeahead {
    --color-hover: var(--color-background-secondary);
    --padding-menu: 2px;
    --radius: var(--size-border-radius);
}

editor-label {
    display: block;
}

editor-label + editor-label {
    margin-top: 0.25em;
}

editor-label .label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

link-editor-item {
    display: block;
    margin-top: 1em;
    margin-left: -0.25em;
    margin-right: -0.25em;
    padding: 0.25em;
    background: var(--color-background);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--size-border-radius);
}

link-editor-header {
    display: flex;
    flex-direction: row;
    gap: 0.25em;
}

link-editor-drag-handle {
    background: var(--color-background-secondary);
    display: flex;
    flex-grow: 0;
    padding: 2px;
    line-height: 100%;
    font-size: 1.5em;
    align-items: center;
    cursor: grab;
}

link-editor-drag-handle:active {
    cursor: grabbing;
}

link-editor-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.25em;
    margin-top: 0.25em;
}

still-building {
    background-color: var(--color-background-secondary);
    border-radius: var(--size-border-radius);
    display: block;
}

still-building .title {
    background: repeating-linear-gradient(
        45deg,
        #fc0,
        #fc0 20px,
        #333 20px,
        #333 40px
    );
    border-radius: var(--size-border-radius) var(--size-border-radius) 0 0;
    color: #fff;
    display: block;
    font-size: 1.2em;
    font-weight: 900;
    padding: 0.25em;
    text-align: center;
    text-transform: uppercase;
    text-shadow:
        -1px -1px 0.5px #000,
        1px -1px 0.5px #000,
        -1px 1px 0.5px #000,
        1px 1px 0.5px #000;
}

still-building p {
    margin: 0;
    padding: 0.5em;

    &:not(:first-of-type) {
        padding-top: 0;
    }
}

.htmx-indicator {
    --height: 2px;
    height: var(--height);
    margin: 2px 0;
    opacity: 0;
    visibility: none;
}

.htmx-request .progress {
    animation: progress-bar 0.5s linear;
    animation-fill-mode: both;
    background: var(--color-success);
    border-radius: calc(var(--height) / 2);
    display: block;
    height: var(--height);
}

@keyframes progress-bar {
    0% {
        width: 25%;
    }
    100% {
        width: 100%;
    }
}

form[hx-post] {
    transition: opacity 0.2s;
}

form[hx-post].htmx-request {
    opacity: 0.6;
}
