
p.server-id {
    display: inline-block;
}

span[name=server-name] {
    font-weight: bold;
}

@keyframes publishing-spin {
    100% {
        transform: rotateZ(360deg);
    }
}

@property --border-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.privacy-block {
    p {
        margin: .5rem;
    }

    ul {
        margin: 0;

        li {
            margin: 0;
            padding: 0;
        }
    }
}

.advisory-small {
    color: var(--text-color-medium);
    font-size: small;
    margin: .5rem;
}

div.fieldWrapper {
    form {
        width: 100%;
    }

    dl {
        /* width: 100%; */
        margin-bottom: .5rem;
        grid-template-columns: 1fr 3fr;
        gap: .25rem;

        dt, dd {
            font-weight: normal;
        }

        dt {
            position: relative;
            display: grid;
            grid-auto-flow: column;
            align-content: center;
            justify-content: space-between;
            align-items: center;
        }

        dd {
            position: relative;
            display: flex;
            grid-auto-flow: row dense;
            grid-template-columns: 1fr 1fr 1fr 3ch;
            align-items: center;
            gap: .25rem;
            border-radius: 0.25rem;
            box-sizing: border-box;
            flex-wrap: wrap;

            .autopublish {
                display: block;
                position: absolute;
                width: 1rem;
                height: 1rem;
                top: 0;
                left: -1.5rem;
                box-sizing: border-box;
                border-radius: 50%;
                border-width: 6px;
                border-style: solid;
                border-color: rgb(0% 0% 0% / 0);
                opacity: 0;
                transition: opacity .5s ease-out, border-color .5s ease-out;
            }

            .autopublish.active {
                animation: publishing-spin .5s linear infinite;
                opacity: 1;
            }

            .autopublish.saving {
                border-color: rgb(0% 70% 90% / 1);
                border-style: dotted;
            }

            input[name^="profile-phonenumber"] {
                flex: 1;
                min-width: 120px;
            }

            .phone-verification-controls,
            .email-verification-controls {
                display: grid;
                grid-template-columns: 6ch 1fr 6ch;
                gap: 0.5rem;
                align-items: center;
                justify-items: center;

                button {
                    white-space: nowrap;
                    font-size: small;
                    /* padding: 0.25rem 0.5rem; */
                    position: relative;
                    max-width: unset;
                    width: 9ch;
                }

                input.pin-input {
                    width: 80px;
                    text-align: center;
                    font-size: small;
                }

                &.hidden {
                    display: none;
                }
            }

            .delete-phone-number,
            .delete-email-address {
                flex-shrink: 0;
                display: grid;
                place-content: center;
                width: 2.5ch;
                padding: 0;
                margin: 0;
                position: relative;
                max-height: 3.25ch;
                min-height: 3ch;

                &.delete-disabled,
                &:disabled {
                    opacity: 0.4;
                    cursor: not-allowed;
                    pointer-events: none;
                }
            }

            input.idp-primary-email {
                background-color: var(--section-fieldset-background-color);
                cursor: not-allowed;
                opacity: 0.8;
            }

            .autopublish.save-success {
                border-color: rgb(0% 80% 0% / 1);
                opacity: 1;
            }

            .autopublish.save-failed {
                border-color: rgb(80% 50% 0% / 1);
                opacity: 1;
            }

            .autopublish.save-rejected {
                border-color: rgb(80% 10% 0% / 1);
                opacity: 1;
            }
        }

        dt {
            .idp-indicator {
                font-size: small;
                font-style: italic;
                color: var(--text-color-dimmed);
                font-weight: normal;
            }
        }

        button {
            position: absolute;
            right: 0;
            bottom: 0;
            height: 4ch;
            line-height: 1.75ch;
            width: 2.5rem;
            max-width: 2rem;
            margin: 0;
        }
    }

    ol {
        margin-bottom: 0;
    }

    li {
        font-size: initial;
        color: inherit;
    }

    label {
        width: unset;
        flex-grow: 1;
        color: unset;
        font-size: unset;
        border-right: unset;
        margin: unset;
    }
}

/* new stuff */
#wrapper > article {
    min-width: unset;
    max-width: 40rem;
    width: 95vw;
    margin-block: 2rem;
    display: grid;
    grid-auto-flow: row;
    justify-content: unset;
    justify-items: center;
    overflow: unset;
}

#wrapper > article > section {
    margin: 2rem 0;
}

#account-avatar {
    aspect-ratio: 1;
    object-fit: cover;
    overflow: hidden;
    width: 96px;
    position: absolute;
    top: -44px;
    right: 1rem;
    z-index: 9;
    border-radius: 1rem;
    border: 1px solid var(--base-background-color-dark);
    box-shadow: 0 0 4px 2px var(--base-background-color-dark);
}

#wrapper .mutable {
    font-weight: bold;
}

#wrapper .idp {
    position: relative;
    display: grid;
    align-content: center;
}

#wrapper .idp > img {
    aspect-ratio: 1;
    display: inline-block;
    width: 1rem;
    height: 1rem;
    right: 0;
    top: 0;
}

#notifications {
    display: none;
}

