.tier-maker-board{
    display:grid;
    gap:16px;
}

.tier-maker-row{
    display:grid;
    grid-template-columns:68px 1fr;
    border:1px solid rgba(255,255,255,.08);
    border-radius:20px;
    overflow:visible;
    background:rgba(255,255,255,.018);
}

.tier-maker-label{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.55rem;
    font-weight:900;
    letter-spacing:.03em;
    color:#111;
    min-height:100%;
    border-radius:20px 0 0 20px;
}

.tier-maker-label-s{background:#ff7f7f;}
.tier-maker-label-a{background:#ffa763;}
.tier-maker-label-b{background:#f6df73;}
.tier-maker-label-c{background:#bfe26b;}
.tier-maker-label-d{background:#73d0ff;}
.tier-maker-label-f{background:#9ca3af;}

.tier-maker-dropzone{
    min-height:100px;
    padding:14px;
    border-left:1px solid rgba(255,255,255,.08);
    border-radius:0 20px 20px 0;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:flex-start;
}

.tier-maker-row[data-tier-row="S"] .tier-maker-dropzone{background:rgba(255,127,127,.06);}
.tier-maker-row[data-tier-row="A"] .tier-maker-dropzone{background:rgba(255,167,99,.05);}
.tier-maker-row[data-tier-row="B"] .tier-maker-dropzone{background:rgba(246,223,115,.05);}
.tier-maker-row[data-tier-row="C"] .tier-maker-dropzone{background:rgba(191,226,107,.05);}
.tier-maker-row[data-tier-row="D"] .tier-maker-dropzone{background:rgba(115,208,255,.05);}
.tier-maker-row[data-tier-row="F"] .tier-maker-dropzone{background:rgba(156,163,175,.05);}

.tier-maker-pool{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.tier-maker-chip{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 10px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.08);
    background:rgba(255,255,255,.03);
    cursor:grab;
    user-select:none;
    -webkit-user-select:none;
    -webkit-touch-callout:none;
    transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}

.tier-maker-chip:hover{
    transform:translateY(-2px);
    border-color:rgba(255,193,7,.35);
    box-shadow:0 10px 18px rgba(0,0,0,.18);
}

.tier-maker-chip.dragging{
    opacity:.45;
}

.tier-maker-chip-img{
    width:36px;
    height:36px;
    object-fit:contain;
}

.tier-maker-chip-name{
    font-size:.95rem;
    font-weight:600;
}

.tier-maker-dropzone.active-dropzone,
.tier-maker-pool.active-dropzone{
    border-color:rgba(255,255,255,.22);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.10);
}

.tier-maker-modal[hidden]{
    display:none !important;
}

.tier-maker-modal{
    position:fixed;
    inset:0;
    z-index:9999;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
}

.tier-maker-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.78);
    backdrop-filter:blur(4px);
}

.tier-maker-modal-dialog{
    position:relative;
    z-index:2;
    width:100%;
    max-width:560px;
}

.tier-maker-modal-dialog .brawler-card{
    border-radius:18px;
    border:1px solid rgba(255,255,255,.10);
    background:#111827;
    box-shadow:0 25px 70px rgba(0,0,0,.45);
    padding:24px !important;
}

.tier-maker-modal-dialog .form-control{
    min-height:48px;
}

#tierListSaveMessage{
    min-height:24px;
}

/* light mode */
body.light-mode .tier-maker-row{
    border-color:#e5e7eb;
    background:#fff;
}

body.light-mode .tier-maker-dropzone{
    border-left-color:#e5e7eb;
}

body.light-mode .tier-maker-row[data-tier-row="S"] .tier-maker-dropzone{background:rgba(255,127,127,.08);}
body.light-mode .tier-maker-row[data-tier-row="A"] .tier-maker-dropzone{background:rgba(255,167,99,.08);}
body.light-mode .tier-maker-row[data-tier-row="B"] .tier-maker-dropzone{background:rgba(246,223,115,.10);}
body.light-mode .tier-maker-row[data-tier-row="C"] .tier-maker-dropzone{background:rgba(191,226,107,.10);}
body.light-mode .tier-maker-row[data-tier-row="D"] .tier-maker-dropzone{background:rgba(115,208,255,.10);}
body.light-mode .tier-maker-row[data-tier-row="F"] .tier-maker-dropzone{background:rgba(156,163,175,.10);}

body.light-mode .tier-maker-chip{
    background:#fff;
    border-color:#e5e7eb;
}

body.light-mode .tier-maker-chip-name{
    color:#111827;
}

body.light-mode .tier-maker-dropzone.active-dropzone,
body.light-mode .tier-maker-pool.active-dropzone{
    border-color:#cbd5e1;
    box-shadow:inset 0 0 0 1px rgba(148,163,184,.18);
}

@media (max-width: 767px){
    .tier-maker-row{
        grid-template-columns:56px 1fr;
    }

    .tier-maker-label{
        font-size:1.2rem;
    }

    .tier-maker-dropzone{
        min-height:76px;
        padding:10px;
    }

    .tier-maker-modal{
        padding:14px;
        align-items:flex-start;
        padding-top:60px;
    }

    .tier-maker-modal-dialog .brawler-card{
        padding:18px !important;
    }
}

@media (max-width:575.98px){
    .tier-maker-row{
        grid-template-columns:50px 1fr;
    }

    .tier-maker-label{
        font-size:1.1rem;
    }

    .tier-maker-chip{
        padding:6px 8px;
        border-radius:10px;
    }

    .tier-maker-chip-img{
        width:30px;
        height:30px;
    }

    .tier-maker-chip-name{
        font-size:.82rem;
    }
}
