/* ===========================================
                MOBILE
=========================================== */

@media (max-width: 900px) {

    /* ---------- Header ---------- */

    #team-header{
        flex-direction:column;
        align-items:center;
        gap:15px;
        padding:15px;
    }

    #team-name{
        order:-1;
        font-size:2rem;
    }

    .header-left,
    .header-actions{
        width:100%;
        justify-content:center;
        display:flex;
        gap:10px;
        flex-wrap:wrap;
    }


    /* ---------- Main Layout ---------- */

    #page-layout{
        display:flex;
        flex-direction:column;
        gap:30px;
    }

    #divider{
        display:none;
    }

    #left-section,
    #right-section{
        width:100%;
        margin:0;
    }


    /* ---------- Main Team ---------- */

    #team-container{
        width:fit-content;
        max-width:100%;
        margin:30px auto;
        --mobile-core-slot:clamp(58px, 21vw, 90px);
        --mobile-core-gap:clamp(30px, 8vw, 40px);
        --mobile-sub-slot:clamp(50px, 15vw, 60px);
        --mobile-sub-gap:clamp(10px, 3.5vw, 24px);
        padding:20px;
    }

    #core-slots {
        grid-template-columns:repeat(3,var(--mobile-core-slot));
        gap:var(--mobile-core-gap);
    }

    #core-slots > .slot-wrapper:not(.sub-slot-wrapper) {
        width:var(--mobile-core-slot);
        height:var(--mobile-core-slot);
    }

    #core-slots .ll-icon {
        top:-5px;
        left:50%;
        width:calc(var(--mobile-core-slot) * 1.15);
        height:4px;
    }

    #core-bench-container {
        grid-template-columns:repeat(3,var(--mobile-core-slot));
        column-gap:var(--mobile-core-gap);
        margin:0 auto 12px;
    }

    #core-label {
        margin-top: 8px;
    }

    .core-bench-column {
        grid-template-columns: repeat(3, 28px);
        gap: 8px 5px;
        width:94px;
    }

    .core-bench-slot-wrapper {
        width: 28px;
        height: 28px;
    }

    .core-b-slot {
        width: 28px;
        height: 28px;
    }

    .core-bench-slot-wrapper .zenkai-icon {
        top:-5px;
        left:-5px;
        width:22px;
    }

    #sub-container {
        grid-template-columns:repeat(4,var(--mobile-sub-slot));
        column-gap:var(--mobile-sub-gap);
        row-gap:16px;
        margin: 0 auto 20px;
    }

    .sub-slot-wrapper {
        width:var(--mobile-sub-slot);
        height:var(--mobile-sub-slot);
    }

    .sub-slot-wrapper .slot {
        width:80%;
        height:80%;
        margin:10% auto;
    }

    .sub-slot-wrapper .rarity-icon {
        left:-10%;
        width:40%;
    }

    .sub-slot-wrapper .color-icon.primary {
        right:-10%;
        width:40%;
    }

    .sub-slot-wrapper .color-icon.secondary {
        right:-10%;
        width:20%;
    }

    .sub-slot-wrapper .ll-icon {
        top:-1px;
        left:65%;
        width:100%;
        height:5px;
    }

    .team-section-label {
        margin-top: 20px;
        font-size: 1.2rem;
    }


    /* ---------- Benches ---------- */

    #bench-label{
        text-align:center;
    }

    #bench-container{

        grid-template-columns:repeat(5,50px);

        justify-content:center;

        column-gap:18px;
        row-gap:20px;
    }


    /* ---------- Notes ---------- */

    #notes-section{
        padding:0 15px;
    }

    #team-notes{
        width:100%;
        box-sizing:border-box;
    }


    /* ---------- Choice Section ---------- */

    #right-section{
        margin-top:0;
        padding:0 10px;
    }

    

    #choice-header{
        display:none;
    }

    .choice-row{

        display:grid;

        grid-template-columns:35px repeat(5,55px);

        justify-content:center;

        align-items:center;

        column-gap:8px;

        margin-bottom:20px;
    }

    .choice-color{
        width:30px;
        justify-self:center;
    }

    /* Merge both groups into one row */
    .choice-group{
        display:contents;
    }

    .choice-character{
        width:55px;
        height:55px;
    }

    .choice-character .zenkai-icon{
        width:35px;
        top:-6px;
        left:-10px;
    }

    .choice-character .ll-icon{
        width:75px;
        top:-8px;
    }


    /* ---------- Character Picker ---------- */

    #character-picker{

        left:5%;
        right:5%;

        width:auto;

        grid-template-columns:repeat(4,1fr);

        max-height:60vh;
    }


    /* ---------- Dropdown ---------- */

    #tag-dropdown-menu{
        left:50%;
        transform:translateX(-50%);
    }

}