/* ===================== */
/* BUTTON AREA */
/* ===================== */
.buttons {
    width: 100%;
    margin-top: 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

button {
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;

    font-size: 15px;

    margin: 0;

    /* transition: transform 0.1s ease, box-shadow 0.1s ease; */
}

button:disabled {
    opacity: 0.5;
    pointer-events: none;
}

button:active:not(:disabled) {
    transform: scale(0.96);
}

#gradeButtons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;

    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

#gradeButtons button {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    flex: 1;
    text-align: center;

    padding: 12px 8px;
}

#gradeButtons button:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) inset;
}

#gradeButtons button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.2);
    opacity: 0;
    transition: opacity 0.2s;
}

#gradeButtons button:active::after {
    opacity: 1;
}

#gradeButtons button svg {
    width: 20px;
    height: 20px;

    stroke-width: 2;
    opacity: 0.7;

    flex-shrink: 0;

    transition: all 0.18s ease;
}

#gradeButtons button:hover svg {
    opacity: 1;
    transform: scale(1.05);
}

.btn-show {
    background: #444;
    color: white;

    width: 150px;
    max-width: 90%;
    
    padding: 12px 8px;
    margin: 1px auto;
}

.btn-show:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) inset;
}

.btn-skip {
    background: #444;
    color: white;
    width: 150px;
}

.btn-skip:hover {
    filter: brightness(1.05);
}

.btn-show:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) inset;
}

/* ===================== */
/* SMALL DEVICES */
/* ===================== */
@media (max-width: 600px) {    
    .buttons {
        position: sticky;
        bottom: 0;

        width: 100%;
        padding: 14px 12px;

        backdrop-filter: blur(6px);
        z-index: 10;
    }

    .buttons button {
        height: 60px;
        padding: 0;
        
        font-size: 18px;
        /* font-weight: 500; */
        border-radius: 16px;

        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;

        transition: all 0.10s ease;
    }

    .btn-show {
        width: 85%;
        max-width: 420px;
    }

    .btn-skip {
        width: 85%;
        max-width: 420px;
    }

    #gradeButtons {
        gap: 14px;
        width: 100%;
        max-width: 420px; /* keep consistent with desktop */
        margin: 0 auto;
    }

    #gradeButtons button {
        flex: 1;
        min-width: 0;
    }

    #gradeButtons button svg {
        width: 20px;
        height: 20px;

        opacity: 0.9;
    }
}

/* ===================== */
/* X-SMALL DEVICES */
/* ===================== */
/* @media (max-width: 430px) {
    #gradeButtons button {
        font-size: 13px;
        padding: 12px 4px;
    }
} */

.fail {
    background: #f68275;
    color: rgb(20, 18, 18);
}

.partial {
    background: #e8b665;
    color: rgb(20, 18, 18);
}

.correct {
    background: #84b799;
    color: rgb(20, 18, 18);
}

/* ===================== */
/* ZOOM OVERLAY */
/* ===================== */
.zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;

    z-index: 1000;
}

.zoom-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.zoom-overlay img {
    cursor: pointer;
    max-width: 90%;
    max-height: 90%;
    border-radius: 14px;

    transform: scale(0.9);
    transition: transform 0.25s ease;
}

.zoom-overlay.active img {
    transform: scale(1);
}

.zoom-overlay img.has-bg {
    background: #f8f8f8;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ===================== */
/* DECKS FILTER CHIPS */
/* ===================== */
.chip {
    display: flex;
    align-items: center;
    gap: 4px;

    padding: 8px 14px;

    font-size: 12px;
    /* font-weight: 500; */

    color: rgba(0, 0, 0, 0.65);
    background: rgba(0, 0, 0, 0.05);

    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;

    cursor: pointer;
    transition: all 0.18s ease;
}

/* ICON */
.chip svg {
    width: 16px;
    height: 16px;

    stroke-width: 2;
    opacity: 0.7;

    transition: all 0.18s ease;
}

/* HOVER */
.chip:hover {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.95);
}

.chip:hover svg {
    opacity: 1;
    transform: scale(1.05);
}

.chip.selected {
    background: #e8f0ff;
    color: rgba(0, 0, 0, 0.85);
    border-color: #c7d7ff;

    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.chip.selected svg {
    opacity: 0.9;
}

.chip:active {
    transform: scale(0.96);
}

.chip.selected:active {
    transform: scale(0.97);
}


.chip.disabled {
    cursor: default;
    pointer-events: none;
}

.chip.selected.disabled {
    background: #dbe7ff;
    color: rgba(0, 0, 0, 0.65);
    border-color: #b6ccff;

    /* subtle “locked” feel */
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
}

.chip.selected.disabled svg {
    opacity: 0.9;
}

/* SMALLER CHIPS ON MOBILE */
@media (max-width: 600px) {
    .chip {
        padding: 6px 12px;
    }

    .chip svg {
        width: 15px;
        height: 15px;
    }

    .decks {
        gap: 6px;
    }
}

/* X-SMALLER CHIPS ON MOBILE */
@media (max-width: 325px) {
    .chip {
        padding: 4px 9px;
    }

    .chip svg {
        width: 13px;
        height: 13px;
    }

    .decks {
        gap: 4px;
    }
}

/* ===================== */
/* TOAST */
/* ===================== */
.update-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    width: 350px;
    transform: translateX(-50%);

    background: #222;
    color: white;

    padding: 12px 16px;
    border-radius: 12px;

    display: flex;
    gap: 10px;
    align-items: center;

    box-shadow: 0 8px 25px rgba(0,0,0,0.2);

    z-index: 9999;
}

@media (max-width: 600px) {    
    .update-toast {
        width: 80%;
    }
}

.update-toast button {
    background: #4dabf7;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.update-toast button:last-child {
    background: transparent;
    color: #aaa;
}

.toast-actions {
    display: flex;
    gap: 8px;
    margin-left: auto; /* 🔥 pushes to the far right */
}

/* ===================== */
/* QoL */
/* ===================== */

/* Prevent highlighting in blue */
img, button, div {
    -webkit-tap-highlight-color: transparent;
}

img {
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}