/* Molecule cards (direct children of global #structures flex container).
   This page is drag-to-reorder: visual order is carried by flex order,
   written by trend-drag.js — the DOM never re-parents the RDKit SVGs. */
.mol-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 6px 6px 2px;
}

.mol-card.draggable {
    cursor: grab;
    touch-action: none;
}

.mol-card.draggable:focus-visible {
    outline: 3px solid #6153cc;
    outline-offset: 2px;
}

.mol-card.dragging {
    cursor: grabbing;
    z-index: 5;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* Answer key after grading: border color says which slots were right —
   the verdict itself lives on the Check button (feedback-zone morph). */
.mol-card.slot-right { border-color: #28a745; }
.mol-card.slot-wrong { border-color: #dc3545; }

/* Three cards on one row: the canvases are sized down from the pair pages'
   hard 300px (main.css); the SVG render size matches in problem-loader.js. */
.viewer-canvas {
    width: 210px;
    height: 210px;
}

.viewer-wrap {
    position: relative;
}

.slot-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: #555;
    background: #f0eeff;
    border-radius: 10px;
    padding: 1px 10px;
    margin: 0 auto 4px;
    width: fit-content;
}

.value-overlay {
    display: none;
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #c0392b;
    max-width: calc(100% - 16px);
    text-align: center;
    line-height: 1.3;
}

.value-overlay .overlay-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

/* Check Order — the verdict-morphing control (feedback-zone btn-* classes) */
#check-btn {
    padding: 8px 22px;
    border: 2px solid #6153cc;
    border-radius: 20px;
    background: #6153cc;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s;
}

#check-btn:disabled {
    background: #fff;
    border-color: #dee2e6;
    color: #aab2ba;
    cursor: default;
}

/* Explanation zone (feedback-zone.css). */
#explanation-area { --zone-height: 7em; }
