/* BACK */
/* Used everywhere except in Edit view */

/* --------------------------------------------------------- content 

content 
main layout 
filters 
footer 
grid layout 
.info icon before paragraphs 
icon 
media queries 

/* --------------------------------------------------------- variables */

.scroll {
    overflow: auto;
    height: 100%;
    max-width: 100%;
}

.code, code {
    display: block;
    white-space: nowrap;
    color: var(--code-color) !important;
    background-color: var(--code-background-color);
    padding: 2px;
    font-family: monospace;
    font-size: 15px;
    width: 100%;
    border: none;
    overflow: hidden;
}


/* Display mode links */

h2 a {
    color: var(--outline-background-color);
}

h2 a.selected, h2 a:hover {
    color: var(--text2-color);
}


/* --------------------------------------------------------- main layout */

main section {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: var(--primary-background-color);
    gap: var(--gap, 0);
    flex-wrap: nowrap;
    width: 100%;
    overflow: hidden;
}


/* --------------------------------------------------------- filters */
/* #filter is common to Home and Media */

#filter fieldset {
    padding: 0;
    border: none;
    margin: 0;
}

#filter fieldset[data-default="0"] legend::before {
    content: "~ ";
    display: inline;
    position: absolute;
    width: 1em;
    left: var(--spacing);
    text-indent: 0;
}

#filter fieldset[data-default="0"] legend {
    text-indent: 1em;
    position: relative;
}

#filter legend .help {
    text-indent: 0;
}

#filter input[type="submit"] {
    width: 100%;
}

/* --------------------------------------------------------- footer */

footer {
    background-color: black;
    color: white;
    opacity: 0.4;
}


/* --------------------------------------------------------- grid layout */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    overflow: auto;
}
.grid-item {
    background: var(--primary-background-color);
    padding: var(--double-spacing);
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
}
.grid-item form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
}
.grid-item a {
    text-decoration: underline;
}
.grid-item textarea {
    width: 100%;
}
.grid-item h2 {
    margin: calc(-1 * var(--double-spacing)) calc(-1 * var(--double-spacing))  0 calc(-1 * var(--double-spacing));
}
.grid-item h3 {
    margin: 1.2em 0 0;
    font-size: 1em;
    padding: var(--spacing) 0 var(--half-spacing); 
    border-bottom: 1px solid var(--outline-background-color);
    
}


/* --------------------------------------------------------- .info icon before paragraphs */
p.info {
    line-height: 1.4;
    margin: 1.5em 0 var(--spacing);
}
p.info::before {
    content: "i";
    font-family: 'Courier New', Courier, monospace;
    background: var(--outline-color);
    color: var(--outline-background-color) !important;
    border-radius: 100%;
    position: relative;
    top: -.25em;
    display: inline-flex;
    width: 1.2em;
    height: 1.2em;
    font-size: var(--size-small);
    justify-content: center;
    align-items: center;
    margin-right: 1ch;
}


/* --------------------------------------------------------- icon */

img.icon {
    height: 12px;
}

a:hover img.icon {
    filter: invert(1);
}


/* --------------------------------------------------------- media queries */

@media (max-width: 550px) {
    main {
        flex-direction: column;
        overflow-y: auto;
    }

    main > * {
        width: 100%;
        max-width: inherit !important;
    }

}

@media (pointer: coarse) {
    aside summary {
        padding-bottom: 5px;
        padding-top: 5px;
    }
}
