/* Cloze Activity Styles */

/* Font Control Buttons */
.font-control-btn {
    background: #007bff;
    color: white;
    border: 1px solid #007bff;
    border-radius: 4px;
    padding: 6px 12px;
    margin-left: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.font-control-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.font-control-btn:active {
    transform: translateY(1px);
}

/* Ensure proper font rendering for international characters */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cloze_editor {
    width: 100%;
    min-height: 300px;
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: #fff;
    outline: none;
    resize: vertical;
}

.cloze_editor:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.cloze_editor[placeholder]:empty:before {
    content: attr(placeholder);
    color: #999;
    font-style: italic;
}

.cloze_editor .marked-gap {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    border: 1px solid #ffc107;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cloze_editor .marked-gap:hover {
    background-color: #ffd700;
    border-color: #ff8c00;
    transform: scale(1.02);
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.editor_controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.editor_controls button {
    padding: 8px 16px;
    border: 1px solid #007bff;
    background: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.editor_controls button:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.editor_controls button:disabled {
    background: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
}

.char-counter {
    text-align: right;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.char-counter.warning {
    color: #ff8c00;
}

.char-counter.error {
    color: #dc3545;
    font-weight: bold;
}

/* Exercise Display Styles */
.cloze-exercise {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 2.2;
    max-width: 800px;
    margin: 0 auto;
}

.cloze-gap {
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 17px;
    min-width: 60px;
    max-width: 300px;
    margin: 0 8px;
    background: #f8f9fa;
    transition: width 0.2s ease;
}

.cloze-gap:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.cloze-gap.correct {
    border-color: #28a745;
    background: #d4edda;
}

.cloze-gap.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
}





/* Bottom Controls */
.bottom-controls {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.check-all-btn {
    padding: 12px 24px;
    border: 2px solid #007bff;
    background: #007bff;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.check-all-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.check-all-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.hint-btn {
    padding: 12px 24px;
    border: 2px solid #28a745;
    background: #28a745;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.hint-btn:hover {
    background: #218838;
    border-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.hint-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}



/* Creation Form Styles */
.create_formhead {
    display: block;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 5px;
    color: #333;
}

.create_textinput {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 15px;
}

.create_textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    resize: vertical;
    margin-bottom: 15px;
}

.create_option {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.create_option input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.option_help {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.create_button {
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px 5px;
}

.create_button:hover {
    background: #0056b3;
}

.create_button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Success Message */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.success-message a {
    color: #155724;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cloze_editor {
        min-height: 200px;
        font-size: 14px;
    }
    
    .cloze-gap {
        min-width: 80px;
        font-size: 15px;
    }
    
    .editor_controls {
        flex-direction: column;
    }
    
    .editor_controls button {
        width: 100%;
        margin: 5px 0;
    }
    
    .teacher-controls button {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .check-all-btn, .hint-btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
        margin: 5px 0;
    }
    
    .bottom-controls {
        margin: 20px 10px;
        padding: 15px;
    }
} 