/*
 * Coding Ireland proprietary interactive activity
 * Copyright (c) 2017-2026 Coding Ireland. All rights reserved.
 *
 * Part of the Coding Ireland online learning platform. Licensed for use only
 * as delivered on the platform. Copying, redistributing, or adapting this
 * file, in whole or in part, for use in any other product or service is not
 * permitted. Ref: CI-maths-picture-sort
 */
/* Sizing is set for four-year-old hands on an IWB: the picture carries the
   meaning, the word rides underneath, and every target is deliberately large. */
.ps-stage { font-family: 'Nunito', system-ui, sans-serif; }

/* ---- The one question --------------------------------------------------- */
.ps-question {
    margin: 0 0 16px;
    padding: 14px 20px;
    background: linear-gradient(180deg, #fff7ed, #ffedd5);
    border: 1px solid #fed7aa;
    border-left: 6px solid #f97316;
    border-radius: 12px;
    font-size: 22px; font-weight: 800; color: #7c2d12;
    text-align: center;
}

/* ---- Hoops -------------------------------------------------------------- */
.ps-bins {
    display: grid; gap: 18px; margin-bottom: 18px;
    grid-template-columns: repeat(var(--ps-bin-count, 2), minmax(0, 1fr));
}
.ps-bin {
    background: #ffffff; border: 1px solid #e2e8f0; border-top: 5px solid #6366f1;
    border-radius: 18px; padding: 14px;
    box-shadow: 0 6px 16px -10px rgba(15, 42, 80, .4);
}
.ps-bin-head {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-bottom: 10px;
}
.ps-bin-emoji { font-size: 34px; line-height: 1; }
.ps-bin-label { font-size: 19px; font-weight: 800; margin: 0; color: #312e81; }

.ps-drop {
    min-height: 150px; border: 3px dashed #cbd5e1; border-radius: 14px; padding: 12px;
    display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start;
    background: #f8fafc;
    transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.ps-drop.ps-over {
    border-style: solid; border-color: #4338ca; background: #eef0ff;
    box-shadow: inset 0 0 0 4px rgba(67, 56, 202, .14);
}

/* ---- Tray --------------------------------------------------------------- */
.ps-tray-wrap { margin-bottom: 12px; }
.ps-tray {
    min-height: 120px; display: flex; flex-wrap: wrap; gap: 12px; padding: 14px;
    background: linear-gradient(180deg, #f1f5f9, #e7eef6);
    border: 2px dashed #cbd5e1; border-radius: 18px;
}

/* ---- Cards -------------------------------------------------------------- */
.ps-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px;
    width: 104px; min-height: 104px; padding: 10px 8px;
    background: linear-gradient(180deg, #ffffff, #f3f7fb);
    border: 2px solid #cbd5e1; border-radius: 18px;
    cursor: grab; user-select: none; touch-action: none;
    box-shadow: 0 2px 8px rgba(15, 42, 80, .14);
    transition: transform .12s ease, box-shadow .12s ease, border-color .14s ease;
}
.ps-card-emoji { font-size: 46px; line-height: 1; }
.ps-card-img { width: 62px; height: 62px; object-fit: contain; }
.ps-card-label {
    font-size: 14px; font-weight: 800; color: #1f2a37; text-align: center;
    line-height: 1.15; overflow-wrap: anywhere;
}
.ps-card:hover { transform: translateY(-2px); box-shadow: 0 10px 18px -6px rgba(15, 42, 80, .35); }
.ps-card:active { cursor: grabbing; }
.ps-card.ps-dragging { opacity: .35; }

/* ---- Display mode ------------------------------------------------------- */
/* The finished sort, for the teacher to talk over. Nothing is draggable. */
body.display-mode .ps-card,
.activity-container.display-mode .ps-card { cursor: default; }
body.display-mode .ps-card:hover,
.activity-container.display-mode .ps-card:hover { transform: none; box-shadow: 0 2px 8px rgba(15, 42, 80, .14); }
body.display-mode .ps-tray-wrap,
.activity-container.display-mode .ps-tray-wrap { display: none; }

@media (max-width: 640px) {
    .ps-bins { grid-template-columns: 1fr; }
    .ps-question { font-size: 19px; }
}
