:root
{
    color-scheme: dark;
    font-family: sans-serif;
}

fieldset
{
    font-size:12pt;
    font-weight: normal;
    margin-top:20px;
    margin-bottom: 50px;
    border: 0;
    padding: 0;
}

legend
{
    font-size:14pt;
    font-weight: bold;
}

label
{
    display: block;
    margin-top:10pt;
}

input[type=text],
input[type=search],
input[type=email]
{
    width: 400px;
    padding: 5px;
    font-size: 14pt;
}

button
{
    all: unset;
    padding: 5px 10px;
    font-size: 14pt;
    background-color:#222;
    border: 1px solid #888;
    border-radius: 5px;
    box-shadow: none;

    &:focus-visible
    {
        border-color: white;
    }

    &:hover
    {
        background-color: #444;
    }
    &:active
    {
        background-color: black;
    }
}

a
{
    color: white;
    text-decoration: none;
}
a:visited
{
    color: white;
}
a:hover
{
    text-decoration: underline;
}

header
{
    position: fixed;
    width: calc(100% - 40px);
    left: 0;
    top: 0;
    display: flex;
    margin: 0;
    align-items: center;
    padding:20px;
    border-bottom: 1px solid #404040;
    background: rgba(0,0,0,0.75);
    .title
    {
        font-size: 18pt;
        font-weight: bold;
        flex-grow: 1;
        a
        {
            color:white;
            text-decoration: none;
        }
    }
    nav
    {
        a 
        {
            color: white; 
            text-decoration: none;
            padding: 5px 10px;
            border-radius: 5px;
        }
        a:hover
        {
            background-color: #444;
            text-decoration: none;
        }
    }
}

.status
{
    text-align:center;
    margin-bottom: 20px;
}

a.groupitem
{
    display: block;
    margin: 0 auto;
    max-width: 600px;
    text-decoration: none;
}

.grouprow
{
    display: flex;
    font-size: 14pt;
    color: white;

    padding: 10px;
    border: 1px solid silver;
    border-radius: 10px;
    margin-bottom: 10px;

    &:hover
    {
        background-color: #222;
    }

    :nth-child(1)
    {
        flex-grow: 1;
    }

    :nth-child(2),
    :nth-child(3)
    {
        width: 140px;
    }
}

.grouprow.complete
{
    border-color: lime;
    &:hover
    {
        background-color:rgba(0,255,0,0.25);
    }
}


main
{
    max-width: 1024px;
    margin: 0 auto;
    padding-top: 80px;
    padding-bottom: 80px;
}

.photo
{
    margin: 0 auto;
    text-align: center;
    padding-top: 70px;

    img
    {
        max-width: 900px;
        max-height: 600px;
        margin: 10px auto;
    }

    .comment-area
    {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;

        div.file-index
        {
            width: 100px;
            font-size: 14pt;
        }

        div.buttons-busy
        {
            width: 100px;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        div.busy
        {
            display:none;
        }

        div.buttons
        {
            display: none;
        }

        button
        {
            padding: 5px;
            font-size: 14pt;
            width: 100%;
            margin-bottom:3px;
        }

        textarea
        {
            width: 600px;
            max-width: 100%;
            height: 80px;
            font-size: 14pt;
            font-family: sans-serif;
            padding: 10px;
            text-align: center;
        }

        button.delete::before
        {
            content: "Delete"
        }

    }

    .comment-area.editing
    {
        div.normal
        {
            display: none;
        }
        div.buttons
        {
            display: block;
        }
    }

    .comment-area.editing.saving
    {
        div.normal
        {
            display: none;
        }
        div.buttons
        {
            display: none;
        }
    }

    .comment-area.saving
    {
        div.busy
        {
            display: block;
        }
    }
}

.photo.deleted
{
    display: flex;
    justify-content: center;
    width: 100%;
    img
    {
        width: 100px;
        height: 100px;
        object-fit: contain;
    }
    textarea
    {
        display: none;
    }
    div.file-index
    {
        width: unset;
        margin-left: 20px;
        &::after
        {
            content: " - Photo marked deleted.";
        }
    }

    button.delete
    {
        &::before
        {
            content: "Restore"
        }
    }
}

footer
{
    text-align: center;
    margin: 50px 0;
}

hr
{
    border-color: #404040;
    margin: 30px 100px 0px 100px;
}

table.comments
{
    td
    {
        vertical-align: top;
        padding: 5px;
    }
    td:nth-child(1)
    {
        padding-right: 20px;
        width: 150px;
    }
}

.spinner 
{
    width: 48px;
    height: 48px;
    border: 5px solid #666;
    border-bottom-color: orange;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.spinner.small
{
    width: 24px;
    height: 24px;
    border-width: 2px;
}

@keyframes rotation 
{
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
} 

.filter-area
{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    .spinner
    {
        visibility: hidden;
    }
}

.filter-area.busy
{
    .spinner
    {
        visibility: visible;
    }
}