* { /*Remove default styling*/
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

section, html {
        background-color: grey;
        height: 100%;
}

h1{
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
}

p {
    display: inline; /*Place paragraph tags next to next tag instead of a new line*/
}

form {
    display: grid;
    background-color: lightgreen;
    align-items: center;
    height: 100%;
}

.header{
    background-image: linear-gradient(to bottom, palegreen, brown);
}


/* ---- Signed-in pages (upload, browse) ---- */

body.portal {
    background-color: #f4f6f2;
    min-height: 100%;
}

body.portal p {
    display: block; /*Undo the inline paragraphs used on the login page*/
}

.portal-nav {
    background-image: linear-gradient(to right, palegreen, #b9d7a8);
    padding: 0.6rem 0;
    border-bottom: 2px solid brown;
}

.portal-nav a {
    color: #213b1c;
    text-decoration: none;
    font-weight: 500;
}

.portal-nav a.active,
.portal-nav a:hover {
    text-decoration: underline;
}

.portal-brand {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 1.15rem;
}

.portal-who {
    font-size: 0.9rem;
}

.upload-panel {
    max-width: 720px;
    margin: 0 auto;
}

.upload-panel form {
    gap: 0.8rem;
    padding: 1.2rem;
    border-radius: 8px;
    height: auto;
}

.kind-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.upload-list {
    list-style: none;
    margin-top: 1rem;
}

.upload-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #dde3d8;
    background: white;
}

.upload-list .name {
    font-weight: 500;
    overflow-wrap: anywhere;
}

.upload-list .state {
    margin-left: auto;
    font-size: 0.9rem;
    color: #555;
}

.upload-list .state.pending { color: #8a6d00; }
.upload-list .state.done { color: #1d7a33; }
.upload-list .state.failed { color: #b02a37; }

.upload-list img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

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

.photo-card {
    background: white;
    border: 1px solid #dde3d8;
    border-radius: 8px;
    overflow: hidden;
}

.photo-card img,
.photo-card .no-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #e9ece6;
}

.photo-card .no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    text-transform: capitalize;
}

.photo-card figcaption {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
}

.photo-card figcaption strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.readings-table {
    background: white;
}

.empty {
    color: #666;
}

.upload-summary {
    margin-top: 1rem;
    font-weight: 500;
}
