/* Basic Exam Styles */
body.exam-page {
    background-color: var(--color-primary, #f8fafc);
    font-family: 'Outfit', sans-serif;
}

/* DRAG AND DROP STYLES (NEW) */
.draggable-source-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0;
    padding: 0.6rem 1rem;
    background: #f1f5f9;
    border-radius: 12px;
    min-height: 60px;
    /* Ensure drop target size */
}

/* The Draggable Numbers (1, 2, 3) */
.draggable-number {
    width: 50px;
    height: 50px;
    min-width: 50px;
    /* Prevent squishing */
    min-height: 50px;
    aspect-ratio: 1 / 1;
    /* Force circle */

    background: white;
    border: 3px solid #3b82f6;
    color: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    cursor: grab;
    user-select: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 10;
    flex-shrink: 0;
}

.draggable-number.dragging {
    opacity: 0.5;
    transform: scale(1.1);
}

/* The Image Drop Zones (Gray Circles) */
.image-drop-zone {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;

    /* Lighter styling */
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px dashed rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;

    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    transition: all 0.2s ease;
    z-index: 5;

    /* Center the dropped number */
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-drop-zone.drag-over {
    background: rgba(59, 130, 246, 0.4);
    border-color: #3b82f6;
    transform: translate(-50%, -50%) scale(1.15);
}

/* Adjust contained number when inside zone */
.image-drop-zone .draggable-number {
    width: 34px;
    /* Slightly smaller than zone to fit inside */
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 0.95rem;
    border-width: 2px;
    box-shadow: none;
    margin: 0;
    position: static !important;
    /* Let flexbox center it */
    transform: none !important;
}

/* Reset Button */
.reset-drag-btn {
    display: block;
    margin: 1rem auto 0;
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reset-drag-btn:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #94a3b8;
}

/* OVERRIDE IMAGE SIZING FOR DRAG & DROP */
/* Matches .slide-img from slideshow.css */
.question-image.drag-drop-image img {
    max-width: 100% !important;
    max-height: 65vh !important;
    width: auto !important;
    /* Allow it to be larger than the standard 570px constraint */
}

/* Ensure the container allows the image to grow but wraps it tightly for coordinates */
.question-image.drag-drop-image {
    max-width: 100% !important;
    width: -moz-fit-content !important;
    width: fit-content !important;
    display: block !important;
    margin: 0 auto;
    /* Centers the container */
    position: relative !important;
}

/* Inline Controls */
.drag-controls-inline .reset-drag-btn {
    background: white;
    border: 1px solid #cbd5e1;
    color: #64748b;
    width: auto;
    height: auto;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    margin: 0;
    gap: 0.5rem;
}

.drag-controls-inline .check-drag-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    background: var(--color-accent, #0ea5e9);
    color: white;
    transition: all 0.2s;
}

.drag-controls-inline .check-drag-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}