/*
    The goal of this file is to:
       #1 - Act as a way of making all web browser's default behavior act consistently.
       #2 - Provide a minimal stable of reusable classes and default stylings for builtin
            Cobalt Engine features.
       #3 - Be as minimal as possible.
*/

html {
    line-height: 1.15;
    /* 1 */
    -webkit-text-size-adjust: 100%;
    /* 2 */
}

body.scroll-locked {
    /* height:100%; */
    overflow: hidden;
}

body {
    margin: 0;
    font-family: var(--project-body-family);
    background: var(--project-body-background);
    color: var(--project-body-color);
}

main {
    display: block;
}

h1:first-of-type {
    margin: 0;
}

h1 {
    font-size: 2em;
    margin: 0.67em 0 0;
}

h1, h2, h3, h4, h5 {
    font-family: var(--project-head-family);
}

hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
    border:none;
    border-top: var(--project-color-table-border)
}

.hbox hr {
    width:100%;
    border: 1px solid inherit;
    --hr-offset: 1ch;
    align-items:center;
}

.hbox hr:first-of-type {
    margin-right: var(--hr-offset);
}

.hbox hr:last-of-type{ 
    margin-left: var(--hr-offset);
}


pre {
    font-family: monospace, monospace;
    font-size: 1em;
}

pre.error--message{
    background-color:#232323;
    color:white;
    padding: 1rem;
    width:50%;
    margin:0 auto;
}

a {
    background-color: transparent;
}

abbr[title] {
    border-bottom: none;
    /* 1 */
    text-decoration: underline;
    /* 2 */
    text-decoration: underline dotted;
    /* 2 */
}

b, strong {
    font-weight: bolder;
}

code, kbd, samp {
    font-family: monospace, monospace;
    font-size: 1em;
}

small {
    font-size: 80%;
}

sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

img {
    border-style: none;
}

button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button, input {
    overflow: visible;
}

button, select {
    text-transform: none;
}

button, [type="button"], [type="reset"], [type="submit"] {
    -webkit-appearance: button;
}

button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

fieldset {
    padding: 0.35em 0.75em 0.625em;
    border: unset;
}

fieldset label {
    display: block;
}

legend {
    box-sizing: border-box;
    color: inherit;
    display: table;
    max-width: 100%;
    padding: 0;
    white-space: normal;
}

progress {
    vertical-align: baseline;
}

textarea {
    overflow: auto;
    resize: vertical;
}

[type="checkbox"], [type="radio"] {
    box-sizing: border-box;
    /* 1 */
    padding: 0;
    /* 2 */
}

[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {
    height: auto;
}

[type="search"] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

details {
    display: block;
}

summary {
    display: list-item;
}

template {
    display: none;
}

[hidden] {
    display: none;
}

table, tr, td {
    border: 1px solid black;
    border-collapse: collapse;
}

.hidden {
    display: none !important;
}

.visually-hidden:not(:focus):not(:active),
.sr-only:not(:focus):not(:active) {
    clip: rect(0 0 0 0); 
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap; 
    width: 1px;
}

/* ==================
     STYLE DEFAULTS
   ================== */
.hbox, .vbox{
    display:flex;
    justify-content: space-between;
}

.hbox {
    align-items:center;
}

:is(.hbox,.vbox)[middle]{
    justify-content: center;
    align-items: center;
}

:is(.hbox,.vbox)[end]{
    justify-content: flex-end;
    align-items: flex-end;
}
.vbox{
    flex-direction: column;
}

.hbox.reverse{
    flex-direction: row-reverse;
}

.vbox.reverse{
    flex-direction: column-reverse;
}

#cookie-consent {
    position: fixed;
    background: var(--project-body-background);
    box-shadow: 0 0 10px rgba(0,0,0,.3);
    bottom: 0;
    right: 0;
    z-index: var(--project-modal-z-index);
    max-width: 30vw;
    padding: 1em;
}

#cookie-consent p:first-of-type {
    margin-top:0;
}

#cookie-consent > .hrow {
    justify-content: right;
}
#cookie-consent button {
    border: none;
}

#cookie-consent a.cookie-consent-false {
    color: gray;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

#cookie-consent .cookie-consent-true {
    cursor: pointer;
}

footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin: 2rem;
}
footer .social-media{
    display: flex;
    justify-content: space-evenly;
}
footer .social-media a{
    font-size:1.4em;
    text-decoration: none;
    color:rgba(0,0,0,.5)
}

footer .social-media a:hover{
    color:#000;
}

.footer-credits {
    width: 100%;
    box-sizing: border-box;
    flex-grow: 1;
    font-size: .8rem;
    text-align: center;
}

.mobile-only {
    display: none;
}

/** SLIDESHOW **/

.slideshow-container {
    position: relative;
    width: 100%;
    height: 50vh;
}

.slideshow-controls {
    position: absolute;
    z-index: 100;
}

.slideshow-item {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center center;
}

.slideshow--inactiveItem {
    display: none;
}

.slideshow--dissolvePreviousItem {
    opacity: 0;
    z-index: 10;
}

.slideshow--beforeQueueItem {
    transition: opacity .5s;
}

.slideshow--queueNextItem {
    visibility: "";
    opacity: 1;
    z-index: 1;
}


/** LIST PANEL **/

.list-panel ul,
ul.list-panel {
    list-style: none;
    padding: 0;
    margin-top: .5rem;
    border: 1px solid var(--project-color-input-border-nofocus);
    border-radius: 4px;
    /* background: var(--project-calendar-cell-other-bg) */
}

#permissions h2 {
    margin-bottom: 0;
}

.list-panel li,
.list-panel h2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.list-panel li {
    padding: 1rem;
}

.list-panel li:nth-of-type(odd) {
    background: var(--project-color-table-bg-even);
}

.list-panel li:first-of-type{
    border-radius: 4px 4px 0 0;
}

.list-panel li:last-of-type{
    border-radius: 0 0 4px 4px;
}

.list-panel li:only-child{
    border-radius: 4px;
}

.list-panel li label {
    width:100%;
    /* font-weight: bold;
    text-transform: uppercase;
    font-size: .8em; */
}

.list-panel li > * {
    box-sizing: border-box;
}

.list-panel input-switch {
    margin: 0 1rem 0 0;
}

.list-panel li small {
    display: block;
    width: 100%;
    color: var(--project-color-user-panel-button);
    font-size: 0.9rem;
}

@media only screen and (max-width: 35em) {
    html, body {
        font-size: 3.5vw;
    }
    #cookie-consent {
        max-width: 100vw;
        max-height: 100vh;
    }
    #cookie-consent > .hbox {
        flex-direction: column;
    }

    #cookie-consent .cookie-consent-false {
        padding: 0 0 2em;
    }

    .mobile-only {
        display: inherit;
    }
}