#permissions {
    display: none;
}

.notification-category {
    display: inline-block;
}

.notification-method {
    display: inline-block;
    border: var(--button-border);
    border-radius: .25rem;
    color: var(--text-color-demure);
}

.notification-method.active {
    color: var(--text-color);
}

#checkup-summary {
    ul {
        display: flex;
        padding-inline-start: 0;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        margin-block-start: 0;

        li {
            display: inline-block;
            flex-grow: 1;
            flex-basis: 20%;
            text-align: center;

            a {
                color: white;
            }

            button {
                display: inline-block;
                font-size: large;
                width: 8rem;
                max-width: unset;
                padding: 1ch;
                background-color: rgb(40% 60% 40% / .5);
                box-shadow: inset -2px -2px 4px 1px rgb(20% 40% 20% / 1);
                text-shadow: 0px 0px 3px black;
            }
        }

        .legend {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
            justify-items: center;
            margin-block-start: 0;
            padding-block-start: 0;

            button {
                font-size: .67rem;
                font-weight: bold;
                width: 4rem;
                padding: 0;
                box-shadow: unset;
            }

            button.pending {
                background-color: rgb(40% 60% 40% / .5);
            }

            button.incomplete {
                background-color: rgb(80% 80% 0% / 1);
                border-color: rgb(70% 70% 0% / 1);
            }

            button.rejected {
                background-color: rgb(60% 30% 0% / 1);
                border-color: rgb(50% 25% 0% / 1);
            }

            button.good {
                background-color: rgb(40% 60% 40% / 1);
            }
        }

        .full-width {
            flex-grow: 2;
            flex-basis: 100%;

            button {
                width: 100%;
            }
        }

        .account-rejected {
            button {
                background-color: rgb(60% 30% 0% / 1);
                box-shadow: inset -2px -2px 4px 1px rgb(50% 20% 0% / 1);
                border-color: rgb(50% 25% 0% / 1);
            }
        }

        .incomplete {
            button {
                background-color: rgb(80% 80% 0% / 1);
                box-shadow: inset -2px -2px 4px 1px rgb(60% 60% 40% / 1);
                border-color: rgb(70% 70% 0% / 1);
            }
        }

        .email-verified,
        .account-approved,
        .complete {
            button {
                background-color: rgb(40% 60% 40% / 1);
            }
        }
    }
}

#quick-view {
    /* duplicated in both account.css and vehicle.css :-( */

    .inform-box {
        margin: 1rem;
        color: unset;
        background-color: unset;
        font-style: unset;
        font-variant-caps: unset;
        padding-inline-start: 0;

        li {
            display: block;
            border: var(--button-border);
        }
    }

    ul.jump {
        display: flex;
        padding-inline-start: 0;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        margin-block-start: 0;

        li {
            display: inline-block;
            text-align: center;

            button {
                display: inline-block;
                font-size: large;
                max-width: unset;
                padding: 1ch;
                background-color: rgb(20% 50% 50% / 1);
                box-shadow: inset -2px -2px 4px 3px rgb(5% 20% 5% / 1);
                text-shadow: 0px 0px 3px black;
            }
        }
    }

    table {
        width: 100%;

        thead {
            th {
                padding: 0;
                font-size: .83rem;
                vertical-align: bottom;
            }

            th:last-of-type {
                width: 3rem;
            }
        }

        tbody {
            .controls {
                display: grid;
                grid-template-rows: 1fr;
                justify-content: center;
                align-content: center;

                button {
                    margin: .25rem 0;
                    padding: .5rem;
                }

                .approve {
                    background-color: rgb(40% 60% 40% / 1);
                }

                .reject {
                    background-color: rgb(60% 30% 0% / 1);
                    box-shadow: inset -2px -2px 4px 1px rgb(50% 20% 0% / 1);
                }
            }
        }
    }
}

article.identity-confirmation {
    div.fieldWrapper {
        dt > button {
            position: unset;
            width: unset;
            max-width: unset;
        }
    }

    .section-header {
        display: grid;
        grid-template-columns: 1fr 3ch;
        justify-content: start;
        align-items: center;
        gap: 0.5rem;
        font-style: italic;
        font-variant-caps: petite-caps;
        margin: .25rem .25rem .5rem .25rem;
        border-radius: .25rem;
        box-shadow: var(--section-title-box-shadow);
        padding: .5rem;
        font-size: large;
        font-weight: 900;
        position: relative;
        background-color: var(--section-title-darker-background-color);
        color: var(--text-color-bright);

        p {
            margin: 0;
        }

        button {
            justify-self: end;
        }
    }
}

input.rejected {
    background: repeating-linear-gradient(-45deg, rgb(50% 0% 0% / .3), rgb(50% 0% 0% / .3) 15px, var(--background-color) 5px, var(--background-color) 20px)
}

.privacy-block-rollup {
    details {
        summary {
            padding-inline-start: 2rem;
        }
    }
}

/* i really need to stop doing generic > generic > generic selectors
 * this really fucks with specificity and cascade
 */
#driver-license .photo-capture {
    display: block;

    >p {
        display: block;
    }
}
