/*
|--------------------------------------------------------------------------
| Virtual Scroll
|--------------------------------------------------------------------------
*/

#vocab-scroll-container {
    position: relative;

    height: 60vh;
    overflow-y: auto;

    scrollbar-width: none;
    overflow-anchor: none;
}

#vocab-scroll-container::-webkit-scrollbar {
    display: none;
}

#vocab-list-spacer {
    position: relative;
}

#vocab-list-content {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 16px;
}


/*
|--------------------------------------------------------------------------
| Vokabelkarte
|--------------------------------------------------------------------------
*/

#vocab-scroll-container .vocab-card {
    width: min(100%, 600px);
    height: auto;

    display: flex;
    flex-direction: column;

    gap: 1rem;

    margin: 0;
    padding: 1rem;

    box-sizing: border-box;
}


/*
|--------------------------------------------------------------------------
| Kopfbereich
|--------------------------------------------------------------------------
*/

.vocab-header {
    padding: 0.5rem;

    text-align: center;
}

.word {
    font-size: clamp(
        2rem,
        6vw,
        3rem
    );

    font-weight: bold;
}


/*
|--------------------------------------------------------------------------
| Hiragana Reveal
|--------------------------------------------------------------------------
*/

.hiragana-reveal {
    position: relative;

    width: min(100%, 220px);
    min-height: 2.25rem;

    margin: 0.25rem auto 0;
}

.hiragana {
    font-size: 1.5rem;
    line-height: 2.25rem;

    filter: blur(6px);
    opacity: 0.7;

    user-select: none;

    transition:
        filter 0.2s ease,
        opacity 0.2s ease;
}

.hiragana-reveal.revealed .hiragana {
    filter: blur(0);
    opacity: 1;

    cursor: text;
    user-select: text;
}

.hiragana-cover {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 0;

    border: none;
    background: transparent;

    color: inherit;

    font: inherit;
    font-weight: 600;

    cursor: pointer;
}

.hiragana-reveal.revealed
.hiragana-cover {
    display: none;
}


/*
|--------------------------------------------------------------------------
| Aufklappbare Bereiche
|--------------------------------------------------------------------------
*/

.vocab-section {
    overflow: hidden;

    border: 2px solid var(--color-dark);
    border-radius: var(--radius-medium);
}


/*
|--------------------------------------------------------------------------
| Details Summary
|--------------------------------------------------------------------------
*/

.vocab-section summary {
    min-height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 1rem;

    box-sizing: border-box;

    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;

    cursor: pointer;
    user-select: none;
    list-style: none;

    transition:
        background-color var(--transition-fast),
        color var(--transition-fast);
}

.vocab-section
summary::-webkit-details-marker {
    display: none;
}

.vocab-section summary:hover {
    background: var(--color-dark);
    color: var(--color-surface);
}

.vocab-section summary:focus-visible {
    outline: 3px solid var(--color-dark);
    outline-offset: -5px;
}


/*
|--------------------------------------------------------------------------
| Details Inhalt
|--------------------------------------------------------------------------
*/

.section-content {
    padding: 1rem 1.25rem;

    border-top:
        1px solid var(--color-dark);

    background:
        var(--color-surface);

    line-height: 1.8;
}

.section-content p {
    margin: 0;
}

.section-content p + p {
    margin-top: 0.9rem;
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 600px) {
    #vocab-scroll-container {
        height: 40vh;
    }
}