/* Cloze Exercise with Hints Styles */

.word-bank-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.word-bank-section h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
    min-height: 60px;
    padding: 15px;
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.word-bank.drag-over {
    border-color: #007bff;
    background: #f0f8ff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.2);
}

.word-item {
    background: #e3f2fd;
    color: #1976d2;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid #bbdefb;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    display: inline-block;
}

.word-item:hover {
    background: #bbdefb;
    border-color: #90caf9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.3);
}

.word-item:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.word-item.dragging {
    opacity: 0.6;
    transform: rotate(2deg) scale(1.05);
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.word-item.used {
    background: #e8eaf6;
    color: #5c6bc0;
    border-color: #c5cae9;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.word-item.used:hover {
    transform: none;
    box-shadow: none;
}

.bank-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.bank-toggle-btn, .bank-shuffle-btn, .bank-reset-btn {
    padding: 8px 16px;
    border: 1px solid #6c757d;
    background: #6c757d;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.bank-toggle-btn:hover, .bank-shuffle-btn:hover, .bank-reset-btn:hover {
    background: #5a6268;
    border-color: #5a6268;
    transform: translateY(-1px);
}

.bank-toggle-btn:active, .bank-shuffle-btn:active, .bank-reset-btn:active {
    transform: translateY(0);
}

.bank-reset-btn {
    background: #dc3545;
    border-color: #dc3545;
}

.bank-reset-btn:hover {
    background: #c82333;
    border-color: #c82333;
}

.word-bank-section.hidden .word-bank {
    display: none;
}

.word-bank-section.hidden .bank-toggle-btn {
    background: #28a745;
    border-color: #28a745;
}

.word-bank-section.hidden .bank-toggle-btn:hover {
    background: #218838;
    border-color: #218838;
}

/* Drop zone styles */
.cloze-gap {
    border: 2px dashed #dee2e6 !important;
    background: #f8f9fa !important;
    transition: all 0.3s ease !important;
    position: relative;
}

.cloze-gap.drag-over {
    border-color: #007bff !important;
    background: #f0f8ff !important;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3) !important;
    transform: scale(1.05);
}

.cloze-gap.filled {
    border-style: solid !important;
    border-color: #28a745 !important;
    background: #d4edda !important;
    color: #155724 !important;
}

.cloze-gap.filled.correct {
    border-color: #28a745 !important;
    background: #d4edda !important;
}

.cloze-gap.filled.incorrect {
    border-color: #dc3545 !important;
    background: #f8d7da !important;
}

/* Drop feedback */
.drop-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1001;
    pointer-events: none;
    animation: dropFeedback 0.6s ease-out;
}

@keyframes dropFeedback {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Drag ghost styling - removed to prevent conflicts */

/* Responsive design */
@media (max-width: 768px) {
    .word-bank {
        gap: 6px;
        padding: 10px;
    }
    
    .word-item {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .bank-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .bank-toggle-btn, .bank-shuffle-btn, .bank-reset-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Animation for shuffling */
.word-item.shuffling {
    animation: shuffle 0.3s ease-in-out;
}

@keyframes shuffle {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Empty state */
.word-bank.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-style: italic;
    min-height: 80px;
}

.word-bank.empty::after {
    content: "All words have been used!";
}

/* Bank toggle link */
.bank-toggle-link {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.bank-toggle-link a {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.bank-toggle-link a:hover {
    color: #007bff;
    background: #f8f9fa;
    text-decoration: none;
}

.bank-toggle-link a:active {
    transform: translateY(1px);
}

/* Success animation */
.word-item.success {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); background: #28a745; color: white; }
    100% { transform: scale(1); }
}

/* Floating word bank styles */
.word-bank-section.floating {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.word-bank-section.floating .word-bank {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 10px;
}



/* Add padding to main content when word bank is floating */
body.word-bank-floating {
    padding-bottom: 200px;
}

/* Responsive adjustments for floating word bank */
@media (max-width: 768px) {
    .word-bank-section.floating {
        padding: 15px;
    }
    
    .word-bank-section.floating .word-bank {
        max-height: 100px;
    }
    
    body.word-bank-floating {
        padding-bottom: 150px;
    }
} 