:root[data-theme="light"],
:root[data-theme="dark"] {
    --pico-form-element-placeholder-color: color-mix(
        in srgb,
        var(--pico-form-element-color) 30%,
        var(--pico-form-element-background-color)
    );
}

.htmx-indicator {
    display: none;
    align-items: center;
    gap: 0.375rem;
    margin-inline-start: 0.5rem;
    color: var(--pico-muted-color);
}

.htmx-indicator::before {
    content: "";
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--pico-muted-border-color);
    border-top-color: var(--pico-primary);
    border-radius: 50%;
    animation: htmx-indicator-spin 0.6s linear infinite;
}

@keyframes htmx-indicator-spin {
    to {
        transform: rotate(360deg);
    }
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-flex;
}

.fragment-loading {
    min-height: 1.75rem;
}

.fragment {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--pico-border-radius);
    background-color: var(--pico-card-sectioning-background-color);
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: 1rem;
}

.server-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.server-card header h4 {
    margin-block-end: 0.5rem;
}

.server-card dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 0.75rem;
    margin: 0;
}

.server-card dt {
    font-weight: 700;
}

.server-card dd {
    margin: 0;
}

.server-card dd.server-card-modpack-link {
    grid-column: 1 / -1;
}

.server-manage-button {
    flex-shrink: 0;
    margin-block: 0.25rem;
}

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-inline-start: 0.5rem;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--pico-muted-color);
    background-color: var(--pico-card-sectioning-background-color);
    vertical-align: middle;
}

.server-status::before {
    content: "";
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background-color: var(--pico-muted-border-color);
}

.server-status-running::before {
    background-color: #2f9e44;
}

.server-status-starting::before {
    background-color: #1971c2;
}

.server-status-stopping::before {
    background-color: #f0a21c;
}

.server-status-errored::before {
    background-color: #e03131;
}

.server-status-stopped::before {
    background-color: #868e96;
}

.server-status-deletion-pending::before {
    background-color: #e03131;
}

#theme-toggle svg {
    width: 1.125rem;
    height: 1.125rem;
    vertical-align: middle;
}

#theme-toggle .theme-icon {
    display: none;
}

#theme-toggle[data-mode="system"] .theme-icon-system,
#theme-toggle[data-mode="light"] .theme-icon-light,
#theme-toggle[data-mode="dark"] .theme-icon-dark {
    display: inline-block;
}

[data-menu] ul ul {
    padding-inline-start: 1rem;
}

.auth-user-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
}

.auth-user-name {
    font-weight: 700;
}

.profile-message {
    margin-bottom: 0;
    color: var(--pico-primary);
    font-weight: 700;
}

.form-error-message {
    margin-bottom: 0;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--app-error-border);
    border-radius: var(--pico-border-radius);
    background-color: var(--app-error-background);
    color: var(--app-error);
    font-weight: 700;
}

.profile-avatar-image {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    object-fit: cover;
}

.profile-crop {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 1rem;
    cursor: crosshair;
}

.profile-crop img {
    display: block;
    max-width: 100%;
    user-select: none;
}

#profile-crop-selection {
    position: absolute;
    box-sizing: border-box;
    border: 2px solid var(--pico-primary);
    background-color: rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 1rem;
}

.member-card {
    margin: 0;
    text-align: center;
}

.member-card h4 {
    margin: 0.75rem 0 0.25rem;
}

.member-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
}

.member-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--pico-muted-color);
    background-color: var(--pico-card-sectioning-background-color);
}

.member-profiles {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

button.button-danger,
[role="button"].button-danger,
button.button-danger:is(:hover, :active, :focus),
[role="button"].button-danger:is(:hover, :active, :focus) {
    --pico-background-color: var(--app-danger);
    --pico-border-color: var(--app-danger);
    --pico-color: var(--app-danger-inverse);
    --pico-hover-background-color: var(--app-danger-hover);
    --pico-hover-border-color: var(--app-danger-hover);
    --pico-hover-color: var(--app-danger-inverse);
}

.server-type-modpack-field[hidden],
.server-type-cf-slug-field[hidden] {
    display: none;
}
