/* ---------------- Components ---------------- */


/* -------- General components -------- */


.flex-container {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}


/* -------- Tree components -------- */


.tree li,
.tree ul li {
    margin-left: 15px;
    position: relative;
    padding-left: 5px;
}

.tree li::before,
.tree ul li::before {
    content: " ";
    position: absolute;
    width: 1px;
    background-color: var(--text-color);
    top: 5px;
    bottom: -12px;
    left: -10px;
}

.tree>li:first-child::before {
    top: 12px;
}

.tree li:not(:first-child):last-child::before,
.tree ul li:not(:first-child):last-child::before {
    display: none;
}

.tree li:only-child::before,
.tree ul li:only-child::before {
    display: list-item;
    content: " ";
    position: absolute;
    width: 1px;
    background-color: var(--text-color);
    top: 5px;
    bottom: 7px;
    height: 7px;
    left: -10px;
}

.tree li::after,
.tree ul li::after {
    content: " ";
    position: absolute;
    left: -10px;
    width: 10px;
    height: 1px;
    background-color: var(--text-color);
    top: 12px;
}


/* -------- Form components -------- */


.input-form {
    display: flex;
    padding: 0;
    border: 1px solid var(--highlight-color);
}

.input-form input {
    width: 100%;
    padding: 0.5rem 1rem;
    margin: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    transition-duration: 0.5s;
    background-color: var(--bg-color);
}

.input-form input:hover,
.input-form input:focus {
    background-color: rgba(var(--highlight-color-rgb), 0.15);
}

.input-form button {
    padding: 0.5rem 1rem;
    margin: 0;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    transition-duration: 0.5s;
    color: var(--text-color);
    background-color: rgba(var(--highlight-color-rgb), 0.15);
}

.input-form button:hover,
.input-form button:focus {
    background-color: var(--highlight-color);
    font-weight: bold;
}

.input-form ::placeholder {
    color: var(--text-color);
    opacity: 1;
    /* Firefox */
}

.input-form ::-ms-input-placeholder {
    /* Edge 12 -18 */
    color: var(--text-color);
}


/* -------- Button components --------*/


.button {
    margin: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--highlight-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    transition-duration: 0.5s;
}

.button:hover,
.button:focus {
    background-color: var(--highlight-color);
    font-weight: bold;
}

.button:active {
    transition-duration: 0s;
    background-color: rgba(var(--highlight-color-rgb), 0.15);
}

.hover-button:hover {
    margin: 0.5rem 1rem 1rem 0.5rem;
    box-shadow: 0.5rem 0.5rem 0rem rgba(var(--highlight-color-rgb), 0.3);
}

.copy-button {
    margin: 0;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    background-color: transparent;
    border: 0;
}

.box-button {
    margin: 0;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    background-color: transparent;
    border: 0;
}


/* -------- Label components -------- */


.button-label {
    display: inline-block;
    user-select: none;
    font-size: 13.333px;
}


/* -------- Box components -------- */


.box {
    margin: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--highlight-color);
}

.box-hover {
    transition-duration: 0.5s;
    margin: 0.5rem 1rem 1rem 0.5rem;
}

.box-hover:hover {
    background-color: rgba(var(--highlight-color-rgb), 0.15);
    box-shadow: 0.5rem 0.5rem 0rem rgba(var(--highlight-color-rgb), 0.3);
}

.box-code {
    position: relative;
    padding: 0;
    background-color: rgba(var(--highlight-color-rgb), 0.15);
}

.box-pop {
    margin: 0.5rem 1rem 1rem 0.5rem;
    box-shadow: 0.5rem 0.5rem 0rem rgba(var(--highlight-color-rgb), 0.3);
}

.box-fit {
    width: fit-content;
    height: fit-content;
}

.box-stealth {
    border: 0;
    box-shadow: none;
    background-color: transparent;
}


/* -------- Checkbox components -------- */


.hidden-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}


/* -------- Image components -------- */


.blog-image {
    object-fit: cover;
    object-position: 0 0;
    height: 200px;
    width: 100%;
    overflow: hidden;
}

.article-image {
    object-fit: contain;
    object-position: 0 0;
    height: 100%;
    width: 100%;
}

.photo-grid {
    column-count: 3;
    column-gap: 20px;
}

.photo-grid img {
    width: 100%;
    margin-bottom: 20px;
    display: block;
    break-inside: avoid;
}


/* -------- Modifiers -------- */


fieldset {
    border: 1px solid var(--highlight-color);
    margin: 0.5rem;
    padding: 1rem;
}

legend {
    padding: 0 0.5rem;
    border: 1px solid var(--highlight-color);
}

hr {
    border: 0;
    height: 1px;
    background-color: var(--highlight-color);
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

noscript {
    display: block;
}

p,
a,
code,
pre,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-variant-ligatures: none;
}

/* -------- Custom component modifiers -------- */

.image-background {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/red-cloud.png');
    -webkit-filter: blur(5px);
    -moz-filter: blur(5px);
    -o-filter: blur(5px);
    -ms-filter: blur(5px);
    filter: blur(5px);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    opacity: 0.25;
}


.image-fade {
    position: relative;
    display: block;
}

.image-fade::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(var(--bg-color-rgb), 0) 0%, var(--bg-color) 95%);
    pointer-events: none;
}

.block {
    display: block;
}

.float-end {
    float: inline-end;
}

.float-start {
    float: inline-start;
}

.compact {
    padding: 0;
    margin: 0;
}

.hidden-checkbox:focus-visible~.box>.button-label,
.hidden-checkbox:focus-visible~.content>.box>.button-label {
    outline: 3px solid var(--text-color) !important;
    font-weight: bold !important;
    color: var(--text-color) !important;
    background-color: var(--bg-color) !important;
    transition-duration: 0s !important;
}