/*
Copyright (C) 2026 Butterroach

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Display:ital,wght@0,100..900;1,100..900&family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');

details {
    overflow: hidden;
}

details summary {
    cursor: pointer;
}

details[open] summary ~ * {
    animation: smooth-open 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes smooth-open {
    0% {
        opacity: 0;
        max-height: 0;
        filter: blur(5px);
        transform: translateY(-8px);
    }
    100% {
        opacity: 1;
        max-height: 1000px;
        filter: none;
        transform: translateY(0);
    }
}

body {
    background-color: #31363b;
}

p, a, li, details, pre {
    color: #e4e4e4;
}

p, a, li, details {
    font-family: "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

p {
    text-align: center;
}

pre {
    font-family: monospace;
}

h1, h2, h3, h4, h5, h6 {
    color: #fafafa;
    font-family: "Noto Sans Display", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

a:link {
    color: #2084ff;
}

a:visited {
    color: #8e44ad;
}

#maindiv {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.card, .details-content {
    border: 2px solid #4c4e51;
    background-color: #232629;
    border-radius: 4px;
    padding: 2px 15px;
}

.image-card {
    padding: 5px;
}

.image-card > img {
    width: 100%;
    border-radius: 4px;
    display: block;
}

.awesomeleftright > .card {
    width: 50%;
}

.awesomeleftright {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.awesomeleftright > .card:nth-child(odd) {
    align-self: flex-start;
    text-align: right;
}

.awesomeleftright > .card:nth-child(even) {
    align-self: flex-end;
    text-align: left;
}

.awesomeleftright > .card:nth-child(odd) > p {
    text-align: right;
}

.awesomeleftright > .card:nth-child(even) > p {
    text-align: left;
}

.bold {
    color: #fafafa;
    font-weight: bold;
}

.glow-python {
    --glow-color: #3776ab;
    --selection-text-color: #e4e4e4;
    --bold-selection-color: #fafafa;
}

.glow-cpp {
    --glow-color: #fff566;
    --selection-text-color: #121212;
    --bold-selection-color: #000;
}

.glow-typescript {
    --glow-color: #4b53c6;
    --selection-text-color: #e4e4e4;
    --bold-selection-color: #fafafa;
}

.awesomeleftright > .card {
    border-color: var(--glow-color);
    box-shadow: 0 0 15px var(--glow-color);
    transition: 0.15s ease-in-out;
}

.awesomeleftright > .card > p::selection, .awesomeleftright > .card > a::selection {
    background-color: var(--glow-color);
    color: var(--selection-text-color);
}

.awesomeleftright > .card > strong::selection, .awesomeleftright > .card > h2::selection {
    background-color: var(--glow-color);
    color: var(--bold-selection-color);
}

.awesomeleftright > .card:hover {
    box-shadow: 0 0 50px var(--glow-color),
    inset 0 0 10px var(--glow-color);
    background-color: color-mix(in oklab, #232629 95%, var(--glow-color));
    z-index: 99999999999;
}

.awesomeleftright > .card:has(a:hover) {
    background-color: color-mix(in oklab, #232629 75%, var(--glow-color));
}

summary::-webkit-details-marker {
    display: none;
}

summary::marker {
    content: "";
}

summary {
    display: flex;
    justify-content: center;
    cursor: pointer;
    gap: 0.5em;
    width: 100%;
}

summary::before {
    content: ">";
    display: inline-block;
    transition: transform .2s ease;
}

details[open] summary::before {
    transform: rotate(90deg);
}

footer {
    border-top: solid 2px #4c4e51;
    width: 100%;
    margin-top: 20px;
    padding-top: 20px;
}

pre {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.logo-link {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.red {
    color: #da4453;
}

.icon-text-combo, .horizontal-paragraph-list {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 100%;
}
