/* ========================================
   RPG / CHARACTER SHEET
   ======================================== */

.mechanic-text {
    font-weight: 500;
}

.tiny-text {
    font-size: .75rem;
}

.level-badge {
    position: absolute;
    top: -35px;
    left: -35px;
    font-size: 2.5rem;
    font-weight: 600;
    padding: 1.5rem;
    background-color: var(--portfolio-black);
    color: var(--portfolio-white);
    border-radius: 50%;
    text-align: center;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min-content;
    line-height: 0;
}

.bumper {
    height: 48px;
    width: 100%;
}

.column-image {
    width: 100%;
    padding: 0 48px;
    object-fit: contain;
}

.trait-box {
    padding: 0 1rem 1rem 1rem;
    color: var(--portfolio-black);
    background-color: var(--portfolio-light-gray);
    border: 1px solid var(--portfolio-gray);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
    width: 100%;
    font-size: 14px;

    .trait-name {
        font-size: 1rem;
        font-weight: 600;
        margin-left: -1rem;
        margin-right: -1rem;
        background-color: var(--portfolio-black);
        padding: .5rem 1rem;
        color: var(--portfolio-white);
        .mechanic-text {
            font-weight: 600;
        }
    }

    .badge {
        width: fit-content;
        font-weight: 600;
        padding: .5rem 1rem;
        .mechanic-text {
            font-weight: 600;
        }

        .bg-dark {
            background-color: var(--portfolio-gray);
        }
    }
}

strong .mechanic-text {
    font-weight: 600;
}

/* Full-height rail inside the unlimited section so the links can stick
   while scrolling, then release at the section bottom. */
.rpg-links-rail {
    position: absolute;
    top: 100px;
    bottom: 100px;
    left: 60px;
    z-index: 3;
    width: max-content;
    pointer-events: none;
}

.rpg-links {
    position: sticky;
    top: 134px;
    display: flex;
    gap: .5rem;
    flex-direction: column;
    align-self: flex-start;
    padding-right: 14px;
    pointer-events: auto;

    a {
        display: inline-block;
        width: fit-content;
        transition: opacity 200ms;

        &:hover {
            opacity: 0.5;
        }
    }

    .badge {
        background-color: var(--portfolio-black);
        color: var(--portfolio-white);
        padding: .25rem .5rem;

        .white & {
            background-color: var(--portfolio-white);
            color: var(--portfolio-black);
        }
    }
}

.rpg-links-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--portfolio-black);
    pointer-events: none;
    opacity: 0;

    .white & {
        background-color: var(--portfolio-white);
    }

    &.is-ready {
        opacity: 1;
        transition: top 200ms ease, left 200ms ease, opacity 200ms ease;
    }
}

/* overflow-x: hidden on body creates a scroll container that traps sticky.
   clip keeps horizontal overflow hidden without breaking the side nav. */
body:has(.rpg-links-rail) {
    overflow-x: clip;
}

.rpg-tabs {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;

    .container {
        height: auto;
    }
}

.rpg-tab-list {
    display: flex;
    align-items: stretch;
    gap: .5rem;
}

.rpg-tab {
    appearance: none;
    font-family: 'bebas_neueregular', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 1px;
    line-height: 1;
    padding: .75rem 1.5rem;
    background: transparent;
    color: var(--portfolio-white);
    border: 1px solid var(--portfolio-white);
    border-radius: 4px 4px 0 0;
    cursor: pointer;
}

.rpg-tab.is-active {
    background: var(--portfolio-white);
    color: var(--portfolio-black) !important;
    border-color: var(--portfolio-white);
}

.rpg-panel {
    display: none;
}

.rpg-panel.is-active {
    display: flex;
}

.black-section .section-clip {
    padding-bottom: 56px;
}

.line-container {
        position: relative;
        h4, h5, h6 {
        background-color: var(--portfolio-white);
        z-index: 2;
        position: relative;
        display: inline-block;
        margin: 0;
        padding: 20px 20px 20px 0;

    }

    .gray-bg & {
        h4, h5, h6 {
            background-color: #424242;
        }
    }
}

.line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%; 
    height: 1px;
    background-color: rgb(0 0 0 / 15%);
    transform: translateY(-50%); 
    z-index: 1; 

    .gray-bg & {
        background-color: rgb(255 255 255 / 25%);
    }
}

.empty-list {
    list-style-type: none;
    padding-left: 0;
    margin-left: 0;
}

.empty-list.call-response {
    li {
        margin-bottom: .5rem;
        font-weight: 600;
    }
    li:nth-child(odd) {
        margin-bottom: 0;
        font-weight: 300;
    }
}

.c-sheet {
    background-color: var(--portfolio-near-white);
    border: 1px solid var(--portfolio-light-gray);
    padding: 1rem;
    border-radius: 24px;
}

.c-sheet-box {
    padding: 2rem;
    background-color: var(--portfolio-white);
    border: 1px solid var(--portfolio-light-gray);
    border-radius: 4px;
}

.c-sheet-image {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.stat-line {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(20, 1fr);
    gap: 1.5%;
}

.stat {
    grid-column: span 1;
    aspect-ratio: 1/1;
    /* min-width: 16px;
    min-height: 16px; */
    width: 100%;

    
    &.dot {
        border-radius: 50%;
    }
    
    &.square {
        border-radius: 4px;
    }
    
    &.default {
        background-color: var(--portfolio-medium-gray);
    }
    
    &.filled {
        background-color: var(--portfolio-black);
    }
    
    &.empty {
        border: 2px solid var(--portfolio-gray);
    }
    
    &.unavailable {
        border: 2px solid var(--portfolio-red);
    }
}

.stat-badge {
    font-size: 1.25rem;
    font-weight: 600;
    background-color: var(--portfolio-black);
    color: var(--portfolio-white);
    padding: .75rem;
    border-radius: 50%;
    text-align: center;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min-content;
    line-height: 0;
}

.c-variables {
    column-gap: 12px;
}

/* ========================================
   RPG MEDIA QUERIES
   ======================================== */

@media only screen and (max-width: 992px) {
    .rpg-links-rail {
        left: 5vw;
    }

    .c-sheet {
        padding: .5rem;
        border-radius: 4px;
    }

    .c-sheet-box {
        padding: 1rem;
    }

    .column-image {
        padding: 0;
    }
}

@media only screen and (max-width: 767px) {
    .rpg-links-rail {
        position: fixed;
        top: auto;
        bottom: 24px;
        left: auto;
        right: 24px;
        z-index: 4;
    }

    .rpg-links {
        position: static;
        align-items: end;
        padding-right: 14px;
        padding-left: 0;
    }

    .rpg-tab {
        font-size: 1.25rem;
        padding: .6rem 1rem;
    }

    .c-variables {
        column-gap: 4px
    }

    .c-variables, .c-variables h5 {
        font-size:3.6vw;
        margin-bottom: 0;
        align-self: center;
    }

    .level-badge {
        position: absolute;
        top: -15px;
        left: -15px;
        font-size: 1.5rem;
        padding: .75rem;
    }
}
