/*////////////////Glossary Overlay///////////////////*/

.glossary-overlay {
    position: fixed;
    top: 10%;
    bottom: 10%;
    left: 0;
    width: 100%;
    height: auto;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: stretch;
    pointer-events: none;
    transition: background-color 0.6s ease;
    z-index: 60000;
}

.glossary-overlay.active {
    pointer-events: auto;
}

.glossary-overlay.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(6px);
    z-index: -1;
}

.glossary-overlay.active .glossary-content {
    transform: translateX(0);
}

.glossary-content {
    background-color: var(--background);
    border-radius: 0;
    width: 80%;
    min-width: 20rem;
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    color: var(--font);
    transform: translateX(150%);
    transition: transform 0.8s ease;
    box-shadow: 0 0 0.375rem 0 rgb(158, 129, 254);
    border-radius: 20px;
}

.glossary-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    background-color: var(--boxes);
    border-radius: 50%;
    border: 0.1rem solid rgb(50, 50, 50);
    border-bottom: 0.2rem solid rgb(50, 50, 50);
    box-shadow: 0 0.05rem 0.3rem 0 rgb(158, 129, 254);
    transform: translate(0, -3px);
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    font-size: 2rem;
    color: var(--font);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60002;
}

.glossary-close:hover {
    background-color: var(--hover-boxes);
}

.glossary-close:active {
    transform: translate(0, 0);
    border-bottom: 0.125rem solid rgb(50, 50, 50);
}

/*////////////////Category bar///////////////////*/
.category {
    background: var(--bars-gradient);
    padding: 0.5rem 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.category h2 {
    text-align: left;
    padding-left: 1rem;
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 4rem);
}

/*////////////////Boxes///////////////////*/

.glossary-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
}

.glossary-box {
    padding: 3rem 1.5rem 3rem 1.5rem;
    background-color: var(--boxes);
    border-radius: 2rem;
    border: 0.125rem solid rgb(50, 50, 50);
    border-bottom: 0.3125rem solid rgb(50, 50, 50);
    box-shadow: 0 0.0625rem 0.375rem 0 rgb(158, 129, 254);
    transform: translate(0, -3px);
    cursor: pointer;
    font-size: 1.5rem;
    transition: background 0.1s;
    transition-timing-function: linear;
    color: var(--font);
    text-align: center;
}

.glossary-box:hover {
    background-color: var(--hover-boxes);
}

.glossary-box:active {
    transform: translate(0, 0);
    border-bottom: 0.125rem solid rgb(50, 50, 50);
}

/*////////////////Explanation Glossary Overlay///////////////////*/

.explanation-glossary-overlay {
    position: fixed;
    top: 10%;
    bottom: 10%;
    left: 0;
    width: 100%;
    height: auto;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: stretch;
    pointer-events: none;
    transition: background-color 0.6s ease;
    z-index: 59000;
    display: none;
}

.explanation-glossary-overlay.active {
    display: flex;
    pointer-events: auto;
    z-index: 70000;
}

.explanation-glossary-overlay.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.explanation-glossary-overlay.active .explanation-content {
    transform: translateX(0);
}

.explanation-content {
    background-color: var(--background);
    border-radius: 0;
    width: 80%;
    min-width: 20rem;
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    color: var(--font);
    transform: translateX(150%);
    transition: transform 0.8s ease;
    box-shadow: 0 0 0.375rem 0 rgb(158, 129, 254);
    border-radius: 20px;
}

.explanation-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    background-color: var(--boxes);
    border-radius: 50%;
    border: 0.1rem solid rgb(50, 50, 50);
    border-bottom: 0.2rem solid rgb(50, 50, 50);
    box-shadow: 0 0.05rem 0.3rem 0 rgb(158, 129, 254);
    transform: translate(0, -3px);
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    font-size: 2rem;
    color: var(--font);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 70002;
}

.explanation-close:hover {
    background-color: var(--hover-boxes);
}

.explanation-close:active {
    transform: translate(0, 0);
    border-bottom: 0.125rem solid rgb(50, 50, 50);
}

.explanation-box {
    padding: 1.5rem;
    background: var(--bars-gradient);
    border-radius: 2rem;
    border: 0.125rem solid rgb(50, 50, 50);
    border-bottom: 0.3125rem solid rgb(50, 50, 50);
    box-shadow: 0 0.0625rem 0.375rem 0 rgb(158, 129, 254);
    margin: 1.5rem 8rem 1.5rem 8rem;
    padding: 3rem 8rem 0 8rem;
}

