@import url("./theme.css");

#page-icon {
    background-color: var(--theme-color-transparent);
    color: var(--theme-color, ButtonFace);
    font-weight: bold;
    font-size: 2em;
    padding: 0 0.5ch;
    border-radius: 0.2em;
    margin-right: 0.5ch;
    text-decoration: none;
}

#page-title {
    font-size: 1.2em;
    user-select: none;
    white-space: nowrap;
    flex: 0 1 auto;
}

.flex-space {
    flex: 1 1;
}

html, body {
    width: 100svw;
    height: 100svh;
    margin: 0;
    padding: 0;
    overflow: auto;
    box-sizing: border-box;
    font-family: sans-serif;
}

body {
    display: grid;
    grid-template-areas: 'header' 'main' 'footer';
    grid-template-rows: auto 1fr;
    background-color: #0c0c0c;
}

header {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    background-color: black;
    color: var(--theme-color, ButtonFace);
    padding: 1ch 2ch;
    position: sticky;
    top: 0;
    user-select: none;
    font-size: 1rem;
}

main {
    overflow: hidden auto;
    scrollbar-gutter: stable;
    grid-area: main;
}

footer {
    grid-area: footer;
    background-color: var(--theme-color);
}

article {
    min-width: min-content;
    max-width: min(max(800px, 50vw), 100vw);
    /* max-width: 800px; */
    padding: 2ch;
    justify-self: center;
    box-sizing: border-box;
    display: flex;
    background-color: #00000010;
    flex-wrap: wrap;
    border-radius: 1ch;
    box-shadow: 0px 0px 6px 0px #0000003b;
    flex-direction: row;
    gap: 1ch;
}

svg {
    display: inline-block;
    height: 1em;
    vertical-align: middle;
    fill: currentColor;
}

.image {
    cursor: zoom-in;
    width: 33%;
    min-width: 256px;
    /*max-width: 512px;*/
}

.image img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

#image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100svw;
    height: 100svh;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    overflow: hidden;
}

#image-overlay-img {
    margin: 2rem;
    max-height: 100svmin;
    max-width: 100svmin;
    object-fit: contain;
    box-sizing: border-box;
    cursor: unset;
}

#image-overlay[visible] {
    display: flex;
    flex-direction: row;
    align-content: center;
    justify-content: center;
    flex-wrap: nowrap;
}

#image-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

#image-overlay-controls {
    position: absolute;
    margin: 0.5em;
    right: 0;
    top: 0;
}

#image-overlay-controls button {
    background-color: var(--theme-color-transparent);
    color: var(--theme-color);
    border: none;
    padding: 0.2em 0.5em;
    border-radius: 0.2em;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
}