.explanation-box h1,
.explanation-box h2,
.explanation-box h3,
.explanation-box h4,
.explanation-box h5,
.explanation-box h6{
    font-family: "SubwayLogo",  sans-serif;
    color: var(--font);
    line-height: 1.6;
    /*max-width: 800px;*/
    margin: 0 auto;
    padding-top:10px;
}

.explanation-box h3,
.explanation-box h4,
.explanation-box h5,
.explanation-box h6{
    letter-spacing: 1px;
}

.explanation-box p {
    font-family: "Garet", sans-serif;
    font-size:  clamp(18px, 2vw,20px);
    color: var(--font);
    line-height: 1.6;
    /*max-width: 800px; <- dadurch p weiter eingerückt als alle anderen Elemente!*/
    margin: 0 auto;
    margin-bottom:20px;
}

/* //////////////// Links Styling///////////////// */

.explanation-box a{
    background: rgba(249, 232, 255, 0.2);
    box-shadow: 0 0 8px rgba(249, 232, 255, 0.2);
    border-radius: 4px;
}

/* //////////////// Bilder in Explanation-Box ///////////////// */

.explanation-box img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* //////////////// Video in Explanation-Box ///////////////// */

.explanation-box video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    min-width: 600px;
}

/* //////////////// iframe in Explanation-Box ///////////////// */

.explanation-box iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    min-width: 800px;
    border: none;
}

/* //////////////// Code-Styling///////////////// */

.explanation-box pre {
    background-color: #f9e8ff;
    border: 0.125rem solid rgb(50, 50, 50);
    border-bottom: 0.3125rem solid rgb(50, 50, 50);
    box-shadow: 0 0.0625rem 0.375rem 0 rgb(158, 129, 254);
    border-radius: 1.5rem;
    padding: 12px;
    overflow-x: auto;
    font-family: Inconsolata, Monaco, Consolas, "Andale Mono", "Courier New", monospace;
    line-height: 1.5;
    margin: 1rem 3rem;
    display: flex;
}

/* Gutter-Container für Zeilennummern */
.explanation-box pre::before {
    content: attr(data-lines);
    display: inline-block;
    width: auto;
    padding: 12px 8px 0px 8px;
    margin: -12px 8px -12px -10px;
    background-color: rgb(240,230,255);
    border-right: 1px solid rgb(178,206,255);
    color: rgb(147, 112, 219);
    font-size: clamp(18px, 2vw, 20px);
    line-height: 1.5;
    text-align: right;
    user-select: none;
    flex-shrink: 0;
}


.explanation-box pre code {
    background-color: transparent;
    border: none;
    padding: 0;
    color: rgb(43, 0, 175);
    flex:1;
}

.explanation-box code {
    background-color: #f9e8ff;
    border: 1px solid black;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: Inconsolata, Monaco, Consolas, "Andale Mono", "Courier New", monospace;
    font-size: clamp(18px, 2vw,20px);
    color: rgb(43, 0, 175);
}
/* //////////////// Listen ///////////////// */

.explanation-box ul,
.explanation-box ol {
    font-family: "Garet", sans-serif;
    font-size:  clamp(18px, 2vw,20px);
    color: var(--font);
    line-height: 1.6;
}

/* //////////////// Table ///////////////// */

.explanation-box table {
    width: 90%;
    margin: 1rem auto;
    border: 0.2rem solid rgb(50, 50, 50);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 0.0625rem 0.375rem 0 rgb(158, 129, 254);
    font-family: "Garet", sans-serif;
    border-spacing: 0;
}

.explanation-box thead {
    background: linear-gradient(180deg, #673d92, #44188d);
}

.explanation-box th {
    color: var(--font);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: clamp(16px, 2vw, 18px);
    border-right: 1px solid rgba(106, 101, 125, 0.3);
}

.explanation-box th:last-child {
    border-right: none;
}

.explanation-box td {
    padding: 0.75rem 1rem;
    font-size: clamp(16px, 2vw, 18px);
    color: var(--font);
    border-right: 1px solid rgba(158, 129, 254, 0.2);
}

.explanation-box td:last-child {
    border-right: none;
}

/* Gestreifte Zeilen */
.explanation-box tbody tr:nth-child(odd) {
    background-color: rgba(249, 232, 255, 0.1);
}

.explanation-box tbody tr:nth-child(even) {
    background-color: rgba(249, 232, 255, 0.05);
}

.explanation-box tbody tr {
    border-bottom: 1px solid rgba(158, 129, 254, 0.1);
}

/* all styling by sophie snow :) */
